From: Tom Tromey Date: Sat, 22 Mar 1997 07:18:50 +0000 (+0000) Subject: cygwin fixes X-Git-Tag: pre-ian-conditionals~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4aa44f6a1dfd652248e4d84e1dd10473edab1f06;p=thirdparty%2Fautomake.git cygwin fixes --- diff --git a/ChangeLog b/ChangeLog index 21917920f..5c0dd06ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ Sat Mar 22 00:06:00 1997 Tom Tromey + * automake.in (am_install_var): Make sure to delete + CYGWIN/NOTCYGWIN tokens as appropriate. + (handle_programs): Remove NOTCYGWIN tokens as well. + + * program.am: Remove executable before linking. + * texinfos.am (.texi.dvi): Look in @TEXINFODIR@ for texinfo.tex. (.texinfo.dvi): Likewise. diff --git a/automake.in b/automake.in index 170650beb..a2a4955b2 100755 --- a/automake.in +++ b/automake.in @@ -1413,10 +1413,14 @@ sub handle_programs $xlink = $linker ? $linker : 'LINK'; } - local ($cygxform) = ''; + local ($cygxform); if (! $seen_cygwin32) { - $cygxform .= 's/^CYGWIN.*$//;'; + $cygxform = 's/^CYGWIN.*$//; s/^NOTCYGWIN//;'; + } + else + { + $cygxform = 's/^NOTCYGWIN.$*//; s/^CYGWIN//;'; } $output_rules .= @@ -4734,11 +4738,11 @@ sub am_install_var local ($cygxform); if (! $seen_cygwin32) { - $cygxform = 's/\@EXEEXT\@//g; s/^NOTCYGWIN.*$//;'; + $cygxform = 's/\@EXEEXT\@//g; s/^NOTCYGWIN.*$//; s/^CYGWIN//;'; } else { - $cygxform .= 's/^CYGWIN.*$//;'; + $cygxform .= 's/^CYGWIN.*$//; s/^NOTCYGWIN//;'; } while (@args) diff --git a/lib/am/program.am b/lib/am/program.am index a4ca3e624..587f5cf43 100644 --- a/lib/am/program.am +++ b/lib/am/program.am @@ -16,6 +16,13 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. @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. +NOTCYWIN @rm -f @PROGRAM@ +CYGWIN @rm -f @PROGRAM@$(EXEEXT) $(@XLINK@) $(@XPROGRAM@_LDFLAGS) $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_LDADD) $(LIBS) ## Why take such a funny approach to Cygwin32 executables? Why not ## just rewrite this file to PROGRAM$(EXEEXT), and then rewrite diff --git a/program.am b/program.am index a4ca3e624..587f5cf43 100644 --- a/program.am +++ b/program.am @@ -16,6 +16,13 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. @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. +NOTCYWIN @rm -f @PROGRAM@ +CYGWIN @rm -f @PROGRAM@$(EXEEXT) $(@XLINK@) $(@XPROGRAM@_LDFLAGS) $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_LDADD) $(LIBS) ## Why take such a funny approach to Cygwin32 executables? Why not ## just rewrite this file to PROGRAM$(EXEEXT), and then rewrite