Sat Mar 22 00:06:00 1997 Tom Tromey <tromey@cygnus.com>
+ * 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.
$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 .=
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)
## 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
## 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