help-make
[Top][All Lists]
Advanced

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

problem with two makefiles


From: Vasu S
Subject: problem with two makefiles
Date: Tue, 13 Sep 2005 16:21:50 +0530

Hi all,

I have two makefiles Makefile, Makefile.bld.  The former should check whether the target needs to be rebuild and invoke Makefile.bld if build is required.  Makefile.bld should do the actual build

The existing code is like this.

(Makefile)

TARGET:  $(DEST)/lib.a
                $MAKE -f Makefile.bld LIB

(Makefile.bld)

LIB:
              $INSTALL -f lib.a

If I do make, INSTALL command is getting executed even though the lib.a is upto date.

If I write the Makefile like:

(Makefile)

TARGET:  $(DEST)/lib.a
                 $INSTALL -f lib.a

then INSTALL command is getting executed only if lib.a is rebuilt.

The problem is I cant have the INSTALL command in Makefile. It should be in Makefile.bld only.
Can anyone tell me what is the problem with my code?

Thanks,
Vasu.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]