[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Incremental builds
From: |
Paul D. Smith |
Subject: |
Re: Incremental builds |
Date: |
Wed, 9 Mar 2005 08:59:27 -0500 |
%% "Semethy, Stephen" <address@hidden> writes:
ss> %.obj: %.c
ss> @echo "address@hidden" >&2
ss> $(CC) $(CFLAGS) $(CCFLAGS) /Fo$(OBJ_PATH)/$@ $< 2>&1
I don't know much about Windows compilers, but I'm assuming that the
"/Fo$(OBJ_PATH)/$@" flag tells the compiler to put the output object in
the $(OBJ_PATH) directory.
This is your problem. When make wants to create a .obj target it will
invoke that command script and it will set the automatic variable $@ to
the pathname of the target it expects the command script to create.
If the command script does NOT create that exact target, which this one
does not, then that's an error in your makefile and it won't work
properly.
As a rule of thumb ALL your rules should always create the "$@" target,
itself, with no additions, subtractions, or modifications.
--
-------------------------------------------------------------------------------
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