[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix Autotest testsuite [libtool--gary--1.0--patch-59]
From: |
Gary V. Vaughan |
Subject: |
fix Autotest testsuite [libtool--gary--1.0--patch-59] |
Date: |
Wed, 24 Nov 2004 10:40:08 +0000 (GMT) |
User-agent: |
mailnotify/0.6 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Okay to commit?
* Makefile.am: Move Autotest rules from here...
* tests/Makefile.am: ...to here.
* bootstrap: Adjust. Also, create temporary Makefile from
tests/Makefile.am so that bootstrap can create the Autotest
testsuite.
- --
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFBpGUIFRMICSmD1gYRApfXAJ4ih4Nm966ZmQ9iHH2M8mzig3Dm/ACffaZ/
SPgSlcDX+p9fSkFegu7JvYA=
=X9CH
-----END PGP SIGNATURE-----
* looking for address@hidden/libtool--gary--1.0--patch-58 to compare with
* comparing to address@hidden/libtool--gary--1.0--patch-58
M ChangeLog
M Makefile.am
M bootstrap
M tests/Makefile.am
* modified files
Index: Changelog
from Gary V. Vaughan <address@hidden>
* Makefile.am: Move Autotest rules from here...
* tests/Makefile.am: ...to here.
* bootstrap: Adjust. Also, create temporary Makefile from
tests/Makefile.am so that bootstrap can create the Autotest
testsuite.
--- orig/Makefile.am
+++ mod/Makefile.am
@@ -58,6 +58,22 @@
CLEANFILES = libtool libtoolize \
libtoolize.tmp config/ltmain.tmp m4/ltversion.tmp
+## This properly belongs in tests/Makefile.am, but then we would have
+## to pass $(edit) to the submake or, worse, keep two copies of $(edit)
+## in synch, so instead we just build it from this Makefile.am:
+.PHONY: update-package-m4
+update-package-m4: $(top_srcdir)/tests/package.m4
+$(top_srcdir)/tests/package.m4: $(top_srcdir)/configure.ac
+ cd $(top_srcdir); \
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([AT_PACKAGE_NAME], address@hidden@])'; \
+ echo 'm4_define([AT_PACKAGE_TARNAME], address@hidden@])'; \
+ echo 'm4_define([AT_PACKAGE_VERSION], address@hidden@])'; \
+ echo 'm4_define([AT_PACKAGE_STRING], address@hidden@])'; \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], address@hidden@])'; \
+ } | $(edit) > tests/package.m4
+
# These are required by libtoolize and must be executable when installed.
# Since _SCRIPTS gets the program transform applied we make them
# executable by hand
@@ -113,12 +129,12 @@
mv -f m4/ltversion.tmp m4/ltversion.m4
## And for similar reasons, ltmain.sh can't be built from config.status.
-## WARNING: If you edit this rule to change the contents of ltmain.sh,
-## you must `touch $(top_srcdir)/config/ltmain.in' from the
-## shell if you need ltmain.sh to be regenerated. Ideally, we
-## should make this rule depend on Makefile but that will break
-## distcheck (at least) by rebuilding ltmain.sh in the source
-## tree whenever config.status regenerates the Makefile.
+## !WARNING! If you edit this rule to change the contents of ltmain.sh,
+## you must `touch $(top_srcdir)/config/ltmain.in' from the
+## shell if you need ltmain.sh to be regenerated. Ideally, we
+## should make this rule depend on Makefile but that will break
+## distcheck (at least) by rebuilding ltmain.sh in the source
+## tree whenever config.status regenerates the Makefile.
EXTRA_DIST += config/ltmain.sh
$(top_srcdir)/config/ltmain.sh: $(sh_files) config/ltmain.m4sh configure.ac \
$(top_srcdir)/stamp-vcl
@@ -172,6 +188,10 @@
rm -f tests/defs.in; \
$(M4SH) -B ./config tests/defs.m4sh > tests/defs.in
+$(top_srcdir)/tests/testsuite:
+ cd tests; \
+ $(MAKE) $(AM_MAKEFLAGS) testsuite
+
# Automake doesn't want us to generate distributed files from config.status,
# but the alternative (see libtool-1.4.3) was even uglier!
libtool: $(top_builddir)/config.status $(top_srcdir)/config/ltmain.sh \
@@ -186,65 +206,6 @@
abs_srcdir=`cd $(top_srcdir) && pwd`; \
(cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-## Although the Autotest suite is generated by make, we want to distribute
-## a precompiled `$(top_srcdir)/tests/testsuite' so the rules are in this
-## top-level Makefile.am in order that `bootstrap' can compile everything
-## in the source tree; ready for distribution.
-
-TESTSUITE = tests/testsuite
-TESTSUITE_AT = tests/testsuite.at tests/am-subdir.at
-
-EXTRA_DIST += $(TESTSUITE) $(TESTSUITE_AT) tests/package.m4
-
-# Be sure to reexport important environment variables.
-# This is a copy of tests/Makefile.am (TESTS_ENVIRONMENT), be sure to
-# keep them is sync if you change them before those tests are migrated!
-TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
- CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
- LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
- OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" F77="$(F77)" \
- FFLAGS="$(FFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CPP="$(CPP)"
-
-## This is the beginning of the end of the defs.m4sh based tests. For
-## now we run the diminutive new Autotest testsuite first, followed by
-## our legacy tests. The legacy tests will be migrated to Autotest and
-## the majority of the contents of the test subdir will not be needed!
-
-$(top_srcdir)/tests/package.m4: configure.ac
- cd $(top_srcdir); \
- { \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], address@hidden@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], address@hidden@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], address@hidden@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], address@hidden@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], address@hidden@])'; \
- } | $(edit) > tests/package.m4
-
-$(top_srcdir)/$(TESTSUITE): $(top_srcdir)/tests/package.m4 $(TESTSUITE_AT)
- cd $(top_srcdir); \
- $(AUTOTEST) -I ./tests tests/testsuite.at -o $(TESTSUITE)
-
-tests/atconfig: config.status
- ./config.status tests/atconfig
-
-# Hook the test suite into the check rule
-check-local: tests/atconfig $(top_srcdir)/$(TESTSUITE)
- $(TESTS_ENVIRONMENT) $(SHELL) $(srcdir)/$(TESTSUITE) $(TESTSUITE_FLAGS)
-
-# Run the test suite on the *installed* tree.
-installcheck-local:
- $(TESTS_ENVIRONMENT) $(SHELL) $(srcdir)/$(TESTSUITE) $(TESTSUITE_FLAGS)
AUTOTEST_PATH=$(exec_prefix)/bin
-
-# We need to remove any file droppings left behind by testsuite
-clean-local: legacy-clean-local
- $(SHELL) $(srcdir)/$(TESTSUITE) --clean
-
-
install-data-local:
## Don't install over the top of an old pkgdatadir
-rm -rf $(DESTDIR)$(pkgdatadir)
--- orig/bootstrap
+++ mod/bootstrap
@@ -51,24 +51,38 @@
# Extract the package name and version number from configure.ac:
set -- `sed '/AC_INIT/{s/[][,()]/ /g; p;};d' configure.ac`
+# Whip up some dirty Makefiles:
+makefiles=
+for dirty in ./Makefile ./tests/Makefile
+do
+ test -f $dirty || {
+ makefiles="$makefiles $dirty"
+ sed '/^if /,/^endif$/d;/^else$/,/^endif$/d' $dirty.am > $dirty
+ }
+done
+
# Building distributed files from configure is bad for automake, so we
# generate them here, and have Makefile rules to keep them up to date.
# We don't have all the substitution values to build ltmain.sh from this
# script yet, but we need config/ltmain.sh for the libtool commands in
# configure, and ltversion.m4 to generate configure in the first place:
rm -f ./config/ltmain.sh ./m4/ltversion.m4
-test -f Makefile || { makefile=Makefile; cp Makefile.am $makefile; }
+
make ./config/ltmain.sh ./m4/ltversion.m4 ./libtoolize.in ./tests/defs.in \
top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="autom4te --language=m4sh"
-make ./tests/testsuite AUTOTEST="autom4te --language=autotest" \
- top_srcdir=. PACKAGE="$2" VERSION="$3" PACKAGE_BUGREPORT="address@hidden"
+{
+ cd tests
+ make ./testsuite AUTOTEST="autom4te --language=autotest" \
+ top_srcdir=.. PACKAGE="$2" VERSION="$3" PACKAGE_BUGREPORT="address@hidden"
+ cd ..
+}
test -f clcommit.m4sh && make -f Makefile.maint commit \
top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="autom4te -l m4sh" \
SED=sed GREP=grep FGREP=fgrep EGREP=egrep LN_S="ln -s"
-test -z "$makefile" || rm -f "$makefile"
+test -z "$makefiles" || rm -f "$makefiles"
# Make a dummy libtoolize script for autoreconf:
test -f clcommit.m4sh && cat > ./config/libtoolize <<'EOF'
--- orig/tests/Makefile.am
+++ mod/tests/Makefile.am
@@ -1,4 +1,4 @@
-## Process this file with automake to produce Makefile.in
+## Makefile.am -- Process this file with automake to produce Makefile.in
##
## Copyright (C) 2003, 2004 Free Software Foundation
##
@@ -17,7 +17,56 @@
## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
## Boston, MA 02111-1307, USA.
-DISTCLEANFILES =
+## ------------ ##
+## Test suite. ##
+## ------------ ##
+
+TESTSUITE = testsuite
+TESTSUITE_AT = testsuite.at \
+ am-subdir.at
+
+EXTRA_DIST = $(TESTSUITE) $(TESTSUITE_AT) package.m4
+
+# Be sure to reexport important environment variables:
+TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
+ CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
+ LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
+ OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" F77="$(F77)" \
+ FFLAGS="$(FFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CPP="$(CPP)"
+
+# ../Makefile knows how to rebuild this file:
+$(srcdir)/package.m4:
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) update-package-m4
+
+$(srcdir)/$(TESTSUITE): $(srcdir)/package.m4 $(TESTSUITE_AT)
+ cd $(srcdir); \
+ $(AUTOTEST) testsuite.at -o $(TESTSUITE)
+
+atconfig: $(top_builddir)/config.status
+ cd $(top_builddir); \
+ ./config.status tests/atconfig
+
+# Hook the test suite into the check rule
+check-local: atconfig $(srcdir)/$(TESTSUITE)
+ $(TESTS_ENVIRONMENT) $(SHELL) $(srcdir)/$(TESTSUITE) $(TESTSUITE_FLAGS)
+
+# Run the test suite on the *installed* tree.
+installcheck-local:
+ $(TESTS_ENVIRONMENT) $(SHELL) $(srcdir)/$(TESTSUITE) $(TESTSUITE_FLAGS)
AUTOTEST_PATH=$(exec_prefix)/bin
+
+# We need to remove any file droppings left behind by testsuite
+clean-local: clean-local-legacy
+ $(SHELL) $(srcdir)/$(TESTSUITE) --clean
+
+
+## ------------- ##
+## Legacy tests. ##
+## ------------- ##
+
+# !WARNING! Don't add any new tests here, we are migrating to an
+# Autotest driven framework, please add new test cases
+# using the new framework above. When the migration is
+# complete this section should be removed.
CXX_TESTS = \
tagdemo-static.test tagdemo-make.test tagdemo-exec.test \
@@ -85,16 +134,7 @@
$(top_builddir)/libtool:
cd $(top_builddir) && $(MAKE) all
-# Be sure to reexport important environment variables.
-# This is a copy of ../Makefile.am (TESTS_ENVIRONMENT), be sure to
-# keep them is sync if you change them before these tests are migrated!
-TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
- CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
- LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
- OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" F77="$(F77)" \
- FFLAGS="$(FFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CPP="$(CPP)"
-
-EXTRA_DIST = defs.in defs.m4sh $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS)
+EXTRA_DIST += defs.in defs.m4sh $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS)
DIST_SUBDIRS = $(CONF_SUBDIRS)
# FIXME: Automake-1.7b (at least) only honours DIST_SUBDIRS if SUBDIRS is
@@ -102,7 +142,7 @@
SUBDIRS = .
# We need to remove any files that the above tests created.
-clean-local:
+clean-local-legacy:
-for dir in cdemo demo depdemo f77demo mdemo mdemo2 pdemo tagdemo; \
do \
test -f $$dir/Makefile && ( cd $$dir && $(MAKE) distclean; ); \
@@ -110,6 +150,6 @@
rm -rf _inst
$(TESTS): defs
-defs: defs.in ../Makefile.am
- cd .. && $(MAKE) $(AM_MAKEFLAGS) tests/defs
-DISTCLEANFILES += defs
+defs: defs.in $(top_srcdir)/Makefile.am
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) tests/defs
+DISTCLEANFILES = defs
- fix Autotest testsuite [libtool--gary--1.0--patch-59],
Gary V. Vaughan <=