On 2010-06-07 14:48Z, Alex Buell wrote: > > $ gcc -M -ggdb3 assembler/vasm.c > vasm.o: assembler/vasm.c /usr/include/stdio.h /usr/include/features.h \ [...] > Seems it doesn't prefix the vasm.o with the directory name, which might > be why the sed regexp broke. Any ideas or workarounds for this one?
This works well for me: http://make.paulandlesley.org/rules.html "Life is simplest if the targets are built in the current working directory." A less radical solution would be to make the 'sed' expression insert the directory you want, e.g. [untested]: - $(SED) 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $...@.$$$$ > $@; + $(SED) 's,\($*\)\.o[ :]*,$(VASMDIR)\1.o $(VASMDIR)$@ : ,g' < $...@.$$$$ > $@; Or, if you use only gcc, '-MT' can control that (and, with other gnu cpp '-Mx' options, you can probably dispense with the 'sed' script). _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
