]> sourceware.org Git - automake.git/commitdiff
2002-05-08 Charles Wilson <cwilson@ece.gatech.edu>
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 8 May 2002 08:56:41 +0000 (08:56 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 8 May 2002 08:56:41 +0000 (08:56 +0000)
            Alexandre Duret-Lutz  <duret_g@epita.fr>

* lib/am/progs.am (clean-%DIR%PROGRAMS): If Libtool is used, clean
both `program$(EXEEXT)' and `program'; needed under Cygwin.
* tests/libtool3.test: New file.
* tests/Makefile.am (TESTS): Add libtool3.test.

ChangeLog
THANKS
lib/am/progs.am
tests/Makefile.am
tests/Makefile.in
tests/libtool3.test [new file with mode: 0755]

index bd0b184ec2f02e47f9bf32eeee9e64958641b7c3..ddf3aee6a430e9dafdca3c3dc8a31918b81027f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-05-08  Charles Wilson  <cwilson@ece.gatech.edu>
+            Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * lib/am/progs.am (clean-%DIR%PROGRAMS): If Libtool is used, clean
+       both `program$(EXEEXT)' and `program'; needed under Cygwin.
+       * tests/libtool3.test: New file.
+       * tests/Makefile.am (TESTS): Add libtool3.test.
+
 2002-05-07  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * TODO: Undust.
diff --git a/THANKS b/THANKS
index 7c067ab37437dc88bc51a595a4445b6762681872..7fc11afa92d2cf292d863dc8aefd76b993531e1a 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -28,6 +28,7 @@ Brendan O'Dea         bod@compusol.com.au
 Brian Ford             ford@vss.fsi.com
 Brian Jones            cbj@nortel.net
 Bruno Haible           haible@ilog.fr
+Charles Wilson         cwilson@ece.gatech.edu
 Chris Provenzano       proven@io.proven.org
 Christian Cornelssen   ccorn@cs.tu-berlin.de
 danbp                  danpb@nospam.postmaster.co.uk
index 2e7ad839724c93ac115770df4529ed94c989b9e4..c1ccfbba6b2bd9414eb805b5ba6a8f1ae0d2d129 100644 (file)
@@ -80,4 +80,17 @@ endif %?INSTALL%
 
 .PHONY clean-am: clean-%DIR%PROGRAMS
 clean-%DIR%PROGRAMS:
-       -test -z "$(%DIR%_PROGRAMS)" || rm -f $(%DIR%_PROGRAMS)
+?!LIBTOOL?     -test -z "$(%DIR%_PROGRAMS)" || rm -f $(%DIR%_PROGRAMS)
+## Under Cygwin, we build `program$(EXEEXT)'.  However, if this
+## program uses a Libtool library, Libtool will move it in
+## `_libs/program$(EXEEXT)' and create a `program' wrapper (without
+## `$(EXEEXT)').  Therefore, if Libtool is used, we must try to erase
+## both `program$(EXEEXT)' and `program'.
+## Cleaning the `_libs/' or `.libs/' directory is done from clean-libtool.
+## FIXME: In the future (i.e., when it works) it would be nice to delegate
+## this task to `libtool --mode=clean'.
+?LIBTOOL?      @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \
+?LIBTOOL?        f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+?LIBTOOL?        echo " rm -f $$p $$f"; \
+?LIBTOOL?        rm -f $$p $$f ; \
+?LIBTOOL?      done
index 14613f969e2459a7667e10004317d8b660758c0f..4798be8a1f561eeae7ddbcdcc90ec2073efbe686 100644 (file)
@@ -201,6 +201,7 @@ libobj11.test \
 library.test \
 libtool.test \
 libtool2.test \
+libtool3.test \
 link_c_cxx.test        \
 link_dist.test \
 link_f_c.test \
index a814f82d7b0a4c3b00d19c06230655d8b62c189d..1fbe417e59ef8b566e8a45de2c557592870a56f2 100644 (file)
@@ -285,6 +285,7 @@ libobj11.test \
 library.test \
 libtool.test \
 libtool2.test \
+libtool3.test \
 link_c_cxx.test        \
 link_dist.test \
 link_f_c.test \
diff --git a/tests/libtool3.test b/tests/libtool3.test
new file mode 100755 (executable)
index 0000000..8f0a07c
--- /dev/null
@@ -0,0 +1,55 @@
+#! /bin/sh
+
+# Try to build and package a program linked to a Libtool library.
+
+required='libtoolize gcc'
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LTLIBRARIES = lib0.la
+lib0_la_SOURCES = 0.c
+
+bin_PROGRAMS = 1
+1_SOURCES = 1.c
+1_LDADD = lib0.la
+END
+
+cat > 0.c << 'END'
+int
+zero (void)
+{
+   return 0;
+}
+END
+
+cat > 1.c << 'END'
+int zero ();
+
+int
+main ()
+{
+   return zero ();
+}
+END
+
+set -e
+
+# Use --copy to workaround a bug in Cygwin's `cp -p' during distcheck.
+# (This bug is already exhibited by subobj9.test.)  In brief: Cygwin's
+# `cp -p' tries to preserve group and owner of the source and fails
+# to do so under normal accounts.  With --copy we ensure we own all files.
+
+libtoolize --force --copy
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing --copy
+
+./configure
+$MAKE
+$MAKE distcheck
This page took 0.038451 seconds and 5 git commands to generate.