help-make
[Top][All Lists]
Advanced

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

Re: How to make 'cd' errors stop a rule?


From: Dave Hylands
Subject: Re: How to make 'cd' errors stop a rule?
Date: Sun, 4 Dec 2005 14:59:46 -0800

Hi Matt,

> I find that the 'cd' command in this rule does not stop this make script:
>
>
> all:
>         cd bogus-this-is-not-a-real-directory; ls -l
>         @echo This is the 2nd cmd in the rule

You're actually executing two commands. And make is seeing the return
code from the ls -l.

So split it into two lines and it should fail if trying to cd into a
non-existance directory.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




reply via email to

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