1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Consistently use &def for %makefile_extra pieces.

mkfiles.pl was giving a couple of annoying perl warnings, because some
makefile_extra strings were never set by Recipe. We already have the
&def function to convert undefs into "" for this reason, but weren't
using it everywhere. Now I think we are.
This commit is contained in:
Simon Tatham 2014-11-22 16:30:29 +00:00
parent f454235444
commit 6903e761d5

View File

@ -461,7 +461,7 @@ if (defined $makefiles{'cygwin'}) {
&splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1 ". &splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1 ".
"--define WINVER=0x0400 ".(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n". "--define WINVER=0x0400 ".(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
"\n". "\n".
$makefile_extra{'cygwin'}->{'vars'} . &def($makefile_extra{'cygwin'}->{'vars'}) .
"\n". "\n".
".SUFFIXES:\n". ".SUFFIXES:\n".
"\n"; "\n";
@ -491,7 +491,7 @@ if (defined $makefiles{'cygwin'}) {
} }
} }
print "\n"; print "\n";
print $makefile_extra{'cygwin'}->{'end'} if defined $makefile_extra{'cygwin'}->{'end'}; print &def($makefile_extra{'cygwin'}->{'end'});
print "\nclean:\n". print "\nclean:\n".
"\trm -f *.o *.exe *.res.o *.so *.map\n". "\trm -f *.o *.exe *.res.o *.so *.map\n".
"\n". "\n".
@ -540,7 +540,7 @@ if (defined $makefiles{'borland'}) {
"BCB = \$(MAKEDIR)\\..\n". "BCB = \$(MAKEDIR)\\..\n".
"!endif\n". "!endif\n".
"\n". "\n".
$makefile_extra{'borland'}->{'vars'} . &def($makefile_extra{'borland'}->{'vars'}) .
"\n". "\n".
".c.obj:\n". ".c.obj:\n".
&splitline("\tbcc32 -w-aus -w-ccc -w-par -w-pia \$(COMPAT)". &splitline("\tbcc32 -w-aus -w-ccc -w-par -w-pia \$(COMPAT)".
@ -597,7 +597,7 @@ if (defined $makefiles{'borland'}) {
} }
} }
print "\n"; print "\n";
print $makefile_extra{'borland'}->{'end'} if defined $makefile_extra{'borland'}->{'end'}; print &def($makefile_extra{'borland'}->{'end'});
print "\nclean:\n". print "\nclean:\n".
"\t-del *.obj\n". "\t-del *.obj\n".
"\t-del *.exe\n". "\t-del *.exe\n".
@ -639,7 +639,7 @@ if (defined $makefiles{'vc'}) {
"RCFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs). "RCFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs).
" -DWIN32 -D_WIN32 -DWINVER=0x0400\n". " -DWIN32 -D_WIN32 -DWINVER=0x0400\n".
"\n". "\n".
$makefile_extra{'vc'}->{'vars'} . &def($makefile_extra{'vc'}->{'vars'}) .
"\n". "\n".
"\n"; "\n";
print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("G:C")); print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("G:C"));
@ -680,7 +680,7 @@ if (defined $makefiles{'vc'}) {
} }
} }
print "\n"; print "\n";
print $makefile_extra{'vc'}->{'end'} if defined $makefile_extra{'vc'}->{'end'}; print &def($makefile_extra{'vc'}->{'end'});
print "\nclean: tidy\n". print "\nclean: tidy\n".
"\t-del *.exe\n\n". "\t-del *.exe\n\n".
"tidy:\n". "tidy:\n".
@ -1398,7 +1398,7 @@ if (defined $makefiles{'gtk'}) {
print &splitline("\t\$(CC) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) -c $d->{deps}->[0]\n"); print &splitline("\t\$(CC) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) -c $d->{deps}->[0]\n");
} }
print "\n"; print "\n";
print $makefile_extra{'gtk'}->{'end'}; print &def($makefile_extra{'gtk'}->{'end'});
print "\nclean:\n". print "\nclean:\n".
"\trm -f *.o". (join "", map { " $_" } &progrealnames("X:U")) . "\n"; "\trm -f *.o". (join "", map { " $_" } &progrealnames("X:U")) . "\n";
print "\nFORCE:\n"; print "\nFORCE:\n";
@ -1561,7 +1561,7 @@ if (defined $makefiles{'am'}) {
print "endif\n" if $type eq "X"; print "endif\n" if $type eq "X";
print "\n"; print "\n";
} }
print $makefile_extra{'am'}->{'end'}; print &def($makefile_extra{'am'}->{'end'});
select STDOUT; close OUT; select STDOUT; close OUT;
} }
@ -1592,7 +1592,7 @@ if (defined $makefiles{'lcc'}) {
"\n". "\n".
"# Get include directory for resource compiler\n". "# Get include directory for resource compiler\n".
"\n". "\n".
$makefile_extra{'lcc'}->{'vars'} . &def($makefile_extra{'lcc'}->{'vars'}) .
"\n"; "\n";
print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("G:C")); print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("G:C"));
print "\n\n"; print "\n\n";
@ -1623,7 +1623,7 @@ if (defined $makefiles{'lcc'}) {
} }
} }
print "\n"; print "\n";
print $makefile_extra{'lcc'}->{'end'} if defined $makefile_extra{'lcc'}->{'end'}; print &def($makefile_extra{'lcc'}->{'end'});
print "\nclean:\n". print "\nclean:\n".
"\t-del *.obj\n". "\t-del *.obj\n".
"\t-del *.exe\n". "\t-del *.exe\n".
@ -1654,7 +1654,7 @@ if (defined $makefiles{'osx'}) {
"MLDFLAGS = -framework Cocoa\n". "MLDFLAGS = -framework Cocoa\n".
"ULDFLAGS =\n". "ULDFLAGS =\n".
"\n" . "\n" .
$makefile_extra{'osx'}->{'vars'} . &def($makefile_extra{'osx'}->{'vars'}) .
"\n" . "\n" .
&splitline("all:" . join "", map { " $_" } &progrealnames("MX:U")) . &splitline("all:" . join "", map { " $_" } &progrealnames("MX:U")) .
"\n"; "\n";