[Top][All Lists]

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


From: MENETRIER, Jerome
Subject: RE: VPATH
Date: Thu, 24 Sep 2009 10:01:59 +0200

Thank you Paul for your answer.

My problem is effectively to prevent the use of a source file drop accidentaly 
in local directory.
This is not conforme to our configuration management plan.

I will try your proposal if there exist no other way this prevent this problem.

-----Message d'origine-----
De : Paul Smith [mailto:address@hidden
Envoyé : mercredi 23 septembre 2009 18:59
Cc : address@hidden
Objet : Re: VPATH

On Wed, 2009-09-23 at 15:33 +0200, MENETRIER, Jerome wrote:

> I use for this VPATH to precise where file can be find.
> But my problème is to exclude current directory.
> How can I exclude current directory without precise all the possible
> directories in directive ?

Unfortunately, there is no way in GNU make to keep VPATH from searching
the local directory first.  The workaround you suggest is the only
possible one.

I can't remember anyone ever asking for this feature before.  I do
recall someone asking that, if "." appeared in VPATH, the local
directory would be looked for in that order instead of always being
looked at first.

Can you explain at a slightly higher level why you want to ignore local
files?  Is it that there might legitimately be local files which you
don't want to use?  Or, are you worried that someone might drop a local
file accidentally and you don't want to use that file?

If the latter, one option is to check explicitly for local files and, if
any are found, fail; something like this:

        LOCAL_SRCS := $(wildcard $(SRCS))
        ifneq ($(LOCAL_SRCS),)
            $(error Invalid local source files: $(LOCAL_SRCS))

(this assumes that the list of source files to build is in the variable
SRCS; modify to suite your situation of course).

This mail has originated outside your organization, either from an external 
partner or the Global Internet.
Keep this in mind if you answer this message.

The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.

reply via email to

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