From 80f1b2dc3ae4914e0acdadc4bdf44bcbf3628319 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 9 Aug 1996 18:32:39 +0000 Subject: [PATCH] Linking fixes --- ChangeLog | 4 ++++ automake.in | 14 ++++++++++---- lib/am/program.am | 2 +- program.am | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5624fc7..9441717 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ Fri Aug 9 09:18:46 1996 Tom Tromey + * automake.in (handle_programs): Substitute @XLINK@. Make sure + linker variable is transformed name. + * program.am (@PROGRAM@): Use @XLINK@ to link. + * automake.in (handle_scripts): Fixed call to am_primary_prefixes. (handle_libraries): Better error message when AC_PROG_RANLIB diff --git a/automake.in b/automake.in index 86a18fe..553df4f 100755 --- a/automake.in +++ b/automake.in @@ -775,16 +775,22 @@ sub handle_programs $output_vars .= $xname . '_LDADD = $(LDADD)' . "\n"; } - # Define prog_LINK unless user did. - if (! &variable_defined ($one_file . '_LINK')) + # Determine program to use for link. + local ($xlink); + if (&variable_defined ($xname . '_LINK')) { - $output_vars .= $xname . '_LINK = $(LINK)' . "\n"; + $xlink = $xname . '_LINK'; + } + else + { + $xlink = 'LINK'; } $output_rules .= &file_contents_with_transform ('s/\@PROGRAM\@/' . $one_file . '/go;' - . 's/\@XPROGRAM\@/' . $xname . '/go;', + . 's/\@XPROGRAM\@/' . $xname . '/go;' + . 's/\@XLINK\@/' . $xlink . '/go;', 'program'); } diff --git a/lib/am/program.am b/lib/am/program.am index 87abac0..0322779 100644 --- a/lib/am/program.am +++ b/lib/am/program.am @@ -16,4 +16,4 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. @PROGRAM@: $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_DEPENDENCIES) - $(@XPROGRAM@_LINK) $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_LDADD) $(LIBS) + $(@XLINK@) $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_LDADD) $(LIBS) diff --git a/program.am b/program.am index 87abac0..0322779 100644 --- a/program.am +++ b/program.am @@ -16,4 +16,4 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. @PROGRAM@: $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_DEPENDENCIES) - $(@XPROGRAM@_LINK) $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_LDADD) $(LIBS) + $(@XLINK@) $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_LDADD) $(LIBS) -- 2.7.4