make-w32
[Top][All Lists]
Advanced

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

RE: Dependencies on directories on NTFS volumes


From: Paul D. Smith
Subject: RE: Dependencies on directories on NTFS volumes
Date: Sat, 26 Mar 2005 10:48:23 -0500

If you don't mind all the directories being created, you can just use
$(shell ...) to do it.  That's how I always do it:

    DIRECTORIES += foo bar baz

        ...

    __dummy := $(shell for d in $(DIRECTORIES); do [ -d $$d ] || mkdir -p $$d; 
done)

I guess if you're using windows you might need to do something more
complicated.  Anyway, when the shell function is used in an "immediate
evaluation" context, it's run right then before any of the rest of the
makefile is parsed.

An alternative is to use order-only prerequisites to get the directories
created; since they're order-only they won't cause the targets to be
rebuilt.

-- 
-------------------------------------------------------------------------------
 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]