List Info

Thread: text functions in implicit rules




text functions in implicit rules
country flaguser name
Germany
2008-04-12 17:24:17
Ahoy!

is it at all possible to create an implicit rule that'd do
something  
similar to:
%.o: $(subst foo,bar,%.cpp)

The reason I'm asking is that I'd like to have a makefile
that takes  
a list of source files that are potentially scattered over
different  
directories, but builds the objects/dependency files into a
single,  
common dir.
The idea would've been to mangle the names so e.g.
../foo/bar.cpp  
would become __foobar.o

Am I fundamentally asking the wrong question? Is there a way
of doing  
this without scattering the objects/dependencies over the
sources  
dirs? (in a way that allows the list to contain absolute
paths and  
the like?)
Ta!

Jan


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )