help-make
[Top][All Lists]
Advanced

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

Re: Updating local makefile


From: Tristan Van Berkom
Subject: Re: Updating local makefile
Date: Tue, 03 Feb 2004 09:33:10 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Greg Chicares wrote:
[snip]

Greg > Does the subdirectory exist?
Yes.

Greg > Does the makefile exist in the subdirectory?
Yes.

Me > The makefile refuses to update himself unless he is explicitly
Me > listed as a prerequisite of the invoked target.

If you use a makefile with only that rule and then invoke `make'
then effectivly you are explicitly trying to make Makefile.

From what I understand from reading the docs at gnu.org/manual
is that if I provide a rule to update a makefile (a makefile that
is /used/) then it should be updated before any other targets.


To test this rule without my entire build environment,
I used a makefile like this:
####################################################
all:
        @echo "Thats all she wrote"

$(CURDIR)/Makefile:$(CURDIR)/globalconfig/Makefile
        @echo -n "Updating address@hidden "
        @cp -f $< $@
        @echo "Done."

# XXX This line fixes it, but I don't think I should need it
#all:$(CURDIR)/Makefile

####################################################

Regards,
                 -Tristan






reply via email to

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