bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS autoconf small problems when srcdir != builddir


From: Akim Demaille
Subject: Re: CVS autoconf small problems when srcdir != builddir
Date: 05 Jul 2001 13:59:47 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor)

>>>>> "Nicolas" == Nicolas Joly <address@hidden> writes:

Nicolas> The problem is that Tru64 `make' do not that `acversion.m4'
Nicolas> and `$(srcdir)/acversion.m4' are the same when srcdir == `.'

Thanks Nicolas.  I trust you, and will apply the patch below.  But I
must say I don't understand too well: afaic acversion.m4, when used,
is referred to as acversion.m4, not $(srcdir)/acversion.m4.
Therefore, how come it's not the opposite that is needed?

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * 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.

Index: Makefile.am
===================================================================
RCS file: /cvs/autoconf/Makefile.am,v
retrieving revision 1.57
diff -u -u -r1.57 Makefile.am
--- Makefile.am 2001/07/03 14:12:40 1.57
+++ Makefile.am 2001/07/05 11:50:10
@@ -65,6 +65,8 @@
 ## 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 @@
 # - 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 @@
        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: Makefile.in
===================================================================
RCS file: /cvs/autoconf/Makefile.in,v
retrieving revision 1.139
diff -u -u -r1.139 Makefile.in
--- Makefile.in 2001/07/03 14:12:40 1.139
+++ Makefile.in 2001/07/05 11:50:10
@@ -101,12 +101,12 @@
 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 @@
 # - 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 @@
        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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]