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?