]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(autoconf, autoheader, configure): Write to $@.tmp
authorDavid MacKenzie <djm@djmnet.org>
Thu, 31 Mar 1994 16:34:43 +0000 (16:34 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Thu, 31 Mar 1994 16:34:43 +0000 (16:34 +0000)
instead of to $@ directly so that after a disk full error, the
targets to not exist.  Otherwise, a subsequent make could
install a corrupt (but not executable) script.
From Jim Meyering.

Makefile.in
doc/Makefile.in

index 987721c84c267dac291661a86049fe531755c0d4..dc16bddaed00b9cb72dd9de393c53a31303dbfba 100644 (file)
@@ -54,12 +54,12 @@ editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''M4''@,$(M4),g'
 all: autoconf autoheader autoconf.info standards.info
 
 autoconf: autoconf.sh
-       rm -f $@
-       $(editsh) $(srcdir)/autoconf.sh > $@ && chmod +x $@
+       rm -f $@ $@.tmp
+       $(editsh) $(srcdir)/autoconf.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
 
 autoheader: autoheader.sh
-       rm -f $@
-       $(editsh) $(srcdir)/autoheader.sh > $@ && chmod +x $@
+       rm -f $@ $@.tmp
+       $(editsh) $(srcdir)/autoheader.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
 
 info: autoconf.info standards.info
 
@@ -107,11 +107,13 @@ config.status: configure
        $(SHELL) config.status --recheck
 configure: configure.in acgeneral.m4 acspecific.m4
        cd $(srcdir); \
-       $(M4) acgeneral.m4 acspecific.m4 configure.in > configure && \
-       chmod +x configure
+       rm -f $@ $@.tmp; \
+       $(M4) acgeneral.m4 acspecific.m4 configure.in > $@.tmp && \
+       mv $@.tmp $@ && \
+       chmod +x $@
 
 clean:
-       rm -f autoconf autoheader
+       rm -f autoconf autoheader *.tmp
        rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
        rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.ma *.mas
 
index 987721c84c267dac291661a86049fe531755c0d4..dc16bddaed00b9cb72dd9de393c53a31303dbfba 100644 (file)
@@ -54,12 +54,12 @@ editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''M4''@,$(M4),g'
 all: autoconf autoheader autoconf.info standards.info
 
 autoconf: autoconf.sh
-       rm -f $@
-       $(editsh) $(srcdir)/autoconf.sh > $@ && chmod +x $@
+       rm -f $@ $@.tmp
+       $(editsh) $(srcdir)/autoconf.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
 
 autoheader: autoheader.sh
-       rm -f $@
-       $(editsh) $(srcdir)/autoheader.sh > $@ && chmod +x $@
+       rm -f $@ $@.tmp
+       $(editsh) $(srcdir)/autoheader.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
 
 info: autoconf.info standards.info
 
@@ -107,11 +107,13 @@ config.status: configure
        $(SHELL) config.status --recheck
 configure: configure.in acgeneral.m4 acspecific.m4
        cd $(srcdir); \
-       $(M4) acgeneral.m4 acspecific.m4 configure.in > configure && \
-       chmod +x configure
+       rm -f $@ $@.tmp; \
+       $(M4) acgeneral.m4 acspecific.m4 configure.in > $@.tmp && \
+       mv $@.tmp $@ && \
+       chmod +x $@
 
 clean:
-       rm -f autoconf autoheader
+       rm -f autoconf autoheader *.tmp
        rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
        rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.ma *.mas