help-make
[Top][All Lists]
Advanced

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

Re: make problem with multiple character matching (%) operator


From: Paul D. Smith
Subject: Re: make problem with multiple character matching (%) operator
Date: Fri, 11 Jan 2002 16:37:33 -0500

%% Crni Gorac <address@hidden> writes:

  cg> Project foo has following directory hierarchy:
  cg>     foo
  cg>     |-- Makefile
  cg>     |-- ab
  cg>     |   `-- foo.a
  cg>     `-- c

  cg> File foo/ab/foo.b should be generated from
  cg> foo/ab/foo.a and then file foo/c/foo.c from
  cg> foo/ab/foo.b. Following Makefile is used:

  cg> ABDIR = ab
  cg> CDIR  = c
  cg> VPATH = $(ABDIR)

  cg> Where I am wrong? Why it is not possible for make to accomplish
  cg> two successive multiple character matching and conclude that it
  cg> should first generate .b file, then .c file?

That's not the problem.  The problem is you're misusing VPATH.

VPATH is designed to find _sources_.  It cannot be used to find
_targets_.  It won't work to use it like that.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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]