[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Invalid VPATH directories query
From: |
Paul D. Smith |
Subject: |
Re: Invalid VPATH directories query |
Date: |
Mon, 30 Aug 2004 21:37:33 -0400 |
%% "J. Grant" <address@hidden> writes:
jg> I have noticed some accidental mistakes with invalid VPATH
jg> directories. I wonder if there is any way Make could first check
jg> the directories are valid and list the ones which are invalid?
Just because they're invalid when make starts doesn't mean they will be
when make searches for them.
Also, VPATH is often used intentionally in situations where one or more
of the directories on VPATH does not exist; that's one of its use cases
("pick the first one where the source exists").
jg> Would such a feature be supported if not already present? (I could
jg> not find it)
You can, of course, do it yourself; something like:
_nonexistent_vpath := $(filter $(VPATH),$(wildcard $(VPATH)))
ifdef _nonexistent_vpath
$(error These VPATH directories do not exist: $(_nonexistent_vpath))
endif
Note, not tested but you get the idea anyway... if you use ":" separated
VPATH or want to allow for that you should do $(subst :, ,$(VPATH))
inside the wildcard function.
--
-------------------------------------------------------------------------------
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