From 6792bba7e5b0bddd121fa412f374e699a5b056ab Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 8 May 2001 10:39:49 +0000 Subject: [PATCH] * automake.in (&handle_languages): `ext-compile.am' and `depend2.am' are now equivalent for generic rules: output only the latter. * ext-compile.am: Remove. --- ChangeLog | 9 +++++- Makefile.am | 4 +-- Makefile.in | 4 +-- automake.in | 76 +++++++++++++++++++++------------------------- lib/am/Makefile.am | 4 +-- 5 files changed, 49 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index b8d52ca7..080f0af7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-05-08 Akim Demaille + + * automake.in (&handle_languages): `ext-compile.am' and + `depend2.am' are now equivalent for generic rules: output only the + latter. + * ext-compile.am: Remove. + 2001-05-08 Akim Demaille Note: This patch breaks Automake. Repaired within two patches. @@ -80,7 +87,7 @@ * automake.texi (Dist): Document distcheck-hook. - * tests/confh4.test: Updated to reflect DEFS change. + * tests/confh4.test: Update to reflect DEFS change. For PR automake/132. Fix for PR automake/132: diff --git a/Makefile.am b/Makefile.am index bc535a7f..152646e9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,8 +15,8 @@ amdir = $(pkgdatadir)/am dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ configure.am data.am dejagnu.am depend.am depend2.am distdir.am \ -ext-compile.am footer.am header-vars.am header.am install.am java.am \ -lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ +footer.am header-vars.am header.am install.am java.am lex.am \ +library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ mans-vars.am mans.am multilib.am program.am progs.am python.am \ remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \ texinfos.am yacc.am diff --git a/Makefile.in b/Makefile.in index 4b2d0106..66466940 100644 --- a/Makefile.in +++ b/Makefile.in @@ -85,8 +85,8 @@ amdir = $(pkgdatadir)/am dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ configure.am data.am dejagnu.am depend.am depend2.am distdir.am \ -ext-compile.am footer.am header-vars.am header.am install.am java.am \ -lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ +footer.am header-vars.am header.am install.am java.am lex.am \ +library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ mans-vars.am mans.am multilib.am program.am progs.am python.am \ remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \ texinfos.am yacc.am diff --git a/automake.in b/automake.in index 55e829ab..405faf01 100755 --- a/automake.in +++ b/automake.in @@ -1398,42 +1398,35 @@ sub handle_languages if (! $output_flag && $lang->flags eq 'CFLAGS' && defined $options{'subdir-objects'}); + my $AMDEP = (($use_dependencies && $lang->autodep ne 'no') + ? 'AMDEP' : 'FALSE'); my %transform = ('EXT' => $ext, 'PFX' => $pfx, 'FPFX' => $fpfx, 'LIBTOOL' => $seen_libtool, - 'AMDEP' => $use_dependencies ? 'AMDEP' : 'FALSE', + 'AMDEP' => $AMDEP, '-c' => $lang->compile_flag || '', '-o' => $output_flag); - # First include code for ordinary objects. - { - my %transform = (%transform, - 'GENERIC' => 1, - - 'BASE' => '$*', - 'SOURCE' => '$<', - 'OBJ' => '$@', - 'OBJOBJ' => '$@', - 'LTOBJ' => '$@', - - 'COMPILE' => '$(' . $lang->compiler . ')', - 'LTCOMPILE' => '$(LT' . $lang->compiler . ')'); - - - # Generate the appropriate rules for this extension. If - # dependency tracking was requested, and this extension - # supports it, then we don't generate the rule here. - if ($use_dependencies && $lang->autodep ne 'no') - { - $output_rules .= file_contents ('depend2', %transform); - } - elsif (defined $lang->compile) - { - $output_rules .= file_contents ('ext-compile', %transform); - } - } + # Generate the appropriate rules for this extension. + if ($use_dependencies && $lang->autodep ne 'no' + || defined $lang->compile) + { + $output_rules .= + file_contents ('depend2', + %transform, + 'GENERIC' => 1, + + 'BASE' => '$*', + 'SOURCE' => '$<', + 'OBJ' => '$@', + 'OBJOBJ' => '$@', + 'LTOBJ' => '$@', + + 'COMPILE' => '$(' . $lang->compiler . ')', + 'LTCOMPILE' => '$(LT' . $lang->compiler . ')'); + } # Then handle files with specific flags. if ($lang->autodep ne 'no') @@ -1459,19 +1452,20 @@ sub handle_languages # Generate a transform which will turn suffix targets in # depend2.am into real targets for the particular objects we # are building. - $output_rules .= &file_contents ('depend2', - (%transform, - 'GENERIC' => 0, - - 'BASE' => $obj, - 'SOURCE' => $source, - 'OBJ' => "$obj.o", - 'OBJOBJ' => "$obj.obj", - 'LTOBJ' => "$obj.lo", - - 'COMPILE' => $obj_compile, - 'LTCOMPILE' => $obj_ltcompile)) - } + $output_rules .= + file_contents ('depend2', + (%transform, + 'GENERIC' => 0, + + 'BASE' => $obj, + 'SOURCE' => $source, + 'OBJ' => "$obj.o", + 'OBJOBJ' => "$obj.obj", + 'LTOBJ' => "$obj.lo", + + 'COMPILE' => $obj_compile, + 'LTCOMPILE' => $obj_ltcompile)) + } } # The rest of the loop is done once per language. diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index bc535a7f..152646e9 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -15,8 +15,8 @@ amdir = $(pkgdatadir)/am dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ configure.am data.am dejagnu.am depend.am depend2.am distdir.am \ -ext-compile.am footer.am header-vars.am header.am install.am java.am \ -lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ +footer.am header-vars.am header.am install.am java.am lex.am \ +library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ mans-vars.am mans.am multilib.am program.am progs.am python.am \ remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \ texinfos.am yacc.am -- 2.43.5