bug-standards
[Top][All Lists]
Advanced

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

justification for "allowed commands" in make-stds.texi?


From: Stephane Chazelas
Subject: justification for "allowed commands" in make-stds.texi?
Date: Mon, 18 Apr 2016 16:50:06 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

make-stds.texi has:

> @node Utilities in Makefiles
> @section Utilities in Makefiles
> 
> Write the Makefile commands (and any shell scripts, such as
> @code{configure}) to run under @code{sh} (both the traditional Bourne
> shell and the @sc{posix} shell), not @code{csh}.  Don't use any
> special features of @code{ksh} or @code{bash}, or @sc{posix} features
> not widely supported in traditional Bourne @code{sh}.
> 
> The @code{configure} script and the Makefile rules for building and
> installation should not use any utilities directly except these:
> 
> @c dd find
> @c gunzip gzip md5sum
> @c mkfifo mknod tee uname
> 
> @example
> awk cat cmp cp diff echo egrep expr false grep install-info ln ls
> mkdir mv printf pwd rm rmdir sed sleep sort tar test touch tr true
> @end example
[...]
> It is ok to use other utilities in Makefile portions (or
> scripts) intended only for particular systems where you know
> those utilities exist. 

(https://www.gnu.org/savannah-checkouts/gnu/make/manual/html_node/Utilities-in-Makefiles.html)

Where does that list come from?

I can see it includes "install-info", not common outside GNU
systems (and even then, only when installing some developer
tools), non-POSIX commands like egrep or tar.

If it's about portability to very old systems (like the next
warning about "mkdir -p" suggests), then "printf" should
probably not be there (it was added to that list in 2010 without
much of a justification: 

http://cvs.savannah.gnu.org/viewvc/gnustandards/gnustandards/make-stds.texi?view=log#rev1.58

Why are commands like basename, dirname, comm, find, wc, tee,
uniq that have little changed since Unix v7 not included?

If it's because some implementations have had bugs, then one can
say the same of most of those commands in that list.

Thanks,
Stephane




reply via email to

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