* modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
Ensure that each generated file is now read-only.
* modules/argz: Likewise.
* modules/arpa_inet: Likewise.
* modules/byteswap: Likewise.
* modules/configmake: Likewise.
* modules/fcntl: Likewise.
* modules/fnmatch: Likewise.
* modules/getopt: Likewise.
* modules/glob: Likewise.
* modules/inttypes: Likewise.
* modules/netinet_in: Likewise.
* modules/poll: Likewise.
* modules/stdbool: Likewise.
* modules/stdint: Likewise.
* modules/sys_select: Likewise.
* modules/sys_socket: Likewise.
* modules/sys_stat: Likewise.
* modules/sysexits: Likewise.
* modules/localcharset: Same as above, but continue using temporary
file named "t-$@" (why different?) rather than the "$@-t" used
everywhere else.
* modules/sysexits (Makefile.am): Replace literal occurrences
of "sysexit.h" more readable, and more consistent, "$@".
+2006-09-06 Jim Meyering <jim@meyering.net>
+
+ Make generated files be read-only.
+ * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
+ Ensure that each generated file is now read-only.
+ * modules/argz: Likewise.
+ * modules/arpa_inet: Likewise.
+ * modules/byteswap: Likewise.
+ * modules/configmake: Likewise.
+ * modules/fcntl: Likewise.
+ * modules/fnmatch: Likewise.
+ * modules/getopt: Likewise.
+ * modules/glob: Likewise.
+ * modules/inttypes: Likewise.
+ * modules/netinet_in: Likewise.
+ * modules/poll: Likewise.
+ * modules/stdbool: Likewise.
+ * modules/stdint: Likewise.
+ * modules/sys_select: Likewise.
+ * modules/sys_socket: Likewise.
+ * modules/sys_stat: Likewise.
+ * modules/sysexits: Likewise.
+ * modules/localcharset: Same as above, but continue using temporary
+ file named "t-$@" (why different?) rather than the "$@-t" used
+ everywhere else.
+
+ * modules/sysexits (Makefile.am): Replace literal occurrences
+ of "sysexit.h" more readable, and more consistent, "$@".
+
2006-09-05 Bruno Haible <bruno@clisp.org>
* modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
alloca.h: alloca_.h
+ rm -f $@-t $@
cp $(srcdir)/alloca_.h $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += alloca.h alloca.h-t
# We need the following in order to create <argz.h> when the system
# doesn't have one that works with the given compiler.
argz.h: argz_.h
+ rm -f $@-t $@
cp $(srcdir)/argz_.h $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += argz.h argz.h-t
# doesn't have one.
arpa/inet.h:
test -d arpa || mkdir arpa
+ rm -f $@-t $@
echo '#include <sys/socket.h>' >$@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
MOSTLYCLEANDIRS += arpa
# We need the following in order to create <byteswap.h> when the system
# doesn't have one.
byteswap.h: byteswap_.h
+ rm -f $@-t $@
cp $(srcdir)/byteswap_.h $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += byteswap.h byteswap.h-t
#
# Listed in the same order as the GNU makefile conventions.
configmake.h: Makefile
+ rm -f $@-t $@
( \
echo '#define PREFIX "$(prefix)"'; \
echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
echo '#define MANDIR "$(mandir)"'; \
echo '#define MANEXT "$(manext)"'; \
:) | sed '/""/d' >$@-t
+ chmod a-x $@-t
mv $@-t $@
BUILT_SOURCES += configmake.h
CLEANFILES += configmake.h configmake.h-t
# We need the following in order to create <fcntl.h> when the system
# doesn't have one that works with the given compiler.
fcntl.h: fcntl_.h
+ rm -f $@-t $@
sed -e 's|@''ABSOLUTE_FCNTL_H''@|$(ABSOLUTE_FCNTL_H)|g' \
< $(srcdir)/fcntl_.h > $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += fcntl.h fcntl.h-t
# We need the following in order to create <fnmatch.h> when the system
# doesn't have one that supports the required API.
fnmatch.h: fnmatch_.h
+ rm -f $@-t $@
cp $(srcdir)/fnmatch_.h $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
getopt.h: getopt_.h
+ rm -f $@-t $@
cp $(srcdir)/getopt_.h $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += getopt.h getopt.h-t
# We need the following in order to create <glob.h> when the system
# doesn't have one that works with the given compiler.
glob.h: glob_.h
+ rm -f $@-t $@
cp $(srcdir)/glob_.h $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += glob.h glob.h-t
# We need the following in order to create <inttypes.h> when the system
# doesn't have one that works with the given compiler.
inttypes.h: inttypes_.h
+ rm -f $@-t $@
sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's|@''ABSOLUTE_INTTYPES_H''@|$(ABSOLUTE_INTTYPES_H)|g' \
-e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
-e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
-e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
< $(srcdir)/inttypes_.h > $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += inttypes.h inttypes.h-t
fi
charset.alias: config.charset
+ rm -f t-$@ $@
$(SHELL) $(srcdir)/config.charset '$(host)' > t-$@
+ chmod a-x t-$@
mv t-$@ $@
SUFFIXES += .sed .sin
.sin.sed:
+ rm -f t-$@ $@
sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
+ chmod a-x t-$@
mv t-$@ $@
CLEANFILES += charset.alias ref-add.sed ref-del.sed
# doesn't have one.
netinet/in.h:
test -d netinet || mkdir netinet
+ rm -f $@-t $@
echo '#include <sys/socket.h>' >$@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t
MOSTLYCLEANDIRS += netinet
# We need the following in order to create <poll.h> when the system
# doesn't have one.
poll.h: poll_.h
+ rm -f $@-t $@
cp $(srcdir)/poll_.h $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += poll.h poll.h-t
# We need the following in order to create <stdbool.h> when the system
# doesn't have one that works.
stdbool.h: stdbool_.h
+ rm -f $@-t $@
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += stdbool.h stdbool.h-t
# We need the following in order to create <stdint.h> when the system
# doesn't have one that works with the given compiler.
stdint.h: stdint_.h
+ rm -f $@-t $@
sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
< $(srcdir)/stdint_.h > $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += stdint.h stdint.h-t
# doesn't have one that works with the given compiler.
sys/select.h:
test -d sys || mkdir sys
+ rm -f $@-t $@
echo '#include <sys/socket.h>' >$@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += sys/select.h sys/select.h-t
MOSTLYCLEANDIRS += sys
# doesn't have one that works with the given compiler.
sys/socket.h: socket_.h
test -d sys || mkdir sys
+ rm -f $@-t $@
cp $(srcdir)/socket_.h $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
MOSTLYCLEANDIRS += sys
# has one that is incomplete.
sys/stat.h: stat_.h
test -d sys || mkdir sys
+ rm -f $@-t $@
sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
< $(srcdir)/stat_.h > $@-t
+ chmod a-x $@-t
mv $@-t $@
MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
MOSTLYCLEANDIRS += sys
# We need the following in order to create <sysexits.h> when the system
# doesn't have one that works with the given compiler.
sysexits.h: sysexit_.h
- cp $(srcdir)/sysexit_.h sysexits.h-t
- mv sysexits.h-t sysexits.h
+ rm -f $@-t $@
+ cp $(srcdir)/sysexit_.h $@-t
+ chmod a-x $@-t
+ mv $@-t $@
MOSTLYCLEANFILES += sysexits.h sysexits.h-t
Include: