help-make
[Top][All Lists]
Advanced

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

Re: Trying to get rid of one redundand rule


From: Paul D. Smith
Subject: Re: Trying to get rid of one redundand rule
Date: Tue, 14 Jun 2005 08:51:57 -0400

%% Regarding Trying to get rid of one redundand rule; you wrote:

  n> My problem: even though I list both $(SRCDIR) and $(BLDDIR) in the VPATH, 
  n>            I still have to list a separate rule to compile those 2 files:

  n> $(BLDDIR)/%.o: %.cpp
  n>    $(CXX) $(CXXFLAGS) -D __LINUX__ -I $(INCDIR) -I $(BLDDIR) -c $< -o $@

  n> %.o: %.cpp
  n>    $(CXX) $(CXXFLAGS) -D __LINUX__ -I $(INCDIR) -I $(BLDDIR) -c $< -o $@

VPATH is ONLY for finding _SOURCE_ files, never for finding target
files.

See the papers on VPATH on my web site below.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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