Greetings,
I am using gmake via Msys on a win xp box.
The project that I am trying to build, has a 'build_dir' off of the root of
the project tree which is where I am to keep all the object files. I am having
a problem writing a rule that will correctly detect if that file is
missing/up-to-date. I have, for example:
BUILD_DIR=$(PROJ_ROOT)/build_dir
$(BUILD_DIR)/%.o : %.c
mkdir -p $(BUILD_DIR)
$(CC) $(CFLAGS) $< -o $@
mv $@ $(BUILD_DIR)
but it will build if the .o files are missing from the local dir, and then
not copy to the build_dir.
If I remove the $(BUILD_DIR) from the rule, it will always rebuild the .o
files, and copy them.
What am I missing? Can I not include a path in a target rule? How can I
(properly) do this?
Any and all help appreciated!
-kt.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make