[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About Section 7.2.2 "Utilities in Makefiles" of the GCS
From: |
Ralf Wildenhues |
Subject: |
Re: About Section 7.2.2 "Utilities in Makefiles" of the GCS |
Date: |
Fri, 21 Mar 2008 01:10:18 +0100 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
* Karl Berry wrote on Fri, Mar 21, 2008 at 12:29:02AM CET:
>
> Can one of you propose a patch?
Here's a quick writeup in a hurry of what was listed so far.
I should note that the Bourne sh vs. Posix sh is not an easy question.
Autoconf would like to move to shell functions in the not too distant
future, and practical experience shows that outside of museums, that
is pretty portable nowadays. Also, virtually all systems have a posixy
shell somewhere (the problem sometimes being to find it).
Cheers,
Ralf
Index: make-stds.texi
===================================================================
RCS file: /sources/gnustandards/gnustandards/make-stds.texi,v
retrieving revision 1.51
diff -u -r1.51 make-stds.texi
--- make-stds.texi 14 Feb 2008 17:03:48 -0000 1.51
+++ make-stds.texi 21 Mar 2008 00:05:18 -0000
@@ -33,7 +33,10 @@
@end iftex
describes conventions for writing the Makefiles for GNU programs.
Using Automake will help you write a Makefile that follows these
-conventions.
+conventions. For more information on portable Makefiles, see
address@hidden and @ref{Portable Make, Portable Make Programming,, autoconf,
+Autoconf}.
+
@menu
* Makefile Basics:: General conventions for Makefiles.
@@ -144,7 +147,8 @@
@section Utilities in Makefiles
Write the Makefile commands (and any shell scripts, such as
address@hidden) to run in @code{sh}, not in @code{csh}. Don't use any
address@hidden) to run in @code{sh} (both traditional Bourne shell
+and @sc{posix} shell), not in @code{csh}. Don't use any
special features of @code{ksh} or @code{bash}.
The @code{configure} script and the Makefile rules for building and
@@ -159,15 +163,20 @@
ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true
@end example
+Generally, try to stick to @sc{posix} features of these tools.
+For a list of known incompatibilities, see @ref{Portable Shell,
+Portable Shell Programming,, autoconf, Autoconf}.
+
Compression programs such as @code{gzip} can be used in the
@code{dist} rule.
Stick to the generally supported options for these programs. For
example, don't use @samp{mkdir -p}, convenient as it may be, because
-most systems don't support it.
+some systems don't support it at all and with others, it is not safe
+for parallel execution.
It is a good idea to avoid creating symbolic links in makefiles, since a
-few systems don't support them.
+few file systems don't support them.
The Makefile rules for building and installation can also use compilers
and related programs, but should do so via @code{make} variables so that the
cvs diff: Diffing work.m
cvs diff: Diffing work.s
Re: About Section 7.2.2 "Utilities in Makefiles" of the GCS, Karl Berry, 2008/03/20