From 5e795430a873c2d50853a67b2668fd78952bd63d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 30 Aug 2000 17:54:33 +0000 Subject: [PATCH] Fix for PR automake/72: * automake.in (initialize_per_input): Define `need_link'. (finish_languages): Use need_link. (handle_source_transform): Set need_link if required. --- ChangeLog | 7 +++++++ automake.in | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0595e623..53bc3a83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-08-30 Tom Tromey + + Fix for PR automake/72: + * automake.in (initialize_per_input): Define `need_link'. + (finish_languages): Use need_link. + (handle_source_transform): Set need_link if required. + 2000-08-28 Tom Tromey * automake.in (yacc, yaccxx, lex, lexxx): Set `derived-autodep' diff --git a/automake.in b/automake.in index e4990f80..150e3791 100755 --- a/automake.in +++ b/automake.in @@ -1027,7 +1027,7 @@ sub finish_languages # If the project is entirely C++ or entirely Fortran 77, don't # bother with the C stuff. But if anything else creeps in, then use # it. - if (! $non_c || scalar keys %suffix_rules > 0) + if ($need_link || ! $non_c || scalar keys %suffix_rules > 0) { if (! defined $done{'c'}) { @@ -1505,6 +1505,12 @@ sub handle_source_transform &define_pretty_variable ($one_file . '_OBJECTS', '', @keys); } + # If we want to use `LINK' we must make sure it is defined. + if ($linker eq '') + { + $need_link = 1; + } + return $linker; } @@ -6884,6 +6890,9 @@ sub initialize_per_input # This is set when `handle_dist' has finished. Once this happens, # we should no longer push on dist_common. $handle_dist_run = 0; + + # True if we need `LINK' defined. This is a hack. + $need_link = 0; } -- 2.43.5