[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: short followup on vpath/VPATH stuff
From: |
Paul D. Smith |
Subject: |
Re: short followup on vpath/VPATH stuff |
Date: |
Mon, 14 Jun 2004 16:13:37 -0400 |
%% "Robert P. J. Day" <address@hidden> writes:
rpjd> if i try to do the "make all" in one step, the prereqs foo.o and
rpjd> bar.o are found to be based on the source files foo.c and bar.c
rpjd> in the *current* directory so that, even after the object files
rpjd> are placed in ${OBJDIR}, make has already associated the object
rpjd> files with the current directory and therefore gets confused in
rpjd> that final link step, right?
Correct. Make always expects every rule it runs to create the file
stored in $@, and exactly that file. It doesn't go around after the
rule is done trying to figure out where the file was created.
rpjd> however, if i build the object files in one make invocation, and
rpjd> then follow that with "make foo", that will work since that
rpjd> second (independent) "make foo" *will* use VPATH to find the
rpjd> (missing) object files that already exist in the ${OBJDIR}
rpjd> directory. so far, so good?
Correct.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist