[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix distcheck, maintainer-clean, circular dependency
From: |
Noah Misch |
Subject: |
Fix distcheck, maintainer-clean, circular dependency |
Date: |
Wed, 8 Dec 2004 23:23:52 -0800 |
User-agent: |
Mutt/1.5.6i |
This has shown up on `make check' for some time now:
make[2]: Circular ../tests/autom4te <- ../../tests/wrapper.in dependency
dropped.
Indeed, $(top_builddir)/tests/autom4te is a wrapper generated from wrapper.in at
configure time, and that wrapper regenerates wrapper.in from wrapper.as later in
the build. Autoconf will not configure after a `make maintainer-clean' deletes
wrapper.in, and regenerating wrapper.in in the source tree upsets distcheck.
This patch removes tests/autom4te usage outside running the test suite and
manually wraps the uninstalled autom4te from within makefiles. It moves
generating wrapper.in to build time and generates the wrapper scripts in
tests/Makefile.am instead of config.status. This eliminates the circular
dependency, maintainer-clean breakage, and distcheck complaints.
In the same vein, the build always regenerates autoconf.in from autoconf.as, yet
we distribute both. distcheck dislikes that just as much, so stop it. With
this and my just-posted installcheck patch, autoconf CVS now passes `make
distcheck' on i686-pc-linux-gnu.
If you commit this patch, cvs rm bin/autoconf.in and tests/wrapper.in. Please
also regenerate and commit at least configure, and optionally the Makefile.in.
If you want a patch that includes regenerations, let me know.
2004-12-08 Noah Misch <address@hidden>
* configure.ac (test suite): Cease to generate wrapper scripts.
* configure: Regenerate.
* lib/freeze.mk (MY_AUTOM4TE): Wrap the uninstalled autom4te directly.
(m4f_dependencies): Adjust accordingly.
* tests/Makefile.am (Wrappers): Generate wrapper scripts.
(wrapper.in): Generate it in the build directory.
(MAINTAINERCLEANFILES): Delete wrapper.in.
(CLEANFILES): Add wrapper.in.
* tests/wrapper.as: Move AS_INIT to very top, preserving copyright in
the output. Replace each $as_me with a @address@hidden
* tests/wrapper.in: Delete it; we always build it.
* bin/Makefile.am (autoconf.in): Generate it in the build directory.
(EXTRA_DIST): Remove autoconf.in.
(CLEANFILES): Add autoconf.in.
(autoconf): Find autoconf.in in the build directory.
* bin/autoconf.in: Delete it; we always build it.
diff -urp -X dontdiff --exclude=NEWS ac-clean/bin/Makefile.am
ac-circ2/bin/Makefile.am
--- ac-clean/bin/Makefile.am 2004-03-03 16:40:46.000000000 -0500
+++ ac-circ2/bin/Makefile.am 2004-12-08 17:45:12.181800890 -0500
@@ -25,12 +25,11 @@ include ../lib/freeze.mk
bin_SCRIPTS = autom4te \
autoconf autoheader autoreconf ifnames autoscan autoupdate
-EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \
- autoscan.in autom4te.in \
- autoconf.as
+EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \
+ autoscan.in autom4te.in
# Files that should be removed, but which Automake does not know.
-CLEANFILES = $(bin_SCRIPTS)
+CLEANFILES = $(bin_SCRIPTS) autoconf.in
## ------------- ##
@@ -53,18 +52,17 @@ edit = sed \
-e 's,@configure_input\@,Generated from address@hidden; do not edit by
hand.,g'
# autoconf is written in M4sh.
-AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh --cache ''
-$(srcdir)/autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
- $(AUTOM4SH) $(srcdir)/autoconf.as -o $@
+autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
+ $(MY_AUTOM4TE) --language M4sh --cache '' $(srcdir)/autoconf.as -o $@
## All the files below depend on Makefile so that they are rebuilt
## when the prefix etc. changes. It took quite a while to have these
## rules correct, don't break them! In particular, we believe there is
## no solution to factor the code.
## Use chmod -w to prevent people from editing the wrong file by accident.
-autoconf: $(srcdir)/autoconf.in Makefile
+autoconf: autoconf.in Makefile
rm -f autoconf autoconf.tmp
- $(edit) $(srcdir)/autoconf.in >autoconf.tmp
+ $(edit) autoconf.in >autoconf.tmp
chmod +x autoconf.tmp
chmod a-w autoconf.tmp
mv -f autoconf.tmp autoconf
diff -urp -X dontdiff --exclude=NEWS ac-clean/configure.ac ac-circ2/configure.ac
--- ac-clean/configure.ac 2004-08-20 20:10:25.000000000 -0400
+++ ac-circ2/configure.ac 2004-12-08 15:17:39.538234782 -0500
@@ -75,23 +75,9 @@ rm conftest.sh
])
AC_SUBST(ac_cv_sh_n_works)
-# Initialize the test suite and build position independent wrappers.
+# Initialize the test suite.
AC_CONFIG_TESTDIR([tests])
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
-AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
- [chmod +x tests/autoconf])
-AC_CONFIG_FILES([tests/autoheader:tests/wrapper.in],
- [chmod +x tests/autoheader])
-AC_CONFIG_FILES([tests/autom4te:tests/wrapper.in],
- [chmod +x tests/autom4te])
-AC_CONFIG_FILES([tests/autoreconf:tests/wrapper.in],
- [chmod +x tests/autoreconf])
-AC_CONFIG_FILES([tests/autoscan:tests/wrapper.in],
- [chmod +x tests/autoscan])
-AC_CONFIG_FILES([tests/autoupdate:tests/wrapper.in],
- [chmod +x tests/autoupdate])
-AC_CONFIG_FILES([tests/ifnames:tests/wrapper.in],
- [chmod +x tests/ifnames])
AC_PATH_PROG([EXPR], [expr])
diff -urp -X dontdiff --exclude=NEWS ac-clean/lib/freeze.mk
ac-circ2/lib/freeze.mk
--- ac-clean/lib/freeze.mk 2004-05-03 02:20:09.000000000 -0400
+++ ac-circ2/lib/freeze.mk 2004-12-08 16:09:20.054961129 -0500
@@ -24,18 +24,19 @@
SUFFIXES = .m4 .m4f
-# Do not use AUTOM4TE here, since Makefile.maint (my-distcheck)
-# checks if we are independent of Autoconf by defining AUTOM4TE (and
-# others) to `false'. But we _ship_ tests/autom4te, so it doesn't
-# apply to us.
-MY_AUTOM4TE = $(top_builddir)/tests/autom4te
-$(MY_AUTOM4TE): $(top_srcdir)/tests/wrapper.in
- cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te
-
AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg
$(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in
cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg
+# Do not use AUTOM4TE here, since Makefile.maint (my-distcheck)
+# checks if we are independent of Autoconf by defining AUTOM4TE (and
+# others) to `false'. Autoconf provides autom4te, so that doesn't
+# apply to us.
+MY_AUTOM4TE =
\
+ autom4te_perllibdir='$(top_srcdir)'/lib
\
+ AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te
\
+ -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep `
'
+
# When processing the file with diversion disabled, there must be no
# output but comments and empty lines.
# If freezing produces output, something went wrong: a bad `divert',
@@ -54,7 +55,7 @@ $(AUTOM4TE_CFG): $(top_srcdir)/lib/autom
src_libdir = $(top_srcdir)/lib
build_libdir = $(top_builddir)/lib
-m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG)
+m4f_dependencies = $(top_builddir)/bin/autom4te $(AUTOM4TE_CFG)
# For parallel builds.
$(build_libdir)/m4sugar/version.m4:
diff -urp -X dontdiff --exclude=NEWS ac-clean/tests/Makefile.am
ac-circ2/tests/Makefile.am
--- ac-clean/tests/Makefile.am 2004-05-24 19:29:43.000000000 -0400
+++ ac-circ2/tests/Makefile.am 2004-12-08 17:15:04.670658105 -0500
@@ -53,10 +53,24 @@ $(srcdir)/package.m4: $(top_srcdir)/conf
## Wrappers. ##
## ---------- ##
-MAINTAINERCLEANFILES += $(srcdir)/wrapper.in
+wrappers = autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames
+CLEANFILES = wrapper.in $(wrappers)
-$(srcdir)/wrapper.in: $(srcdir)/wrapper.as $(m4sh_m4f_dependencies)
- ./autom4te --language=M4sh $(srcdir)/wrapper.as -o $@
+wrapper.in: $(srcdir)/wrapper.as $(m4sh_m4f_dependencies)
+ $(MY_AUTOM4TE) --language=M4sh $(srcdir)/wrapper.as -o $@
+
+edit = sed \
+ -e 's,@wrap_program\@,$@,g' \
+ -e 's,@abs_top_srcdir\@,@abs_top_srcdir@,g' \
+ -e 's,@abs_top_builddir\@,@abs_top_builddir@,g' \
+ -e 's,@configure_input\@,Generated from $<.,g'
+
+$(wrappers): wrapper.in
+ rm -f $@ address@hidden
+ $(edit) wrapper.in >address@hidden
+ chmod +x address@hidden
+ chmod a-w address@hidden
+ mv -f address@hidden $@
@@ -145,7 +159,7 @@ $(TESTSUITE_GENERATED_AT): mktests.sh $(
maintainer-check: maintainer-check-posix maintainer-check-c++
# The hairy heredoc is more robust than using echo.
-CLEANFILES = expr
+CLEANFILES += expr
expr:
echo '#! $(SHELL)' >expr
echo 'address@hidden@ "$$@"`' >>expr
diff -urp -X dontdiff --exclude=NEWS ac-clean/tests/wrapper.as
ac-circ2/tests/wrapper.as
--- ac-clean/tests/wrapper.as 2004-08-20 02:22:43.000000000 -0400
+++ ac-circ2/tests/wrapper.as 2004-12-08 16:18:38.230862993 -0500
@@ -1,4 +1,5 @@
-# wrapper.as -- running `$0' as if it were installed. -*- shell-script -*-
+AS_INIT[]dnl -*- shell-script -*-
+# wrapper.as -- running address@hidden@' as if it were installed.
# @configure_input@
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
@@ -17,8 +18,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-AS_INIT[]dnl
-
testdir='@abs_top_builddir@/tests'
AUTOCONF=$testdir/autoconf
AUTOHEADER=$testdir/autoheader
@@ -27,16 +26,16 @@ AUTOM4TE_CFG='@abs_top_builddir@/lib/aut
autom4te_perllibdir='@abs_top_srcdir@/lib'
export AUTOCONF AUTOHEADER AUTOM4TE AUTOM4TE_CFG autom4te_perllibdir
-case $as_me in
+case '@wrap_program@' in
ifnames)
# Does not have lib files.
- exec '@abs_top_builddir@'/bin/$as_me ${1+"$@"}
+ exec '@abs_top_builddir@/bin/@wrap_program@' ${1+"$@"}
;;
*)
# We might need files from the build tree (frozen files), in
# addition of src files.
- exec '@abs_top_builddir@'/bin/$as_me \
+ exec '@abs_top_builddir@/bin/@wrap_program@' \
-B '@abs_top_builddir@'/lib \
- -B '@abs_top_srcdir@/lib' ${1+"$@"}
+ -B '@abs_top_srcdir@'/lib ${1+"$@"}
esac
exit 1
- Fix distcheck, maintainer-clean, circular dependency,
Noah Misch <=