From 136aac044d8115d5b03ac3a4f94674511ddbabfd Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 5 Mar 2001 15:02:58 +0000 Subject: [PATCH] If OBJEXT and EXEEXT are not set, provide a default value, and use them unconditionally. * automake.in (&generate_makefile): Provide default values for EXEEXT and OBJEXT. (&get_object_extension, &finish_languages) (&handle_single_transform_list, &handle_programs, &add_depend2) (&check_cygnus, &lang_c_finish, am_install_var): Don't bother with them, they are defined. * compile.am, depend2.am, program.am, progs.am: Likewise. * remake-hdr.am: Fix a typo. * tests/cxxo.test, tests/fo.test, tests/implicit.test, * tests/interp.test, tests/subobj.test, tests/subobj2.test, * tests/suffix2.test: Adjust. --- ChangeLog | 17 +++++++++++++ automake.in | 60 +++++++++++++++++++-------------------------- compile.am | 3 +-- depend2.am | 16 ++++++------ lib/am/compile.am | 3 +-- lib/am/depend2.am | 16 ++++++------ lib/am/program.am | 4 +-- lib/am/progs.am | 17 ++++++++++--- program.am | 4 +-- progs.am | 17 ++++++++++--- tests/cxxo.test | 2 +- tests/fo.test | 2 +- tests/implicit.test | 2 +- tests/interp.test | 2 +- tests/subobj.test | 6 ++--- tests/subobj2.test | 4 +-- tests/suffix2.test | 9 +++++-- 17 files changed, 108 insertions(+), 76 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b6a0d49..fa9d07e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2001-03-05 Akim Demaille + + If OBJEXT and EXEEXT are not set, provide a default value, and use + them unconditionally. + + * automake.in (&generate_makefile): Provide default values for + EXEEXT and OBJEXT. + (&get_object_extension, &finish_languages) + (&handle_single_transform_list, &handle_programs, &add_depend2) + (&check_cygnus, &lang_c_finish, am_install_var): Don't bother with + them, they are defined. + * compile.am, depend2.am, program.am, progs.am: Likewise. + * remake-hdr.am: Fix a typo. + * tests/cxxo.test, tests/fo.test, tests/implicit.test, + * tests/interp.test, tests/subobj.test, tests/subobj2.test, + * tests/suffix2.test: Adjust. + 2001-03-05 Akim Demaille * automake.in (&file_contents): Map MAINTAINER-MODE to diff --git a/automake.in b/automake.in index 2cd2d0c2..dd8f454d 100755 --- a/automake.in +++ b/automake.in @@ -1118,6 +1118,14 @@ sub generate_makefile return; } + # If OBJEXT/EXEEXT were not set in configure.in, do it, it + # simplifies our task, and anyway starting with Autoconf 2.50, it + # will always be defined, and this code will be dead. + $output_vars .= "EXEEXT =\n" + unless $seen_exeext; + $output_vars .= "OBJEXT = o\n" + unless $seen_objext; + # Must do this after reading .am file. See read_main_am_file to # understand weird tricks we play there with variables. &define_variable ('subdir', $relative_dir); @@ -1312,8 +1320,7 @@ sub get_object_extension my ($out) = @_; # Maybe require libtool library object files. - my $extension = '.o'; - $extension = '.$(OBJEXT)' if $seen_objext; + my $extension = '.$(OBJEXT)'; $extension = '.lo' if ($out =~ /\.la$/); if (! $included_generic_compile) @@ -1337,8 +1344,7 @@ sub get_object_extension &transform ('DEFAULT_INCLUDES' => $default_include)); $output_rules .= - &file_contents ('compile', - &transform ('OBJEXT' => $seen_objext)); + &file_contents ('compile'); # If using X, include some extra variable definitions. NOTE # we don't want to force these into CFLAGS or anything, @@ -1352,8 +1358,7 @@ sub get_object_extension } } - push (@suffixes, '.c', '.o'); - push (@suffixes, '.obj') if $seen_objext; + push (@suffixes, '.c', '.o', '.obj'); $included_generic_compile = 1; } @@ -1395,26 +1400,25 @@ sub get_object_extension # Generate rules to build ansi2knr. If it is in some # other directory, then generate dependencies but have the # rule just run elsewhere. - my $objext = $seen_objext ? ".\$(OBJEXT)" : ".o"; $output_rules .= ($options{'ansi2knr'} . ': ' - . $options{'ansi2knr'} . $objext . "\n"); + . $options{'ansi2knr'} . '.$(OBJEXT)' . "\n"); if ($options{'ansi2knr'} eq 'ansi2knr') { - $output_rules .= ("\t\$(LINK) ansi2knr" . $objext + $output_rules .= ("\t\$(LINK) ansi2knr.\$(OBJEXT)" . " \$(LIBS)\n" - . "ansi2knr" . $objext + . 'ansi2knr.$(OBJEXT)' . ": \$(CONFIG_HEADER)\n\n"); } else { $output_rules .= ("\tcd " . dirname ($options{'ansi2knr'}) - . " && \$(MAKE) \$(AM_MAKEFLAGS) " + . ' && $(MAKE) $(AM_MAKEFLAGS) ' . "ansi2knr\n\n"); # This is required for non-GNU makes. - $output_rules .= ($options{'ansi2knr'} . $objext . ":\n"); + $output_rules .= ($options{'ansi2knr'} . '.$(OBJEXT)' . ":\n"); $output_rules .= ("\tcd " . dirname ($options{'ansi2knr'}) - . " && \$(MAKE) \$(AM_MAKEFLAGS)" - . " ansi2knr" . $objext . "\n\n"); + . ' && $(MAKE) $(AM_MAKEFLAGS)' + . ' ansi2knr.$(OBJEXT)' . "\n\n"); } # Make sure ansi2knr can be found: if no path specified, @@ -1490,8 +1494,7 @@ sub finish_languages # FIXME: Using cygpath should be somehow conditional. $output_rules .= (".$ext.obj:\n" . $full - . " \`cygpath -w \$<\`\n") - if $seen_objext; + . " \`cygpath -w \$<\`\n"); $output_rules .= (".$ext.lo:\n" . "\t\$(LT" . $language_map{$lang . '-compiler-name'} @@ -1908,7 +1911,7 @@ sub handle_single_transform_list { my $depfile = $object; $depfile =~ s/\.([^.]*)$/.P$1/; - $depfile =~ s/\$\(OBJEXT\)$/o/ if $seen_objext; + $depfile =~ s/\$\(OBJEXT\)$/o/; $dep_files{'$(DEPDIR)/' . $depfile} = 1; } } @@ -2299,15 +2302,8 @@ sub handle_programs $xlink = $linker ? $linker : 'LINK'; } - my $exeext = ''; - if ($seen_exeext && $one_file !~ /\./) - { - $exeext = '$(EXEEXT)'; - } - $output_rules .= &file_contents ('program', - &transform ('EXEEXT' => $exeext, - 'PROGRAM' => $one_file, + &transform ('PROGRAM' => $one_file, 'XPROGRAM' => $xname, 'XLINK' => $xlink)); } @@ -3224,7 +3220,6 @@ sub add_depend2 # First include code for ordinary objects. my $xform = &transform ('PFX' => $pfx, 'FPFX' => $fpfx, - 'OBJEXT' => $seen_objext, 'LIBTOOL' => $seen_libtool, 'AMDEP' => $use_dependencies); @@ -4897,11 +4892,6 @@ sub check_cygnus { &am_conf_error ("\`AM_MAINTAINER_MODE' required when --cygnus specified"); } - - if (! $seen_exeext) - { - &am_conf_error ("\`AC_EXEEXT' required when --cygnus specified"); - } } # Do any extra checking for GNU standards. @@ -5157,9 +5147,9 @@ sub lang_c_finish . '; else echo ' . $base . '.c; fi` ' . "| sed 's/^# \\([0-9]\\)/#line \\1/' " . '| $(ANSI2KNR) > ' . $base . "_.c\n"); - push (@objects, $base . '_' - . ($seen_objext ? '.$(OBJEXT)' : '.o')); - push (@objects, $base . '_.lo') if $seen_libtool; + push (@objects, $base . '_.$(OBJEXT)'); + push (@objects, $base . '_.lo') + if $seen_libtool; } # Make all _.o (and _.lo) files depend on ansi2knr. @@ -7118,7 +7108,7 @@ sub am_install_var # A blatant hack: we rewrite each _PROGRAMS primary to # include EXEEXT when in Cygwin32 mode. - if ($seen_exeext && $primary eq 'PROGRAMS') + if ($primary eq 'PROGRAMS') { my @conds = &variable_conditions ($one_name); diff --git a/compile.am b/compile.am index e9280f00..75f7c0ee 100644 --- a/compile.am +++ b/compile.am @@ -20,8 +20,7 @@ mostlyclean-am: mostlyclean-compile mostlyclean-compile: ## Don't remove 'core.*' because some distributions have eg "core.c". ## 4.4BSD systems use `PROG.core'. - -rm -f *.o core *.core -?OBJEXT? -rm -f *.$(OBJEXT) + -rm -f *.$(OBJEXT) core *.core distclean-am: distclean-compile distclean-compile: diff --git a/depend2.am b/depend2.am index b7158ba4..e61e28f3 100644 --- a/depend2.am +++ b/depend2.am @@ -30,16 +30,16 @@ ?AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ %COMPILE% -c -o %OBJ% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE% -?GENERIC??LIBTOOL?%EXT%.lo: -?!GENERIC??LIBTOOL?%LTOBJ%: %SOURCE% +?LIBTOOL??GENERIC?%EXT%.lo: +?LIBTOOL??!GENERIC?%LTOBJ%: %SOURCE% ?LIBTOOL??AMDEP?@AMDEP@ source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@ ?LIBTOOL??AMDEP?@AMDEP@ depfile='$(DEPDIR)/%BASE%.Plo' tmpdepfile='$(DEPDIR)/%BASE%.TPlo' @AMDEPBACKSLASH@ ?LIBTOOL??AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ ?LIBTOOL? %LTCOMPILE% -c -o %LTOBJ% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE% -?GENERIC??OBJEXT?%EXT%.obj: -?!GENERIC??OBJEXT?%OBJOBJ%: %SOURCE% -?OBJEXT??AMDEP?@AMDEP@ source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@ -?OBJEXT??AMDEP?@AMDEP@ depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' @AMDEPBACKSLASH@ -?OBJEXT??AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ -?OBJEXT? %COMPILE% -c -o %OBJOBJ% `cygpath -w %SOURCE%` +?GENERIC?%EXT%.obj: +?!GENERIC?%OBJOBJ%: %SOURCE% +?AMDEP?@AMDEP@ source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@ +?AMDEP?@AMDEP@ depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' @AMDEPBACKSLASH@ +?AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ + %COMPILE% -c -o %OBJOBJ% `cygpath -w %SOURCE%` diff --git a/lib/am/compile.am b/lib/am/compile.am index e9280f00..75f7c0ee 100644 --- a/lib/am/compile.am +++ b/lib/am/compile.am @@ -20,8 +20,7 @@ mostlyclean-am: mostlyclean-compile mostlyclean-compile: ## Don't remove 'core.*' because some distributions have eg "core.c". ## 4.4BSD systems use `PROG.core'. - -rm -f *.o core *.core -?OBJEXT? -rm -f *.$(OBJEXT) + -rm -f *.$(OBJEXT) core *.core distclean-am: distclean-compile distclean-compile: diff --git a/lib/am/depend2.am b/lib/am/depend2.am index b7158ba4..e61e28f3 100644 --- a/lib/am/depend2.am +++ b/lib/am/depend2.am @@ -30,16 +30,16 @@ ?AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ %COMPILE% -c -o %OBJ% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE% -?GENERIC??LIBTOOL?%EXT%.lo: -?!GENERIC??LIBTOOL?%LTOBJ%: %SOURCE% +?LIBTOOL??GENERIC?%EXT%.lo: +?LIBTOOL??!GENERIC?%LTOBJ%: %SOURCE% ?LIBTOOL??AMDEP?@AMDEP@ source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@ ?LIBTOOL??AMDEP?@AMDEP@ depfile='$(DEPDIR)/%BASE%.Plo' tmpdepfile='$(DEPDIR)/%BASE%.TPlo' @AMDEPBACKSLASH@ ?LIBTOOL??AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ ?LIBTOOL? %LTCOMPILE% -c -o %LTOBJ% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE% -?GENERIC??OBJEXT?%EXT%.obj: -?!GENERIC??OBJEXT?%OBJOBJ%: %SOURCE% -?OBJEXT??AMDEP?@AMDEP@ source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@ -?OBJEXT??AMDEP?@AMDEP@ depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' @AMDEPBACKSLASH@ -?OBJEXT??AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ -?OBJEXT? %COMPILE% -c -o %OBJOBJ% `cygpath -w %SOURCE%` +?GENERIC?%EXT%.obj: +?!GENERIC?%OBJOBJ%: %SOURCE% +?AMDEP?@AMDEP@ source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@ +?AMDEP?@AMDEP@ depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' @AMDEPBACKSLASH@ +?AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ + %COMPILE% -c -o %OBJOBJ% `cygpath -w %SOURCE%` diff --git a/lib/am/program.am b/lib/am/program.am index 7c47cf19..2b995bdf 100644 --- a/lib/am/program.am +++ b/lib/am/program.am @@ -15,11 +15,11 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) +%PROGRAM%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) ## Remove program before linking. Otherwise the link will fail if the ## program is running somewhere. FIXME: this could be a loss if ## you're using an incremental linker. Maybe we should think twice? ## Or maybe not... sadly, incremental linkers are rarer than losing ## systems. - @rm -f %PROGRAM%%EXEEXT% + @rm -f %PROGRAM% $(%XLINK%) $(%XPROGRAM%_LDFLAGS) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS) diff --git a/lib/am/progs.am b/lib/am/progs.am index d8995c76..1fefdacc 100644 --- a/lib/am/progs.am +++ b/lib/am/progs.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001 +## Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -16,6 +17,11 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. + +## ------------ ## +## Installing. ## +## ------------ ## + _am_installdirs += $(DESTDIR)$(%NDIR%dir) ?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS ?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS @@ -29,7 +35,7 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS) ## Note that we explicitly set the libtool mode. This avoids any ## lossage if the install program doesn't have a name that libtool ## expects. - f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ + f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ ?LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \ ?LIBTOOL? $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \ ?!LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \ @@ -37,11 +43,16 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS) else :; fi; \ done + +## -------------- ## +## uninstalling. ## +## -------------- ## + .PHONY uninstall-am: uninstall-%DIR%PROGRAMS uninstall-%DIR%PROGRAMS: @$(NORMAL_UNINSTALL) @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \ - f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ + f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \ rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \ done diff --git a/program.am b/program.am index 7c47cf19..2b995bdf 100644 --- a/program.am +++ b/program.am @@ -15,11 +15,11 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) +%PROGRAM%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) ## Remove program before linking. Otherwise the link will fail if the ## program is running somewhere. FIXME: this could be a loss if ## you're using an incremental linker. Maybe we should think twice? ## Or maybe not... sadly, incremental linkers are rarer than losing ## systems. - @rm -f %PROGRAM%%EXEEXT% + @rm -f %PROGRAM% $(%XLINK%) $(%XPROGRAM%_LDFLAGS) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS) diff --git a/progs.am b/progs.am index d8995c76..1fefdacc 100644 --- a/progs.am +++ b/progs.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001 +## Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -16,6 +17,11 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. + +## ------------ ## +## Installing. ## +## ------------ ## + _am_installdirs += $(DESTDIR)$(%NDIR%dir) ?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS ?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS @@ -29,7 +35,7 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS) ## Note that we explicitly set the libtool mode. This avoids any ## lossage if the install program doesn't have a name that libtool ## expects. - f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ + f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ ?LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \ ?LIBTOOL? $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \ ?!LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \ @@ -37,11 +43,16 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS) else :; fi; \ done + +## -------------- ## +## uninstalling. ## +## -------------- ## + .PHONY uninstall-am: uninstall-%DIR%PROGRAMS uninstall-%DIR%PROGRAMS: @$(NORMAL_UNINSTALL) @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \ - f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ + f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \ rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \ done diff --git a/tests/cxxo.test b/tests/cxxo.test index 32beec86..1c86b8cc 100755 --- a/tests/cxxo.test +++ b/tests/cxxo.test @@ -16,4 +16,4 @@ END $AUTOMAKE || exit 1 -fgrep doe.o Makefile.in +fgrep 'doe.$(OBJEXT)' Makefile.in diff --git a/tests/fo.test b/tests/fo.test index 8571b2d8..2b4b425f 100755 --- a/tests/fo.test +++ b/tests/fo.test @@ -18,4 +18,4 @@ END $AUTOMAKE || exit 1 -fgrep doe.o Makefile.in +fgrep 'doe.$(OBJEXT)' Makefile.in diff --git a/tests/implicit.test b/tests/implicit.test index 443a7535..b2fb9845 100755 --- a/tests/implicit.test +++ b/tests/implicit.test @@ -15,4 +15,4 @@ END $AUTOMAKE || exit 1 -grep '^libapp_1_OBJECTS' Makefile.in | grep '\.o' +grep '^libapp_1_OBJECTS' Makefile.in | fgrep '.$(OBJEXT)' diff --git a/tests/interp.test b/tests/interp.test index 08c847a6..90c1e5ad 100755 --- a/tests/interp.test +++ b/tests/interp.test @@ -16,4 +16,4 @@ END $AUTOMAKE || exit 1 -grep 'z\.o' Makefile.in +fgrep 'z.$(OBJEXT)' Makefile.in diff --git a/tests/subobj.test b/tests/subobj.test index f08276d3..f2cfc29d 100755 --- a/tests/subobj.test +++ b/tests/subobj.test @@ -19,8 +19,8 @@ END $AUTOMAKE || exit 1 -fgrep 'generic/a.o' Makefile.in || exit 1 -grep '[^/]a\.o' Makefile.in && exit 1 +fgrep 'generic/a.$(OBJEXT)' Makefile.in || exit 1 +grep '[^/]a\.\$(OBJEXT)' Makefile.in && exit 1 # Opportunistically test for a different bug. -grep '^generic/b.o:.*dirstamp' Makefile.in +grep '^generic/b.\$(OBJEXT):.*dirstamp' Makefile.in diff --git a/tests/subobj2.test b/tests/subobj2.test index 606b19aa..302f6a86 100755 --- a/tests/subobj2.test +++ b/tests/subobj2.test @@ -18,6 +18,6 @@ END $AUTOMAKE || exit 1 -fgrep 'generic/a.o' Makefile.in || exit 1 -grep '[^/]a\.o' Makefile.in && exit 1 +fgrep 'generic/a.$(OBJEXT)' Makefile.in || exit 1 +grep '[^/]a\.\$(OBJEXT)' Makefile.in && exit 1 fgrep -e '-c -o' Makefile.in diff --git a/tests/suffix2.test b/tests/suffix2.test index b2f144ee..d9f1d138 100755 --- a/tests/suffix2.test +++ b/tests/suffix2.test @@ -25,6 +25,11 @@ END : > config.guess : > config.sub -$AUTOMAKE -a || exit 1 +set -e -test "`fgrep '.c.o' Makefile.in | wc -l`" -eq 1 +$AUTOMAKE -a + +grep -c '^\.c\.o:' Makefile.in | grep '^1$' +grep -c '^\.c\.obj:' Makefile.in | grep '^1$' + +exit 0 -- 2.43.5