]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* Makefile.am (move_if_change): New. Use it instead of `mv'.
authorAkim Demaille <akim@epita.fr>
Thu, 5 Jul 2001 11:52:20 +0000 (11:52 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 5 Jul 2001 11:52:20 +0000 (11:52 +0000)
(acversion.m4): Name it `$(srcdir)/acversion.m4' to ease broken
Makes' lives.
Reported by Nicolas Joly.

ChangeLog
Makefile.am
Makefile.in

index ce00217b4e96ad3e012b0f51bf81312f669f3d19..8485110fd12d5a2b75cf2ef7778b95f94addeffa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-05  Akim Demaille  <akim@epita.fr>
+
+       * Makefile.am (move_if_change): New.  Use it instead of `mv'.
+       (acversion.m4): Name it `$(srcdir)/acversion.m4' to ease broken
+       Makes' lives.
+       Reported by Nicolas Joly.
+
 2001-07-04  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (_AC_RUN_IFELSE): Remove conftest.o when cleaning
index ad69002fafe59bb703e069c75ed2e5b7e658ed57..34146a70617901485ff10e385d7ec4e7e133bc33 100644 (file)
@@ -65,6 +65,8 @@ CLEANFILES = autoconf.m4f \
 ## Maintainer rules.  ##
 ## ------------------ ##
 
+move_if_change = $(top_srcdir)/config/move-if-change
+
 ## acversion.m4.  ##
 
 # - acversion.m4 needs to be updated only once, since it depends on
@@ -72,10 +74,12 @@ CLEANFILES = autoconf.m4f \
 # - It is guaranteed (with GNU Make) that when the version in configure.in
 #   is changed, acversion.m4 is built only after the new version number is
 #   propagated to the Makefile.  (Libtool uses the same guarantee.)
+# - Refer to `$(srcdir)/acversion.m4', not `acversion.m4' to help
+#   broken Makes understand it's the same file.
 
-acversion.m4: $(srcdir)/acversion.in $(srcdir)/configure.in
+$(srcdir)/acversion.m4: $(srcdir)/acversion.in $(srcdir)/configure.in
        sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/acversion.in >acversion.tm4
-       mv acversion.tm4 $(srcdir)/acversion.m4
+       $(move_if_change) acversion.tm4 $(srcdir)/acversion.m4
 
 ## INSTALL.  ##
 
@@ -134,37 +138,37 @@ autoconf: $(srcdir)/autoconf.in $(srcdir)/configure.in
        rm -f autoconf autoconf.tmp
        $(edit) $(srcdir)/autoconf.in >autoconf.tmp
        chmod +x autoconf.tmp
-       mv autoconf.tmp autoconf
+       $(move_if_change) autoconf.tmp autoconf
 
 autoheader: $(srcdir)/autoheader.in $(srcdir)/configure.in
        rm -f autoheader autoheader.tmp
        $(edit) $(srcdir)/autoheader.in >autoheader.tmp
        chmod +x autoheader.tmp
-       mv autoheader.tmp autoheader
+       $(move_if_change) autoheader.tmp autoheader
 
 autoreconf: $(srcdir)/autoreconf.in $(srcdir)/configure.in
        rm -f autoreconf autoreconf.tmp
        $(edit) $(srcdir)/autoreconf.in >autoreconf.tmp
        chmod +x autoreconf.tmp
-       mv autoreconf.tmp autoreconf
+       $(move_if_change) autoreconf.tmp autoreconf
 
 autoupdate: $(srcdir)/autoupdate.in $(srcdir)/configure.in
        rm -f autoupdate autoupdate.tmp
        $(edit) $(srcdir)/autoupdate.in >autoupdate.tmp
        chmod +x autoupdate.tmp
-       mv autoupdate.tmp autoupdate
+       $(move_if_change) autoupdate.tmp autoupdate
 
 ifnames: $(srcdir)/ifnames.in $(srcdir)/configure.in
        rm -f ifnames ifnames.tmp
        $(edit) $(srcdir)/ifnames.in >ifnames.tmp
        chmod +x ifnames.tmp
-       mv ifnames.tmp ifnames
+       $(move_if_change) ifnames.tmp ifnames
 
 autoscan: $(srcdir)/autoscan.in $(srcdir)/configure.in
        rm -f autoscan autoscan.tmp
        $(edit) $(srcdir)/autoscan.in >autoscan.tmp
        chmod +x autoscan.tmp
