From: Tom Tromey Date: Sat, 12 Oct 1996 03:02:30 +0000 (+0000) Subject: Fix for libobj5.test X-Git-Tag: Release-1-1g~19 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=db0495fc82b2539251360a76f966c3a914306023;p=automake.git Fix for libobj5.test --- diff --git a/ChangeLog b/ChangeLog index 6adbd930..45b1ccb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ Fri Oct 11 00:44:49 1996 Tom Tromey * automake.in (handle_source_transform): Only rewrite c, yacc, lex to use de-ansi-fication. + (scan_configure): Handle multi-line AC_REPLACE_FUNCS. Test + libobj5.test. * automake.in (handle_lib_objects): Added $lex_seen argument. Error if lex file used but LEXLIB not seen. diff --git a/Makefile.in b/Makefile.in index 2cf5b7ee..043db4d9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.1f from Makefile.am +# Makefile.in generated automatically by automake 1.1g from Makefile.am # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -66,7 +66,7 @@ ETAGS_ARGS = automake.in aclocal.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi TAGS_DEPENDENCIES = automake.in aclocal.in automake.texi ACLOCAL = aclocal.m4 -mkinstalldirs = $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = automake aclocal SCRIPTS = $(bin_SCRIPTS) $(pkgdata_SCRIPTS) @@ -105,7 +105,7 @@ $(srcdir)/Makefile.in: Makefile.am configure.in # For an explanation of the following Makefile rules, see node # `Automatic Remaking' in GNU Autoconf documentation. -Makefile: $(srcdir)/Makefile.in config.status +Makefile: $(srcdir)/Makefile.in config.status $(BUILT_SOURCES) CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status config.status: configure ./config.status --recheck @@ -345,7 +345,7 @@ distdir: $(DEP_DISTFILES) done info: $(INFO_DEPS) info-recursive dvi: $(DVIS) dvi-recursive -check: all +check: all-am $(MAKE) check-recursive installcheck: installcheck-recursive installcheck-local all-am: $(INFO_DEPS) $(SCRIPTS) $(DATA) Makefile diff --git a/automake.in b/automake.in index 164d1013..ba814193 100755 --- a/automake.in +++ b/automake.in @@ -2750,7 +2750,7 @@ sub scan_configure # that won't always be the case. %libsources = (); - local ($in_ac_output, @make_list) = 0; + local ($in_ac_output, $in_ac_replace, @make_list) = (0, 0); local ($libobj_iter); while () { @@ -2779,13 +2779,6 @@ sub scan_configure { $libsources{'fnmatch.c'} = 1; } - elsif (/AC_REPLACE_FUNCS\s*\((.*)\)/) - { - foreach (split (' ', $1)) - { - $libsources{$_ . '.c'} = 1; - } - } elsif (/A[CM]_REPLACE_GNU_GETOPT/) { $libsources{'getopt.c'} = 1; @@ -2828,6 +2821,21 @@ sub scan_configure } } + if (! $in_ac_replace && s/AC_REPLACE_FUNCS\s*\(\[?//) + { + $in_ac_replace = 1; + } + if ($in_ac_replace) + { + $in_ac_replace = 0 if s/[\]\)].*$//; + # Remove trailing backslash. + s/\\$//; + foreach (split) + { + $libsources{$_ . '.c'} = 1; + } + } + if (/(fp_WITH_DMALLOC|fp_WITH_REGEX|fp_FUNC_FNMATCH|fp_PROG_INSTALL|fp_C_PROTOTYPES|jm_MAINTAINER_MODE)/) { &am_conf_line_error ($., "\`$1' is obsolete; use corresponding \`AM_' macro"); diff --git a/m4/Makefile.in b/m4/Makefile.in index 89905063..23a41191 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.1f from Makefile.am +# Makefile.in generated automatically by automake 1.1g from Makefile.am # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -47,7 +47,7 @@ lispdir.m4 maintainer.m4 protos.m4 ptrdiff.m4 regex.m4 strtod.m4 termios.m4 \ winsz.m4 mktime.m4 error.m4 obstack.m4 EXTRA_DIST = $(m4data_DATA) -mkinstalldirs = $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DATA = $(m4data_DATA) @@ -69,7 +69,7 @@ default: all $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in cd $(top_srcdir) && automake $(subdir)/Makefile -Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in +Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in $(BUILT_SOURCES) cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status install-m4dataDATA: $(m4data_DATA) diff --git a/tests/ChangeLog b/tests/ChangeLog index e9560d99..6d61ecef 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,7 @@ Fri Oct 11 00:51:04 1996 Tom Tromey + * libobj5.test: New file. + * libobj4.test: New file. * distdir.test: New file. * lex2.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 6feb12ff..8af6a8f8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,6 +17,6 @@ order.test libobj2.test interp.test alllib.test block.test libobj3.test \ gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \ confsub.test primary.test primary2.test depend2.test spell3.test \ comment2.test vpath.test symlink.test discover.test acinclude.test req.test \ -acsilent.test distdir.test lex2.test +acsilent.test distdir.test lex2.test libobj4.test libobj5.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 959a0f7c..b98c2156 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -55,10 +55,10 @@ order.test libobj2.test interp.test alllib.test block.test libobj3.test \ gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \ confsub.test primary.test primary2.test depend2.test spell3.test \ comment2.test vpath.test symlink.test discover.test acinclude.test req.test \ -acsilent.test distdir.test lex2.test +acsilent.test distdir.test lex2.test libobj4.test libobj5.test EXTRA_DIST = defs $(TESTS) -mkinstalldirs = $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_COMMON = ChangeLog Makefile.am Makefile.in diff --git a/tests/libobj4.test b/tests/libobj4.test new file mode 100755 index 00000000..eae62b50 --- /dev/null +++ b/tests/libobj4.test @@ -0,0 +1,16 @@ +#! /bin/sh + +# Test to make sure LIBOBJS error only occurs if LIBOBJS seen. Report +# from Jim Meyering. + +. $srcdir/defs || exit 1 + +cat > Makefile.am << 'END' +bin_PROGRAMS = foo +END + +cat >> configure.in << 'END' +AC_REPLACE_FUNCS(foo) +END + +$AUTOMAKE diff --git a/tests/libobj5.test b/tests/libobj5.test new file mode 100755 index 00000000..634176a3 --- /dev/null +++ b/tests/libobj5.test @@ -0,0 +1,21 @@ +#! /bin/sh + +# Test to make sure AC_REPLACE_FUNCS works across lines. Report from +# Jim Meyering. + +. $srcdir/defs || exit 1 + +cat > Makefile.am << 'END' +bin_PROGRAMS = joe +LDADD = @LIBOBJS@ +END + +cat >> configure.in << 'END' +AC_REPLACE_FUNCS(\ + foo) +END + +: > foo.c + +$AUTOMAKE || exit 1 +fgrep foo.c Makefile.in