$type = substr($i,1,(length $i)-2);
} else {
if ($i =~ /\?$/) {
- # Source files with a trailing question mark are optional:
+ # Object files with a trailing question mark are optional:
# the build can proceed fine without them, so we only use
- # them if they're present.
+ # them if their primary source files are present.
$i =~ s/\?$//;
$i = undef unless defined &finddep($i);
+ } elsif ($i =~ /\|/) {
+ # Object file descriptions containing a vertical bar are
+ # lists of choices: we use the _first_ one whose primary
+ # source file is present.
+ @options = split /\|/, $i;
+ $j = undef;
+ foreach $k (@options) {
+ $j=$k, last if defined &finddep($k);
+ }
+ die "no alternative found for $i\n" unless defined $j;
+ $i = $j;
}
if (defined $i) {
push @$listref, $i;
"# RCINC = --include-dir c:\\cygwin\\include\\\n".
"\n".
&splitline("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
- " -D_NO_OLDNAMES -DNO_MULTIMON " .
+ " -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP " .
(join " ", map {"-I$dirpfx$_"} @srcdirs)) .
"\n".
"LDFLAGS = -mno-cygwin -s\n".
&splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1".
- " --define WINVER=0x0400 --define MINGW32_FIX=1")."\n".
+ " --define WINVER=0x0400 --define MINGW32_FIX=1 " .
+ (join " ", map {"--include $dirpfx$_"} @srcdirs) )."\n".
"\n";
print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("G:C"));
print "\n\n";