autoconf-patches
[Top][All Lists]
Advanced

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

03-package-m4.patch


From: Akim Demaille
Subject: 03-package-m4.patch
Date: Sat, 22 Sep 2001 17:23:01 +0200

If some people have tracked what I did on Autotest recently, they
should have noted there are issues I don't know too well how to solve.
In particular with the will of making it possible to, e.g., install
test suites (so called standalone test suites).

Therefore, one should avoid having a myriad of small files wandering
around, such as atconfig etc.  But the test suite needs an identity,
and one does not want to keep update this ID in testsuite.at each time
it changes in configure.ac.

The (current?) solution consists in extracting the ID from
configure.ac to create package.m4.  Once testsuite created, package.m4
is no longer needed.

Ideally package.m4 should be created when the ID of the test suite is
needed, hence, it is the Makefile which should do that.  But then if
some time we need something else into package.m4, Automake will have
to be updated etc. etc.  Break the dependencies seems a better bet.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/autoconf/autotest.m4: Create `package.m4'.
        * tests/Makefile.am (package.m4): Remove.

Index: lib/autoconf/autotest.m4
--- lib/autoconf/autotest.m4 Tue, 18 Sep 2001 20:53:46 +0200 akim
+++ lib/autoconf/autotest.m4 Sat, 22 Sep 2001 16:08:53 +0200 akim
@@ -58,13 +58,31 @@
 # AUTOTEST-PATH must help the test suite to find the executables.
 # It is relative to the top level of the package, and is expanded
 # into all the build dirs of AUTOTEST-PATH, then all the src dirs.
-AC_DEFUN([AC_CONFIG_TESTDIR],
-[AC_CONFIG_COMMANDS([$1/atconfig],
-[# Do not use _ACEOF as we are being dumped into config.status via
+#
+# Do not use _ACEOF as we are being dumped into config.status via
 # an _ACEOF-heredoc.
-cat >$1/atconfig <<ATEOF
+AC_DEFUN([AC_CONFIG_TESTDIR],
+[AC_CONFIG_COMMANDS([$1/package.m4],
+[[cat >$1/package.m4 <<ATEOF
address@hidden:@ Signature of the current package.
+m4@&address@hidden([PACKAGE_NAME],      [$PACKAGE_NAME])
+m4@&address@hidden([PACKAGE_TARNAME],   [$PACKAGE_TARNAME])
+m4@&address@hidden([PACKAGE_VERSION],   [$PACKAGE_VERSION])
+m4@&address@hidden([PACKAGE_STRING],    [$PACKAGE_STRING])
+m4@&address@hidden([PACKAGE_BUGREPORT], [$PACKAGE_BUGREPORT])
+ATEOF
+]],
+[[PACKAGE_NAME='$PACKAGE_NAME'
+PACKAGE_TARNAME='$PACKAGE_TARNAME'
+PACKAGE_VERSION='$PACKAGE_VERSION'
+PACKAGE_STRING='$PACKAGE_STRING'
+PACKAGE_BUGREPORT='$PACKAGE_BUGREPORT'
+]])
+
+AC_CONFIG_COMMANDS([$1/atconfig],
+[cat >$1/atconfig <<ATEOF
 @%:@ Configurable variable values for building test suites.
address@hidden:@ Generated by $[0]
address@hidden:@ Generated by $[0].
 @%:@ Copyright 2000, 2001 Free Software Foundation, Inc.

 at_testdir='$1'
Index: tests/Makefile.am
--- tests/Makefile.am Tue, 18 Sep 2001 20:53:46 +0200 akim
+++ tests/Makefile.am Sat, 22 Sep 2001 16:10:36 +0200 akim
@@ -78,23 +78,6 @@ installcheck-local:



-## ------------ ##
-## package.m4.  ##
-## ------------ ##
-
-package.m4: $(top_srcdir)/configure.ac
-       {                                       \
-         echo '# Signature of the current package.'; \
-         echo 'm4_define([PACKAGE_NAME],      address@hidden@])'; \
-         echo 'm4_define([PACKAGE_TARNAME],   address@hidden@])'; \
-         echo 'm4_define([PACKAGE_VERSION],   address@hidden@])'; \
-         echo 'm4_define([PACKAGE_STRING],    address@hidden@])'; \
-         echo 'm4_define([PACKAGE_BUGREPORT], address@hidden@])'; \
-       } >package.m4
-
-
-
-
 ## ------------------ ##
 ## Maintainer rules.  ##
 ## ------------------ ##



reply via email to

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