[Top][All Lists]

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

target pattern resolution problem

From: Stefan Seefeld
Subject: target pattern resolution problem
Date: Mon, 08 Jul 2002 09:19:34 -0400

hi there,

I have a Makefile covering not only the current directory
but also some subdirectories, i.e. the source code is in
various subdirectories. I'd like to generate the object files
such that the build tree is isomorphic to the source tree,
i.e. there is a trivial correspondance between the object file
name and the source file name...
Here is a snipped of the Makefile I attempted to use:

srcdir   := ..

all: foo.o Console/bar.o

%.o: $(srcdir)/%.cc
        @echo processing $^

#Console/%.o: $(srcdir)/Console/%.cc
# @echo processing $^

It is my understanding that I shouldn't need a rule to explicitely
define how to make stuff in the Console/ subdirectory. (Thus is is
commented out above). This works indeed if I build in the source tree,
i.e. if 'srcdir == .' In all other cases I get
'No rule to make target `Console/bar.o''

This problem is still present in the make 3.79.2a snapshot you sent me
last friday...


reply via email to

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