make-w32
[Top][All Lists]
Advanced

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

Re: bug in the documentation, or ...?


From: Eli Zaretskii
Subject: Re: bug in the documentation, or ...?
Date: Wed, 15 Feb 2006 06:20:21 +0200

> Date: Tue, 14 Feb 2006 13:35:53 -0800 (PST)
> From: nusret <address@hidden>
> 
> I really don't have any experience with Unix(-like)
> systems. Someone told in some mailing list that if we
> change ';' to '&&' the change will cause problems in
> some unix systems. is this true? Why do you say && is
> safer?

I don't know about ``safer'', but && means in CMD something utterly
different from what it means in the Unixy /bin/sh.  On Unix, the part
after && will be executed only if the part before it exited with a
zero status, while in CMD, there's no such condition, AFAIK.

Eventually, if you want a portable Makefile, you will have to use the
same shell on all systems.  In practice, that means to use sh.exe on
Windows, since CMD is not available on Unix.

Alternatively, rewrite your Makefile to not need any non-portable
shell features.  For example, `cd' could in this case be replaced by
the following:

foo: bar/lose
        make -C bar gobble_lose

assuming that there's a Makefile in `bar' whose `gobble_lose' target
does `gobble lose > "../foo"' (and the quotes around ../foo are
important!).




reply via email to

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