ports/64037 and the alleged && -> ; failure from March 2002

Oliver Eikemeier eikemeier at fillmore-labs.com
Sat Mar 13 07:08:20 PST 2004

Matthias Andree wrote:

> Oliver Eikemeier <eikemeier at fillmore-labs.com> writes:
>>GNU make is not used for ports Makefiles, only for the ones in the
>>distribution, and you don't want to Patch Them All(tm), do you?
> perl -ple 's/;/\&\&/g;' `find /usr/ports -iname 'makefile*'` # :*)

Hay, that's a nice one-liner to break the ports tree. Does yours still
build the INDEX after this line? I won't try...

> Seriously, whether we use gmake or make for ports does not matter,
> neither documents the "make passes -e to /bin/sh" behaviour, hence it
> must not be relied on under any circumstances.

Use the source, Luke ;) Submit a patch to the manpage.

> Robustness considerations mandate using && over ; when cmd1 is a
> prerequisite for cmd2 in a cmd1 && cmd2 AND-list. Some day, someone
> considers the whole command line isn't that important, prepends a '-'
> (making make suppress the -e) and cmd2 gets executed when cmd1 failed in
> a cmd1;cmd2 sequence.

	-cd /nonexistent; if [ ! -f "removeall" ]; then exit 1; fi
	rm -Rf *

> Seriously, any Makefile that is touched by a committer or maintainer
> should have the ";" changed to "&&" if "&&" is needed to make the thing
> work without -e.

The point is that if the cd fails, they won't work anyway, with or without
the change. So we don't gain anything.

>>Finally I'm not sure if simply ignoring the following command is the
>>right thing to do. I can construct an example where this is fatal too,
>>but IMHO all such examples would be pathological.
> Sure you can (but then we have OR-lists with "||" :-P)


> I'm not saying that all ';' must be '&&', but in the common "cd, then
> execute a command" case, it really ought to be.

Provide one example in the ports tree where this is really benificial.


More information about the freebsd-ports mailing list