Il giorno Mon, 11 Feb 2008 17:36:03 +0100 Cyril Brulebois <[EMAIL PROTECTED]> ha scritto:
> On 11/02/2008, David Paleino wrote: > > Not true: > > [Snip unrelated logic stuff.] I can't understand how what I wrote is "unrelated", but let's go on. > [..] > > Now, moving that to a Makefile: > ,---- > | #!/usr/bin/make -f > | > | and: > | [ ! -f foo ] && echo "Doing bar 1" > | [ -f foo ] && echo "Doing bar 2" > | > | or: > | [ ! ! -f foo ] || echo "Doing bar 1" > | [ ! -f foo ] || echo "Doing bar 2" > `---- > > You now get: > ,---- > | [EMAIL PROTECTED]:~$ make or > | [ ! ! -f foo ] || echo "Doing bar 1" > | Doing bar 1 > | [ ! -f foo ] || echo "Doing bar 2" > | [EMAIL PROTECTED]:~$ make and > | [ ! -f foo ] && echo "Doing bar 1" > | Doing bar 1 > | [ -f foo ] && echo "Doing bar 2" > | make: *** [and] Erreur 1 > `---- Thank you. > > but I can't understand why it couldn't suggest something like: > > > > [ -f Makefile ] && $(MAKE) distclean > > > > which triggers the same result (at least in bash -- that's why I'm > > supposing that "&&" needs to be escaped somehow in Makefiles). > > Explained already in my first mail, and in extenso by Justin. I couldn't get your explanation before, thanks to Justin for extending it. Thanks, David -- . ''`. Debian maintainer | http://wiki.debian.org/DavidPaleino : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/ `. `'` GPG: 1392B174 ----|---- http://snipr.com/qa_page `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
signature.asc
Description: PGP signature