Kevin O'Connor [mailto:kevin@koconnor.net] wrote:
]On Mon, Jun 02, 2014 at 05:27:23PM -0500, Scott Duplichan wrote: ]> Kevin O'Connor [mailto:kevin@koconnor.net] wrote: ]> ]Unfortunately, this would break builds where one specifies an OUT ]> ]build directory that isn't a sub-directory of the source code. (That ]> ]is, a build with "make OUT=/a/b/c".) ]> ] ]> ]I've never tried building under Windows, and I'm not really sure how ]> ]to help here. Does passing the CURDIR via the command-line (as in the ]> ]patch below) improve things? ]> ] ]> ]-Kevin ]> ]> Well sure enough, this patch solves the problem. ] ]Thanks. Does the patch below also work?
Hello Kevin, Yes, the -I. patch below also works for msys/Windows. Thanks, Scott
]-Kevin ] ] ]--- a/Makefile ]+++ b/Makefile ]@@ -112,8 +112,8 @@ endif ] # Do a whole file compile by textually including all C code. ] define whole-compile ] @echo " Compiling whole program $3" ]-$(Q)printf '$(foreach i,$2,#include "$(CURDIR)/$i"\n)' > $3.tmp.c ]-$(Q)$(CC) $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3 ]+$(Q)printf '$(foreach i,$2,#include "$i"\n)' > $3.tmp.c ]+$(Q)$(CC) -I. $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3 ] endef ] ] %.strip.o: %.o