[Top][All Lists]

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

Re: How do I check if a directory exists?

From: Noel Yap
Subject: Re: How do I check if a directory exists?
Date: Mon, 08 Dec 2003 15:58:27 -0500

Eric Hanchrow wrote:
> I'd amend that a little, like so:
>         target:
>                 -$(MAKE) -C my_dir
> Here's what I changed:
> * I didn't make `target' depend on a file named Makefile, since I'm
>   not certain that such a file actually exists (perhaps you named it
>   `').

FYI, this command will only work if the makefile has a known name (eg Makefile, 
makefile, or GNUmakefile).  It will not work if the makefile's name is

> * I put a dash in front of the command, so that if it fails (because
>   the directory doesn't exist, for example) your top-level make will
>   *not* fail -- I suspect this is what you want.

I would think one would want the build to fail if one of the submakes fail.

NOTICE: If received in error, please destroy and notify sender.  Sender does 
not waive confidentiality or privilege, and use is prohibited.

reply via email to

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