* automake.in (am_install_var): Make sure to delete
CYGWIN/NOTCYGWIN tokens as appropriate.
(handle_programs): Remove NOTCYGWIN tokens as well.
+ (file_contents_with_transform): A single newline makes an empty
+ line.
* program.am: Remove executable before linking.
}
else
{
- $cygxform = 's/^NOTCYGWIN.$*//; s/^CYGWIN//;';
+ $cygxform = 's/^NOTCYGWIN.*$//; s/^CYGWIN//;';
}
$output_rules .=
$_ =~ s/\@MAINT\@//g
unless $seen_maint_mode;
- $had_chars = length ($_);
+ $had_chars = length ($_) && $_ ne "\n";
eval $command;
# If the transform caused all the characters to go away, then
# ignore the line. Why do this? Because in Perl 4, a "next"
# inside of an eval doesn't affect a loop outside the eval.
# So we can't pass in a "transform" that uses next. We used
- # to do this.
- next if $had_chars && $_ eq '';
+ # to do this. "Empty" also means consisting of a single
+ # newline.
+ next if $had_chars && ($_ eq '' || $_ eq "\n");
if (/$IGNORE_PATTERN/o)
{
local ($cygxform);
if (! $seen_cygwin32)
{
- $cygxform = 's/\@EXEEXT\@//g; s/^NOTCYGWIN.*$//; s/^CYGWIN//;';
+ $cygxform = 's/\@EXEEXT\@//g; s/^NOTCYGWIN//; s/^CYGWIN.*$//;';
}
else
{
- $cygxform .= 's/^CYGWIN.*$//; s/^NOTCYGWIN//;';
+ $cygxform = 's/\@EXEEXT\@/\$(EXEEXT)/g; s/^CYGWIN//; s/^NOTCYGWIN.*$//;';
}
while (@args)
## 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@
+NOTCYGWIN @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
## 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@
+NOTCYGWIN @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
+Sat Mar 22 01:14:03 1997 Tom Tromey <tromey@cygnus.com>
+
+ * cygwin32.test: New file.
+
Thu Mar 20 00:34:33 1997 Tom Tromey <tromey@cygnus.com>
* exsource.test: Exit if not using GNU make.
ranlib.test confvar.test confvar2.test stdlib.test cxxo.test \
colon2.test colon3.test remake.test output.test output2.test \
remake2.test output3.test output4.test colneq2.test subst.test \
-defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \
-cxxlibobj.test seenc.test
+defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \
+cxxlibobj.test seenc.test cygwin32.test
EXTRA_DIST = defs $(TESTS)
--- /dev/null
+#! /bin/sh
+
+# Test basic Cygwin32 functionality.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_CYGWIN32
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = www
+www_SOURCES = www.c @extra_stuff@
+EXTRA_www_SOURCES = xtra.c
+END
+
+: > www.c
+: > xtra.c
+
+$AUTOMAKE || exit 1
+
+grep '^CYGWIN' Makefile.in && exit 1
+grep 'EXEEXT' Makefile.in