automake-patches
[Top][All Lists]
Advanced

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

FYI: check that subpackaging works


From: Alexandre Duret-Lutz
Subject: FYI: check that subpackaging works
Date: Mon, 10 Jun 2002 11:38:57 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

I'm checking in this on HEAD.  There was no test for subpackaging.

2002-06-10  Alexandre Duret-Lutz  <address@hidden>

        * tests/defs (ACLOCAL, AUTOMAKE): Use absolute paths.
        * tests/subpkg.test: New file.
        * tests/Makefile.am (TESTS): Add subpkg.test.

Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.403
diff -u -r1.403 Makefile.am
--- tests/Makefile.am   8 Jun 2002 16:56:11 -0000       1.403
+++ tests/Makefile.am   10 Jun 2002 09:33:02 -0000
@@ -332,6 +332,7 @@
 subobj8.test \
 subobj9.test \
 subobjname.test \
+subpkg.test \
 subst.test \
 substref.test \
 substtarg.test \
Index: tests/defs
===================================================================
RCS file: /cvs/automake/automake/tests/defs,v
retrieving revision 1.49
diff -u -r1.49 defs
--- tests/defs  30 May 2002 06:04:09 -0000      1.49
+++ tests/defs  10 Jun 2002 09:33:02 -0000
@@ -93,7 +93,7 @@
 if test -z "$AUTOMAKE"; then
    perllibdir=$srcdir/../lib
    export perllibdir
-   AUTOMAKE="$PERL ../../automake --libdir=$srcdir/../lib --foreign --Werror"
+   AUTOMAKE="$PERL `pwd`/../../automake --libdir=$srcdir/../lib --foreign 
--Werror"
 fi
 
 # See how aclocal should be run.
@@ -103,7 +103,7 @@
    # Most of the files are in $srcdir/../m4.  However amversion.m4 is
    # generated in ../m4, so we include that directory in the search
    # path too.
-   ACLOCAL="$PERL ../../aclocal -I `pwd`/../../m4 --acdir=$srcdir/../m4"
+   ACLOCAL="$PERL `pwd`/../../aclocal -I `pwd`/../../m4 --acdir=$srcdir/../m4"
 fi
 
 # We might need extra macros, e.g., from Libtool or Gettext.
Index: tests/subpkg.test
===================================================================
RCS file: tests/subpkg.test
diff -N tests/subpkg.test
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/subpkg.test   10 Jun 2002 09:33:02 -0000
@@ -0,0 +1,67 @@
+#! /bin/sh
+
+# Check subpackage handling.
+
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_CONFIG_SUBDIRS([lib])
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'EOF'
+SUBDIRS = lib
+# Yes, This program is named LDADD.  So what?
+bin_PROGRAMS = LDADD
+LDADD_LDADD = lib/liblib.a
+EOF
+
+cat >LDADD.c <<'EOF'
+int lib ();
+
+int
+main ()
+{
+  return lib ();
+}
+EOF
+
+mkdir lib
+mkdir lib/src
+
+cat >lib/configure.ac <<'EOF'
+AC_INIT([lib], [2.3])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+cat >lib/Makefile.am <<'EOF'
+noinst_LIBRARIES = liblib.a
+liblib_a_SOURCES = src/x.c
+EOF
+
+cat >lib/src/x.c <<'EOF'
+int lib ()
+{
+  return 0;
+}
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cd lib
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+cd ..
+
+./configure
+$MAKE distcheck

-- 
Alexandre Duret-Lutz




reply via email to

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