On Mon, 2010-06-07 at 15:37 +0000, Greg Chicares wrote:
> 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).

I've just realised how wrong I've been. Reading the URL you have given
me has actually made me aware I could use VPATH instead of directories.
-- 
http://www.munted.org.uk

One very high maintenance cat living here.

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to