help-make
[Top][All Lists]
Advanced

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

Re: Problem with MOC-related (Qt) objects


From: David Boyce
Subject: Re: Problem with MOC-related (Qt) objects
Date: Mon, 22 May 2006 21:48:24 -0400

At 06:44 PM 5/22/2006, Paul D. Smith wrote:
    MKDIRS += $(objdir)/moc
        ...


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

or whatever.

A little off topic, but a fringe benefit of using the -p flag to mkdir is that it never complains about directories which already exist. This is even guaranteed by POSIX, which says "Each dir operand that names an existing directory shall be ignored without error" when -p is used. I often use -p to avoid the loop-and-test above, even when making single-level dirs. So the above could just be

__dummy := $(shell mkdir -p $(MKDIRS))

saving both processes and keystrokes.

-David Boyce






reply via email to

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