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

Remove Makefile.bor.

After a conversation this week with a user who tried to use it, it's
clear that Borland C can't build the up-to-date PuTTY without having
to make too many compromises of functionality (unsupported API
details, no 'long long' type), even above the issues that could be
worked round with extra porting ifdefs.
This commit is contained in:
Simon Tatham 2017-09-13 19:24:17 +01:00
parent 4634cd47f7
commit 4ec2791945
6 changed files with 5 additions and 127 deletions

2
.gitignore vendored
View File

@ -19,7 +19,6 @@
/*.tds
/*.td2
/*.map
/Makefile.bor
/Makefile.mgw
/Makefile.vc
/Makefile.lcc
@ -128,7 +127,6 @@
/windows/*.td2
/windows/*.map
/windows/Makefile.clangcl
/windows/Makefile.bor
/windows/Makefile.mgw
/windows/Makefile.vc
/windows/Makefile.lcc

4
README
View File

@ -34,10 +34,6 @@ For building on Windows:
MSVC/putty/putty.dsp builds PuTTY itself, MSVC/plink/plink.dsp
builds Plink, and so on.
- windows/Makefile.bor is for the Borland C compiler. Type `make -f
Makefile.bor' while in the `windows' subdirectory to build all
the PuTTY binaries.
- windows/Makefile.mgw is for MinGW / Cygwin installations. Type
`make -f Makefile.mgw' while in the `windows' subdirectory to
build all the PuTTY binaries.

1
Recipe
View File

@ -16,7 +16,6 @@
!makefile vc windows/Makefile.vc
!makefile vcproj windows/MSVC
!makefile cygwin windows/Makefile.mgw
!makefile borland windows/Makefile.bor
!makefile lcc windows/Makefile.lcc
!makefile gtk unix/Makefile.gtk
!makefile unix unix/Makefile.ux

View File

@ -138,9 +138,9 @@ construct. Use these wherever possible.
\H{udp-multi-compiler} Independence of specific compiler
Windows PuTTY can currently be compiled with any of four Windows
compilers: MS Visual C, Borland's freely downloadable C compiler,
the Cygwin / \cw{mingw32} GNU tools, and \cw{lcc-win32}.
Windows PuTTY can currently be compiled with any of three Windows
compilers: MS Visual C, the Cygwin / \cw{mingw32} GNU tools, and
\cw{clang} (in MS compatibility mode).
This is a really useful property of PuTTY, because it means people
who want to contribute to the coding don't depend on having a

View File

@ -268,7 +268,7 @@ sub mfval($) {
# Returns true if the argument is a known makefile type. Otherwise,
# prints a warning and returns false;
if (grep { $type eq $_ }
("vc","vcproj","cygwin","borland","lcc","devcppproj","gtk","unix",
("vc","vcproj","cygwin","lcc","devcppproj","gtk","unix",
"am","osx","vstudio10","vstudio12","clangcl")) {
return 1;
}
@ -659,121 +659,6 @@ if (defined $makefiles{'cygwin'}) {
}
##-- Borland makefile
if (defined $makefiles{'borland'}) {
$dirpfx = &dirpfx($makefiles{'borland'}, "\\");
%stdlibs = ( # Borland provides many Win32 API libraries intrinsically
"advapi32" => 1,
"comctl32" => 1,
"comdlg32" => 1,
"gdi32" => 1,
"imm32" => 1,
"shell32" => 1,
"user32" => 1,
"winmm" => 1,
"winspool" => 1,
"wsock32" => 1,
);
open OUT, ">$makefiles{'borland'}"; select OUT;
print
"# Makefile for $project_name under Borland C.\n".
"#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
"# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
# bcc32 command line option is -D not /D
($_ = $help) =~ s/([=" ])\/D/$1-D/gs;
print $_;
print
"\n".
"# If you rename this file to `Makefile', you should change this line,\n".
"# so that the .rsp files still depend on the correct makefile.\n".
"MAKEFILE = Makefile.bor\n".
"\n".
"# C compilation flags\n".
"CFLAGS = -D_WINDOWS -DWINVER=0x0500\n".
"# Resource compilation flags\n".
"RCFLAGS = -DNO_WINRESRC_H -DWIN32 -D_WIN32 -DWINVER=0x0401\n".
"\n".
"# Get include directory for resource compiler\n".
"!if !\$d(BCB)\n".
"BCB = \$(MAKEDIR)\\..\n".
"!endif\n".
"\n".
&def($makefile_extra{'borland'}->{'vars'}) .
"\n".
".c.obj:\n".
&splitline("\tbcc32 -w-aus -w-ccc -w-par -w-pia \$(COMPAT)".
" \$(CFLAGS) \$(XFLAGS) ".
(join " ", map {"-I$dirpfx$_"} @srcdirs) .
" /c \$*.c",69)."\n".
".rc.res:\n".
&splitline("\tbrcc32 \$(RCFL) -i \$(BCB)\\include -r".
" \$(RCFLAGS) \$*.rc",69)."\n".
"\n";
print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("G:C"));
print "\n\n";
foreach $p (&prognames("G:C")) {
($prog, $type) = split ",", $p;
$objstr = &objects($p, "X.obj", "X.res", undef);
print &splitline("$prog.exe: " . $objstr . " $prog.rsp"), "\n";
my $ap = ($type eq "G") ? "-aa" : "-ap";
print "\tilink32 $ap -Gn -L\$(BCB)\\lib \@$prog.rsp\n\n";
}
foreach $p (&prognames("G:C")) {
($prog, $type) = split ",", $p;
print $prog, ".rsp: \$(MAKEFILE)\n";
$objstr = &objects($p, "X.obj", undef, undef);
@objlist = split " ", $objstr;
@objlines = ("");
foreach $i (@objlist) {
if (length($objlines[$#objlines] . " $i") > 50) {
push @objlines, "";
}
$objlines[$#objlines] .= " $i";
}
$c0w = ($type eq "G") ? "c0w32" : "c0x32";
print "\techo $c0w + > $prog.rsp\n";
for ($i=0; $i<=$#objlines; $i++) {
$plus = ($i < $#objlines ? " +" : "");
print "\techo$objlines[$i]$plus >> $prog.rsp\n";
}
print "\techo $prog.exe >> $prog.rsp\n";
$objstr = &objects($p, "X.obj", "X.res", undef);
@libs = split " ", &objects($p, undef, undef, "X");
@libs = grep { !$stdlibs{$_} } @libs;
unshift @libs, "cw32", "import32";
$libstr = join ' ', @libs;
print "\techo nul,$libstr, >> $prog.rsp\n";
print "\techo " . &objects($p, undef, "X.res", undef) . " >> $prog.rsp\n";
print "\n";
}
foreach $d (&deps("X.obj", "X.res", $dirpfx, "\\", "borland")) {
if ($forceobj{$d->{obj_orig}}) {
printf("%s: FORCE\n", $d->{obj});
} else {
print &splitline(sprintf("%s: %s", $d->{obj},
join " ", @{$d->{deps}})), "\n";
}
}
print "\n";
print &def($makefile_extra{'borland'}->{'end'});
print "\nclean:\n".
"\t-del *.obj\n".
"\t-del *.exe\n".
"\t-del *.res\n".
"\t-del *.pch\n".
"\t-del *.aps\n".
"\t-del *.il*\n".
"\t-del *.pdb\n".
"\t-del *.rsp\n".
"\t-del *.tds\n".
"\t-del *.\$\$\$\$\$\$\n".
"\n".
"FORCE:\n".
"\t-rem dummy command\n";
select STDOUT; close OUT;
}
if (defined $makefiles{'vc'}) {
$dirpfx = &dirpfx($makefiles{'vc'}, "\\");

View File

@ -9,7 +9,7 @@
#include <win.h>
#else
/* Some compilers, like Borland, don't have winresrc.h */
/* Some compilers don't have winresrc.h */
#ifndef NO_WINRESRC_H
#ifndef MSVC4
#include <winresrc.h>