help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Makefile not correctly rebuilding project


From: Greg Chicares
Subject: Re: Makefile not correctly rebuilding project
Date: Mon, 07 Jun 2010 15:37:13 +0000
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

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' < address@hidden > $@;
+ $(SED) 's,\($*\)\.o[ :]*,$(VASMDIR)\1.o $(VASMDIR)$@ : ,g' < address@hidden > 
$@;
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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]