[Top][All Lists]

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

Creating directories for VPATH to search

From: Norman Wilson
Subject: Creating directories for VPATH to search
Date: Fri, 6 Jan 2006 12:58:48 -0000


VPATH = .:other

foo: bar
        ln -s $(<) $(@)

other/bar: | other
        touch $(@)

        mkdir $(@)

So, I'm saying if you don't find a file in the current directory look in
other. The top level target requires bar. I give a rule for creating bar
under other. I also give rule for creating other.

I'd expect make to see that there is no bar in the current directory,
see that there is a rule for creating it under other, and that other is
in the VPATH, and therefore work out that other/bar must be created and
then used as the prereq for foo. If other exists then this makefile has
the desired affect. If other does not exist I get:

make: *** No rule to make target `bar', needed by `foo'.  Stop.

ie VPATH searches only seem to work if the searched directories exist
before make is invoked, even if there are explicit rules for making
files in the VPATH directories. The manual says:

If such a file is lacking in the current directory, the appropriate
directories are searched for it. If `foo.c' exists (or is mentioned in
the makefile) in any of the directories, the implicit rule for C
compilation is applied.

Here there is an explicit rule for other/bar in the makefile, yet this
is not recognised by the VPATH search. Any work arounds? Is this fixed
in the beta release?

Atos Euronext Market Solutions Disclaimer
The information contained in this e-mail is confidential and solely for the 
intended addressee(s). Unauthorised reproduction, disclosure, modification, 
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message do not 
necessarily reflect those of Atos Euronext Market Solutions.

L'information contenue dans cet e-mail est confidentielle et uniquement 
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. 
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail 
vous parvient par erreur, nous vous prions de bien vouloir prevenir 
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre 
systeme. Le contenu de ce message electronique ne represente pas necessairement 
la position ou le point de vue d'Atos Euronext Market Solutions.

reply via email to

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