* doc/autoconf.texi (Installation Directory Variables): Update.
(Limitations of Make): Some about `Single Suffix Rules and
Separated Dependencies'.
* bin/Makefile.am (autoconf, autoheader, autoreconf, autoupdate)
(ifnames, autoscan, autom4te): Un-factor into several rules.
+2002-09-26 Akim Demaille <akim@epita.fr>
+
+ Single suffix rules and seperated dependencies are not portable.
+
+ * doc/autoconf.texi (Installation Directory Variables): Update.
+ (Limitations of Make): Some about `Single Suffix Rules and
+ Separated Dependencies'.
+ * bin/Makefile.am (autoconf, autoheader, autoreconf, autoupdate)
+ (ifnames, autoscan, autom4te): Un-factor into several rules.
+
2002-09-25 Paul Eggert <eggert@twinsun.com>
* BUGS (Interoperability bugs): New section. Mention libtool
* Major changes in Autoconf 2.54a -*- outline -*-
\f
+
+** Bug Fixes
+
+- Portability of the Autoconf package to Solaris.
+
* Major changes in Autoconf 2.54
Released September 13th, 2002.
## All the files below depend on Makefile so that they are rebuilt
## when the prefix etc. changes.
-autoconf autoheader autoreconf autoupdate ifnames autoscan autom4te: Makefile
- rm -f $@ $@.tmp
- $(edit) $@.in >$@.tmp
- chmod +x $@.tmp
- mv $@.tmp $@
+autoconf: autoconf.in Makefile
+ rm -f autoconf autoconf.tmp
+ $(edit) autoconf.in >autoconf.tmp
+ chmod +x autoconf.tmp
+ mv autoconf.tmp autoconf
+
+autoheader: autoheader.in Makefile
+ rm -f autoheader autoheader.tmp
+ $(edit) autoheader.in >autoheader.tmp
+ chmod +x autoheader.tmp
+ mv autoheader.tmp autoheader
+
+autom4te: autom4te.in Makefile
+ rm -f autom4te autom4te.tmp
+ $(edit) autom4te.in >autom4te.tmp
+ chmod +x autom4te.tmp
+ mv autom4te.tmp autom4te
+
+autoreconf: autoreconf.in Makefile
+ rm -f autoreconf autoreconf.tmp
+ $(edit) autoreconf.in >autoreconf.tmp
+ chmod +x autoreconf.tmp
+ mv autoreconf.tmp autoreconf
+
+autoscan: autoscan.in Makefile
+ rm -f autoscan autoscan.tmp
+ $(edit) autoscan.in >autoscan.tmp
+ chmod +x autoscan.tmp
+ mv autoscan.tmp autoscan
+
+autoupdate: autoupdate.in Makefile
+ rm -f autoupdate autoupdate.tmp
+ $(edit) autoupdate.in >autoupdate.tmp
+ chmod +x autoupdate.tmp
+ mv autoupdate.tmp autoupdate
+
+ifnames: ifnames.in Makefile
+ rm -f ifnames ifnames.tmp
+ $(edit) ifnames.in >ifnames.tmp
+ chmod +x ifnames.tmp
+ mv ifnames.tmp ifnames
# autoconf is written in M4sh.
AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh
-SUFFIXES = .in
-
TAGS_DEPENDENCIES = $(EXTRA_DIST)
letters = abcdefghijklmnopqrstuvwxyz
all: all-am
.SUFFIXES:
-.SUFFIXES: .in
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu bin/Makefile
$(srcdir)/autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
$(AUTOM4SH) $(srcdir)/autoconf.as -o $@
-autoconf autoheader autoreconf autoupdate ifnames autoscan autom4te: Makefile
-.in:
- rm -f $@ $@.tmp
- $(edit) $< >$@.tmp
- chmod +x $@.tmp
- mv $@.tmp $@
+
+autoconf: autoconf.in Makefile
+ rm -f autoconf autoconf.tmp
+ $(edit) autoconf.in >autoconf.tmp
+ chmod +x autoconf.tmp
+ mv autoconf.tmp autoconf
+
+autoheader: autoheader.in Makefile
+ rm -f autoheader autoheader.tmp
+ $(edit) autoheader.in >autoheader.tmp
+ chmod +x autoheader.tmp
+ mv autoheader.tmp autoheader
+
+autom4te: autom4te.in Makefile
+ rm -f autom4te autom4te.tmp
+ $(edit) autom4te.in >autom4te.tmp
+ chmod +x autom4te.tmp
+ mv autom4te.tmp autom4te
+
+autoreconf: autoreconf.in Makefile
+ rm -f autoreconf autoreconf.tmp
+ $(edit) autoreconf.in >autoreconf.tmp
+ chmod +x autoreconf.tmp
+ mv autoreconf.tmp autoreconf
+
+autoscan: autoscan.in Makefile
+ rm -f autoscan autoscan.tmp
+ $(edit) autoscan.in >autoscan.tmp
+ chmod +x autoscan.tmp
+ mv autoscan.tmp autoscan
+
+autoupdate: autoupdate.in Makefile
+ rm -f autoupdate autoupdate.tmp
+ $(edit) autoupdate.in >autoupdate.tmp
+ chmod +x autoupdate.tmp
+ mv autoupdate.tmp autoupdate
+
+ifnames: ifnames.in Makefile
+ rm -f ifnames ifnames.tmp
+ $(edit) ifnames.in >ifnames.tmp
+ chmod +x ifnames.tmp
+ mv ifnames.tmp ifnames
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-e 's,@@prefix\@@,$(prefix),g'
@end group
-autoconf autoheader: Makefile
@group
-.in:
- rm -f $@@ $@@.tmp
- $(edit) $< >$@@.tmp
- chmod +x $@@.tmp
- mv $@@.tmp $@@
+autoconf: Makefile autoconf.in
+ rm -f autoconf autoconf.tmp
+ $(edit) $< >autoconf.tmp
+ chmod +x autoconf.tmp
+ mv autoconf.tmp autoconf
+@end group
+
+@group
+autoheader: Makefile autoheader.in
+ rm -f autoheader autoheader.tmp
+ $(edit) $< >autoheader.tmp
+ chmod +x autoheader.tmp
+ mv autoheader.tmp autoheader
@end group
@end example
-Five details are noteworthy:
+Some details are noteworthy:
@table @samp
@item @@datadir\@@
values (@code{prefix} etc.) and not only on @code{VERSION} and so forth,
the output depends on @file{Makefile}, not @file{configure.ac}.
-@item Separated dependency
-Don't write
+@item Separated dependencies and Single Suffix Rules
+You can't use them! The above snippet cannot be (portably) rewritten
+as:
@example
-.in: Makefile
- @dots{}
+autoconf autoheader: Makefile
+@group
+.in:
+ rm -f $@@ $@@.tmp
+ $(edit) $< >$@@.tmp
+ chmod +x $@@.tmp
+ mv $@@.tmp $@@
+@end group
@end example
-@noindent
-unless you really mean to create the file @file{.in} from @file{Makefile}.
+@xref{Limitations of Make}, for details.
@end table
@cindex Configuration Header
@cindex @file{config.h}
-When a package contains more than a few tests that define C preprocessor symbols, the command
-lines to pass @option{-D} options to the compiler can get quite long.
-This causes two problems. One is that the @command{make} output is hard to
-visually scan for errors. More seriously, the command lines can exceed
-the length limits of some operating systems. As an alternative to
-passing @option{-D} options to the compiler, @command{configure} scripts can
-create a C header file containing @samp{#define} directives. The
-@code{AC_CONFIG_HEADERS} macro selects this kind of output. It should
-be called right after @code{AC_INIT}.
+When a package contains more than a few tests that define C preprocessor
+symbols, the command lines to pass @option{-D} options to the compiler
+can get quite long. This causes two problems. One is that the
+@command{make} output is hard to visually scan for errors. More
+seriously, the command lines can exceed the length limits of some
+operating systems. As an alternative to passing @option{-D} options to
+the compiler, @command{configure} scripts can create a C header file
+containing @samp{#define} directives. The @code{AC_CONFIG_HEADERS}
+macro selects this kind of output. It should be called right after
+@code{AC_INIT}.
The package should @samp{#include} the configuration header file before
any other header files, to prevent inconsistencies in declarations (for
% @kbd{pmake} # BSD make
cp ../bar.x bar.y
@end example
-
@end table
+@c end item about VPATH
+
+@item Single Suffix Rules and Separated Dependencies
+@cindex Single Suffix Inference Rule
+@cindex Rule, Single Suffix Inference
+A @dfn{Single Suffix Rule} is basically a usual suffix (inference) rule
+(@samp{.from.to:}), but which @emph{destination} suffix is empty
+(@samp{.from:}).
+
+@cindex Separated Dependencies
+@dfn{Separated dependencies} simply refers to listing the prerequisite
+of a target, without defining a rule. Usually one can list on the one
+hand side, the rules, and on the other hand side, the dependencies.
+
+Solaris @command{make} does not support separated dependencies for
+targets defined by single suffix rules:
+
+@example
+$ @kbd{cat Makefile}
+.SUFFIXES: .in
+foo: foo.in
+.in:
+ cp $< $@
+$ @kbd{touch foo.in}
+$ @kbd{make}
+$ @kbd{ls}
+Makefile foo.in
+@end example
+
+@noindent
+while @acronym{GNU} Make does:
+
+@example
+$ @kbd{gmake}
+cp foo.in foo
+$ @kbd{ls}
+Makefile foo foo.in
+@end example
+
+Note it works without the @samp{foo: foo.in} dependency.
+
+@example
+$ @kbd{cat Makefile}
+.SUFFIXES: .in
+.in:
+ cp $< $@
+$ @kbd{make foo}
+cp foo.in foo
+@end example
+
+@noindent
+and it works with double suffix inference rules:
+
+@example
+$ @kbd{cat Makefile}
+foo.out: foo.in
+.SUFFIXES: .in .out
+.in.out:
+ cp $< $@
+$ @kbd{make}
+cp foo.in foo.out
+@end example
+
+As a result, in such a case, you have to write target rules.
@end table