help-make
[Top][All Lists]
Advanced

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

Append dependencies through variables


From: Riccardo Manfrin
Subject: Append dependencies through variables
Date: Sun, 26 May 2013 00:19:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

Hi list,
I have the following main makefile:

#Makefile

include Makefile1

all: $(MAKE_DEPS_ALL)
    @echo $(MAKE_DEPS_ALL)

#End of Makefile



and Makefile1 file

#Makefile1

MAKE_DEPS_ALL+=mydep

mydep:
    $(MAKE) -C /my/path

#End of Makefile1



Unfortunately, mydep dependency is not resolved. I see "mydep" when I print MAKE_DEPS_ALL, but the depencency is not looked up. If, instead, I try to hardcode the depencency straight (like this: "all: mydep"), everything works. Why isn't make resolving the depencency? What I'd like is for included Makefiles to have a way to append their own dependencies without touching the main Makefile.

Thanks in advance.
R







reply via email to

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