]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Don't use "chmod -w".
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Jan 2004 08:18:24 +0000 (08:18 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Jan 2004 08:18:24 +0000 (08:18 +0000)
ChangeLog
bin/Makefile.am
doc/autoconf.texi
lib/Makefile.am

index 24c6679be7fa4ef06564cfa80686242673ea80cd..c40edc6366e6291d61003de1a2cc91f5d6cf6e0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-01-05  Paul Eggert  <eggert@twinsun.com>
+
+       * bin/Makefile.am (autoconf, autoheader, autom4te, autoreconf,
+       autoscan, autoupdate, ifnames): Don't use chmod -w.
+       * lib/Makefile.am (autom4te.cfg): Likewise.
+       * doc/autoconf.texi (Limitations of Usual Tools): Warn against
+       "chmod -w".
+
 2004-01-04  Paul Eggert  <eggert@twinsun.com>
            Paolo Bonzini  <bonzini@gnu.org>
 
index 378f7f987a2bcb75563ef319ddf83586a4f69f06..c2527dd673a421b02b650f7d089bb36d1b75c2b5 100644 (file)
@@ -1,7 +1,9 @@
 ## Process this file with automake to create Makefile.in. -*-Makefile-*-
 
 ## Makefile for Autoconf.
-## Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+## Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+## Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -64,49 +66,49 @@ autoconf: $(srcdir)/autoconf.in Makefile
        rm -f autoconf autoconf.tmp
        $(edit) $(srcdir)/autoconf.in >autoconf.tmp
        chmod +x autoconf.tmp
-       chmod -w autoconf.tmp
+       chmod a-w autoconf.tmp
        mv -f autoconf.tmp autoconf
 
 autoheader: $(srcdir)/autoheader.in Makefile
        rm -f autoheader autoheader.tmp
        $(edit) $(srcdir)/autoheader.in >autoheader.tmp
        chmod +x autoheader.tmp
-       chmod -w autoheader.tmp
+       chmod a-w autoheader.tmp
        mv -f autoheader.tmp autoheader
 
 autom4te: $(srcdir)/autom4te.in Makefile
        rm -f autom4te autom4te.tmp
        $(edit) $(srcdir)/autom4te.in >autom4te.tmp
        chmod +x autom4te.tmp
-       chmod -w autom4te.tmp
+       chmod a-w autom4te.tmp
        mv -f autom4te.tmp autom4te
 
 autoreconf: $(srcdir)/autoreconf.in Makefile
        rm -f autoreconf autoreconf.tmp
        $(edit) $(srcdir)/autoreconf.in >autoreconf.tmp
        chmod +x autoreconf.tmp
-       chmod -w autoreconf.tmp
+       chmod a-w autoreconf.tmp
        mv -f autoreconf.tmp autoreconf
 
 autoscan: $(srcdir)/autoscan.in Makefile
        rm -f autoscan autoscan.tmp
        $(edit) $(srcdir)/autoscan.in >autoscan.tmp
        chmod +x autoscan.tmp
-       chmod -w autoscan.tmp
+       chmod a-w autoscan.tmp
        mv -f autoscan.tmp autoscan
 
 autoupdate: $(srcdir)/autoupdate.in Makefile
        rm -f autoupdate autoupdate.tmp
        $(edit) $(srcdir)/autoupdate.in >autoupdate.tmp
        chmod +x autoupdate.tmp
-       chmod -w autoupdate.tmp
+       chmod a-w autoupdate.tmp
        mv -f autoupdate.tmp autoupdate
 
 ifnames: $(srcdir)/ifnames.in Makefile
        rm -f ifnames ifnames.tmp
        $(edit) $(srcdir)/ifnames.in >ifnames.tmp
        chmod +x ifnames.tmp
-       chmod -w ifnames.tmp
+       chmod a-w ifnames.tmp
        mv -f ifnames.tmp ifnames
 
 
index 8d825d9abac5205a6a4ab17f5e30b72aecbfd6f0..7e7962310c73e2bcd387807b03d70626099998df 100644 (file)
@@ -10873,6 +10873,19 @@ practice.  Typically the C compiler is invoked from makefiles that use
 compiler name.
 
 
+@item @command{chmod}
+@c ------------------
+@prindex @command{chmod}
+Avoid usages like @samp{chmod -w file}; use @samp{chmod a-w file}
+instead, for two reasons.  First, plain @samp{-w} does not necessarily
+make the file unwriteable, since it does not affect mode bits that
+correspond to bits in the file mode creation mask.  Second,
+@acronym{POSIX} says that the @samp{-w} might be interpreted as an
+implementation-specific option, not as a mode; @acronym{POSIX} suggests
+using @samp{chmod -- -w file} to avoid this confusion, but unfortunately
+@samp{--} does not work on some older hosts.
+
+
 @item @command{cmp}
 @c ----------------
 @prindex @command{cmp}
index 68630529a86a508f31e469d5ddd81c14cefd3ef6..adbf7cb2131756ac08ac961f9d5315eadfc99c15 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 
-## Copyright 2002 Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 ##
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -42,5 +42,5 @@ CLEANFILES = autom4te.cfg
 autom4te.cfg: $(srcdir)/autom4te.in Makefile
        rm -f autom4te.cfg autom4te.tmp
        $(edit) $(srcdir)/autom4te.in >autom4te.tmp
-       chmod -w autom4te.tmp
+       chmod a-w autom4te.tmp
        mv autom4te.tmp autom4te.cfg