[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Building autoconf etc.
From: |
Akim Demaille |
Subject: |
Building autoconf etc. |
Date: |
05 Sep 2002 11:41:27 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* bin/Makefile.am (autoconf, autoheader, autoreconf, autoupdate)
(ifnames, autoscan, autom4te): Since we don't only depend on
configure.ac variables (such as VERSION etc.), but also on prefix
and so forth, depend on Makefile, not configure.ac.
Reported by Alexandre Duret-Lutz.
* doc/autoconf.texi (Installation Directory Variables): Adjust.
Index: bin/Makefile.am
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/Makefile.am,v
retrieving revision 1.7
diff -u -u -r1.7 Makefile.am
--- bin/Makefile.am 3 Sep 2002 06:09:30 -0000 1.7
+++ bin/Makefile.am 5 Sep 2002 09:35:02 -0000
@@ -52,52 +52,16 @@
$(srcdir)/autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
$(AUTOM4SH) $(srcdir)/autoconf.as -o $@
-## All the files below depend on configure.ac so that they are rebuilt
-## when the Autoconf version changes. Unfortunately, suffix rules cannot
-## have additional dependencies, so we have to use explicit rules.
+## All the files below depend on Makefile so that they are rebuilt
+## when the prefix etc. changes.
+SUFFIXES = .in
+autoconf autoheader autoreconf autoupdate ifnames autoscan autom4te: Makefile
+.in:
+ rm -f $@ address@hidden
+ $(edit) $< >address@hidden
+ chmod +x address@hidden
+ mv address@hidden $@
-
-autoconf: $(srcdir)/autoconf.in $(top_srcdir)/configure.ac
- rm -f autoconf autoconf.tmp
- $(edit) $(srcdir)/autoconf.in >autoconf.tmp
- chmod +x autoconf.tmp
- mv autoconf.tmp autoconf
-
-autoheader: $(srcdir)/autoheader.in $(top_srcdir)/configure.ac
- rm -f autoheader autoheader.tmp
- $(edit) $(srcdir)/autoheader.in >autoheader.tmp
- chmod +x autoheader.tmp
- mv autoheader.tmp autoheader
-
-autoreconf: $(srcdir)/autoreconf.in $(top_srcdir)/configure.ac
- rm -f autoreconf autoreconf.tmp
- $(edit) $(srcdir)/autoreconf.in >autoreconf.tmp
- chmod +x autoreconf.tmp
- mv autoreconf.tmp autoreconf
-
-autoupdate: $(srcdir)/autoupdate.in $(top_srcdir)/configure.ac
- rm -f autoupdate autoupdate.tmp
- $(edit) $(srcdir)/autoupdate.in >autoupdate.tmp
- chmod +x autoupdate.tmp
- mv autoupdate.tmp autoupdate
-
-ifnames: $(srcdir)/ifnames.in $(top_srcdir)/configure.ac
- rm -f ifnames ifnames.tmp
- $(edit) $(srcdir)/ifnames.in >ifnames.tmp
- chmod +x ifnames.tmp
- mv ifnames.tmp ifnames
-
-autoscan: $(srcdir)/autoscan.in $(top_srcdir)/configure.ac
- rm -f autoscan autoscan.tmp
- $(edit) $(srcdir)/autoscan.in >autoscan.tmp
- chmod +x autoscan.tmp
- mv autoscan.tmp autoscan
-
-autom4te: $(srcdir)/autom4te.in $(top_srcdir)/configure.ac
- rm -f autom4te autom4te.tmp
- $(edit) $(srcdir)/autom4te.in >autom4te.tmp
- chmod +x autom4te.tmp
- mv autom4te.tmp autom4te
## --------------- ##
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.664
diff -u -u -r1.664 autoconf.texi
--- doc/autoconf.texi 4 Sep 2002 23:24:11 -0000 1.664
+++ doc/autoconf.texi 5 Sep 2002 09:35:12 -0000
@@ -2232,18 +2232,27 @@
Similarly you should not rely on @code{AC_OUTPUT_FILES} to replace
@code{datadir} and friends in your shell scripts and other files, rather
let @command{make} manage their replacement. For instance Autoconf
-ships templates of its shell scripts ending with @samp{.sh}, and uses
-this Makefile snippet:
+ships templates of its shell scripts ending with @samp{.in}, and uses
+a Makefile snippet similar to:
@example
-.sh:
address@hidden
+edit = sed \
+ -e 's,@@datadir\@@,$(pkgdatadir),g' \
+ -e 's,@@prefix\@@,$(prefix),g'
address@hidden group
+
+autoconf autoheader: Makefile
address@hidden
+.in:
rm -f $@@ $@@.tmp
- sed 's,@@datadir\@@,$(pkgdatadir),g' $< >$@@.tmp
+ $(edit) $< >$@@.tmp
chmod +x $@@.tmp
mv $@@.tmp $@@
address@hidden group
@end example
-Three things are noteworthy:
+Five details are noteworthy:
@table @samp
@item @@datadir\@@
@@ -2258,6 +2267,22 @@
Don't use @samp{/} in the sed expression(s) since most probably the
variables you use, such as @samp{$(pkgdatadir)}, will contain
some.
+
address@hidden Dependency on @file{Makefile}
+Since @code{edit} uses values that depend on the configuration specific
+values (@code{prefix} etc.) and not only on @code{VERSION} and so forth,
+the output depends on @file{Makefile}, not @file{configure.ac}.
+
address@hidden Separated dependency
+Don't write
+
address@hidden
+.in: Makefile
+ @dots{}
address@hidden example
+
address@hidden
+unless you really mean to create the file @file{.in} from @file{Makefile}.
@end table
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Building autoconf etc.,
Akim Demaille <=