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

Re: RFC: Howto exclude config.sub and config.guess updates from .diff.gz



On 11/02/2008, David Paleino wrote:
> Not true:
> [Snip unrelated logic stuff.]

Yes, true. Functionally, you want foo => bar. Check (assuming here foo
is absent):
,----
| kibi@evy:~$     [ ! -f foo ] && echo "Doing bar 1"
| Doing bar 1
| kibi@evy:~$     [ -f foo ]   && echo "Doing bar 2"
| kibi@evy:~$     [ ! ! -f foo ] || echo "Doing bar 1"
| Doing bar 1
| kibi@evy:~$     [ ! -f foo  ]  || echo "Doing bar 2"
| kibi@evy:~$
`----

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:
,----
| kibi@evy:~$ make or
| [ ! ! -f foo ] || echo "Doing bar 1"
| Doing bar 1
| [ ! -f foo  ]  || echo "Doing bar 2"
| kibi@evy:~$ make and
| [ ! -f foo ] && echo "Doing bar 1"
| Doing bar 1
| [ -f foo ]   && echo "Doing bar 2"
| make: *** [and] Erreur 1
`----


> 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.

-- 
Cyril Brulebois

Attachment: pgpv5TJskUeWm.pgp
Description: PGP signature


Reply to: