[Glade-users] Calling another makefile from Makefile.am



"Felix E. Klee" wrote:
I want to "call" a target in another makefile that resides in a
subdirectory of my project; from the command line I have to call "make
-f newmat/gnu.mak libnewmat". What should I add to Makefile.am to make
that happen automatically?

Here is what I did to solve the problem by modifying *Makefile.in*:

In order to be able to make libnewmat.a, I changed the line
    all: all-redirect
to
    all: libnewmat.a all-redirect
and added the lines
    libnewmat.a:
            $(MAKE) -C newmat -f gnu.mak libnewmat.a
at the end of Makefile.in.

In order to be able to clean libnewmat.a and associated object files, I
changed the line
    clean: clean-am
to
    clean: clean-libnewmat.a clean-am
and added the lines
    clean-libnewmat.a:
            -rm -f newmat/*.o newmat/libnewmat.a
at the end of Makefile.in.

Felix





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]