]> sourceware.org Git - automake.git/commitdiff
ansi2knr fix from jim meyering
authorTom Tromey <tromey@redhat.com>
Mon, 23 Mar 1998 18:00:12 +0000 (18:00 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 23 Mar 1998 18:00:12 +0000 (18:00 +0000)
ChangeLog
automake.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/libobj8.test [new file with mode: 0755]

index db5a4c2b0fdf737f5e3e0f00d70e466b6c6cd2e1..8bc30894558eaee28f8c3a5d629c21f024239fbf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 Mon Mar 23 07:55:04 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * automake.in (handle_yacc_lex_cxx): Push lib sources onto
+       de_ansi_files before generating ._c dependencies.  Test
+       libobj8.test.
+
        * m4/mktime.m4: New version from Jim Meyering.
 
        * aclocal.in (usage): Document --print-ac-dir.
index aec2b2f06bc00b646e582cda9e853daf06502ae1..2b49d472970efa1d7eea4c03a0ec4ef47bcf5e2a 100755 (executable)
@@ -983,6 +983,19 @@ sub handle_yacc_lex_cxx
     #
     # Handle some ansi2knr cleanup.
     #
+
+    # Push all libobjs files onto de_ansi_files.  We actually only
+    # push files which exist in the current directory, and which are
+    # genuine source files.  This is moderately lame.  FIXME.
+    local ($file);
+    foreach $file (keys %libsources)
+    {
+       if ($file =~ /^(.*)\.[cly]$/ && -f "$relative_dir/$file")
+       {
+           $de_ansi_files{$1} = 1;
+       }
+    }
+
     if (defined $options{'ansi2knr'} && keys %de_ansi_files)
     {
        # Make all _.c files depend on their corresponding .c files.
index bec14b6a4ddc6956a2270f9b5e8516f4fe9faa65..846304e7d365bd337313406c092e88cb236f0378 100644 (file)
@@ -1,3 +1,7 @@
+Mon Mar 23 10:52:36 1998  Tom Tromey  <tromey@cygnus.com>
+
+       * libobj8.test: New file.
+
 Fri Mar 20 00:32:16 1998  Tom Tromey  <tromey@cygnus.com>
 
        * lex2.test: New file.
index 9fb4766fd57c5ee2f0b99e5c0c2c46d8d3dcffbf..e5f602204fbd24c15a90d0f3ebbfc47e15d5336f 100644 (file)
@@ -30,7 +30,7 @@ install.test libobj7.test objc.test cond3.test cxxcpp.test \
 aclocal.test alpha.test whoami.test unused.test condman.test \
 texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \
 java.test sinclude.test javaprim.test javasubst.test aclocalii.test \
-lex2.test
+lex2.test libobj8.test
 
 EXTRA_DIST = defs $(TESTS)
 
index dd1732495b1bcedbd8887c0d57894e3c2dd73d4c..9b7d61d5821c0f104919922d2f3e49e627e35b33 100644 (file)
@@ -93,7 +93,7 @@ install.test libobj7.test objc.test cond3.test cxxcpp.test \
 aclocal.test alpha.test whoami.test unused.test condman.test \
 texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \
 java.test sinclude.test javaprim.test javasubst.test aclocalii.test \
-lex2.test
+lex2.test libobj8.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/tests/libobj8.test b/tests/libobj8.test
new file mode 100755 (executable)
index 0000000..a4b4090
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+# Test to make sure `_.c' dependencies are generated for LIBOBJS
+# objects.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+PACKAGE=nonesuch
+VERSION=nonesuch
+AC_PROG_CC
+AC_ARG_PROGRAM
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+AC_REPLACE_FUNCS(basename dirname strsignal)
+AM_C_PROTOTYPES
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = ansi2knr
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
+END
+
+: > basename.c
+: > dirname.c
+: > strsignal.c
+
+: > ansi2knr.1
+: > ansi2knr.c
+
+$AUTOMAKE || exit 1
+
+grep 'strsignal_.c:' Makefile.in
This page took 0.053279 seconds and 5 git commands to generate.