-       mv autoscan.tmp autoscan
+       $(move_if_change) autoscan.tmp autoscan
 
 
 ## ------------------ ##
index 6d4ff03a0ce64db2ec1ff7dbc776faf01e518136..4858b957c0449e61977953dcf3440e82e2918978 100644 (file)
@@ -101,12 +101,12 @@ EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2              BUGS INSTALL.txt
 CLEANFILES = autoconf.m4f              $(bin_SCRIPTS)
 
 
+move_if_change = $(srcdir)/config/move-if-change
+
 MAINTAINERCLEANFILES = acversion.m4 INSTALL.txt
 
 edit = sed     -e 's,@SHELL\@,$(SHELL),g'      -e 's,@PERL\@,$(PERL),g'        -e 's,@datadir\@,$(pkgdatadir),g'       -e 's,@bindir\@,$(bindir),g'    -e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g'        -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g'    -e 's,@M4\@,$(M4),g'    -e 's,@AWK\@,$(AWK),g'  -e 's,@VERSION\@,$(VERSION),g'  -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
 
-
-move_if_change = $(srcdir)/config/move-if-change
 prev_version_file = $(srcdir)/config/prev-version.txt
 
 # Uploading betas.
@@ -425,10 +425,12 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 # - It is guaranteed (with GNU Make) that when the version in configure.in
 #   is changed, acversion.m4 is built only after the new version number is
 #   propagated to the Makefile.  (Libtool uses the same guarantee.)
+# - Refer to `$(srcdir)/acversion.m4', not `acversion.m4' to help
+#   broken Makes understand it's the same file.
 
-acversion.m4: $(srcdir)/acversion.in $(srcdir)/configure.in
+$(srcdir)/acversion.m4: $(srcdir)/acversion.in $(srcdir)/configure.in
        sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/acversion.in >acversion.tm4
-       mv acversion.tm4 $(srcdir)/acversion.m4
+       $(move_if_change) acversion.tm4 $(srcdir)/acversion.m4
 
 # INSTALL is a special case.  Automake seems to have a single name space
 # for both targets and variables.  If we just use INSTALL, then the var
@@ -455,37 +457,37 @@ autoconf: $(srcdir)/autoconf.in $(srcdir)/configure.in
        rm -f autoconf autoconf.tmp
        $(edit) $(srcdir)/autoconf.in >autoconf.tmp
        chmod +x autoconf.tmp
-       mv autoconf.tmp autoconf
+       $(move_if_change) autoconf.tmp autoconf
 
 autoheader: $(srcdir)/autoheader.in $(srcdir)/configure.in
        rm -f autoheader autoheader.tmp
        $(edit) $(srcdir)/autoheader.in >autoheader.tmp
        chmod +x autoheader.tmp
-       mv autoheader.tmp autoheader
+       $(move_if_change) autoheader.tmp autoheader
 
 autoreconf: $(srcdir)/autoreconf.in $(srcdir)/configure.in
        rm -f autoreconf autoreconf.tmp
        $(edit) $(srcdir)/autoreconf.in >autoreconf.tmp
        chmod +x autoreconf.tmp
-       mv autoreconf.tmp autoreconf
+       $(move_if_change) autoreconf.tmp autoreconf
 
 autoupdate: $(srcdir)/autoupdate.in $(srcdir)/configure.in
        rm -f autoupdate autoupdate.tmp
        $(edit) $(srcdir)/autoupdate.in >autoupdate.tmp
        chmod +x autoupdate.tmp
-       mv autoupdate.tmp autoupdate
+       $(move_if_change) autoupdate.tmp autoupdate
 
 ifnames: $(srcdir)/ifnames.in $(srcdir)/configure.in
        rm -f ifnames ifnames.tmp
        $(edit) $(srcdir)/ifnames.in >ifnames.tmp
        chmod +x ifnames.tmp
-       mv ifnames.tmp ifnames
+       $(move_if_change) ifnames.tmp ifnames
 
 autoscan: $(srcdir)/autoscan.in $(srcdir)/configure.in
        rm -f autoscan autoscan.tmp
        $(edit) $(srcdir)/autoscan.in >autoscan.tmp
        chmod +x autoscan.tmp
-       mv autoscan.tmp autoscan
+       $(move_if_change) autoscan.tmp autoscan
 
 # When processing the file with diversion disabled, there must be no
 # output but comments and empty lines.