[Top][All Lists]

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

RE: Trying to get rid of one redundand rule

From: John Graham-Cumming
Subject: RE: Trying to get rid of one redundand rule
Date: Tue, 14 Jun 2005 13:22:22 -0400

On Tue, 2005-06-14 at 16:49 +0200, address@hidden wrote:
> Thanks, but I keep rereading that and the manual, and still dont get it.
> The generated files $(BLDDIR)/rcompl.cpp and rcomp.cpp are _SOURCE_ files too.

GNU Make has no internal concept of what constitutes source or objects.
The VPATH rule that Paul is referring to is a "best practice".  GNU
Make's VPATH implementation will happily find source and object files it
you want it to.

> Why doesnt the rule
>   $(BLDDIR)/%.o: %.cpp
>       $(CXX) $(CXXFLAGS) -D __LINUX__ -I $(INCDIR) -I $(BLDDIR) -c $< -o $@
> find them and an implicit rule for .cpp->.o triggers instead?

Because the built in %.o : %.cpp rule takes precedence.


reply via email to

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