Drop Borland compiler specific code

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/29/head
Michele Calgaro 4 months ago
parent 4ab9fdc0fc
commit 4631d9e47b
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -366,8 +366,7 @@ work of creating these additional configuration modules.
.. attribute:: generator
A string that defines the platform specific style of Makefile. The
only supported values are ``UNIX``, ``MSVC``, ``MSVC.NET``, ``MINGW``
and ``BMAKE``.
only supported values are ``UNIX``, ``MSVC``, ``MSVC.NET`` and ``MINGW``.
.. attribute:: mkdir

@ -135,23 +135,6 @@ option to specify the correct platform. For example::
c:\python26\python configure.py --platform win32-g++
Configuring for the Borland C++ Compiler
****************************************
SIP, and the modules it generates, can be built with the free Borland C++
compiler. You must use the :option:`--platform <configure.py -p>` command line
option to specify the correct platform. For example::
c:\python26\python configure.py --platform win32-borland
You must also make sure you have a Borland-compatible version of the Python
library. If you are using the standard Python distribution (built using the
Microsoft compiler) then you must convert the format of the Python library.
For example::
coff2omf python26.lib python26_bcpp.lib
Building
--------

@ -526,8 +526,7 @@ specific prefixes, version numbers or extensions).</dd></dl>
<dt id="sipconfig.Makefile.generator">
<tt class="descname">generator</tt><a class="headerlink" href="#sipconfig.Makefile.generator" title="Permalink to this definition"></a></dt>
<dd>A string that defines the platform specific style of Makefile. The
only supported values are <tt class="docutils literal"><span class="pre">UNIX</span></tt>, <tt class="docutils literal"><span class="pre">MSVC</span></tt>, <tt class="docutils literal"><span class="pre">MSVC.NET</span></tt>, <tt class="docutils literal"><span class="pre">MINGW</span></tt>
and <tt class="docutils literal"><span class="pre">BMAKE</span></tt>.</dd></dl>
only supported values are <tt class="docutils literal"><span class="pre">UNIX</span></tt>, <tt class="docutils literal"><span class="pre">MSVC</span></tt>, <tt class="docutils literal"><span class="pre">MSVC.NET</span></tt> and <tt class="docutils literal"><span class="pre">MINGW</span></tt>.</dd></dl>
<dl class="attribute">
<dt id="sipconfig.Makefile.mkdir">
@ -1179,4 +1178,4 @@ compiling the generated module.</li>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>
</html>

@ -178,20 +178,6 @@ option to specify the correct platform. For example:</p>
<div class="highlight-python"><pre>c:\python26\python configure.py --platform win32-g++</pre>
</div>
</div>
<div class="section" id="configuring-for-the-borland-c-compiler">
<h3>Configuring for the Borland C++ Compiler<a class="headerlink" href="#configuring-for-the-borland-c-compiler" title="Permalink to this headline"></a></h3>
<p>SIP, and the modules it generates, can be built with the free Borland C++
compiler. You must use the <a class="reference internal" href="#cmdoption-configure.py-p"><em class="xref">--platform</em></a> command line
option to specify the correct platform. For example:</p>
<div class="highlight-python"><pre>c:\python26\python configure.py --platform win32-borland</pre>
</div>
<p>You must also make sure you have a Borland-compatible version of the Python
library. If you are using the standard Python distribution (built using the
Microsoft compiler) then you must convert the format of the Python library.
For example:</p>
<div class="highlight-python"><pre>coff2omf python26.lib python26_bcpp.lib</pre>
</div>
</div>
</div>
<div class="section" id="building">
<h2>Building<a class="headerlink" href="#building" title="Permalink to this headline"></a></h2>
@ -220,7 +206,6 @@ example:</p>
<li><a class="reference external" href="#downloading">Downloading</a></li>
<li><a class="reference external" href="#configuring">Configuring</a><ul>
<li><a class="reference external" href="#configuring-for-mingw">Configuring for MinGW</a></li>
<li><a class="reference external" href="#configuring-for-the-borland-c-compiler">Configuring for the Borland C++ Compiler</a></li>
</ul>
</li>
<li><a class="reference external" href="#building">Building</a></li>
@ -274,4 +259,4 @@ example:</p>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>
</html>

File diff suppressed because one or more lines are too long

@ -31,15 +31,6 @@
#include <Python.h>
/*
* There is a mis-feature somewhere with the Borland compiler. This works
* around it.
*/
#if defined(__BORLANDC__)
#include <rpc.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif

@ -421,16 +421,6 @@ class Makefile:
py_lib = "python%u%u" % ((self.config.py_version >> 16), ((self.config.py_version >> 8) & 0xff))
# For Borland use the OMF version of the Python library if it
# exists, otherwise assume that Python was built with Borland
# and use the normal library.
if self.generator == "BMAKE":
bpy_lib = py_lib + "_bcpp"
bpy_lib_path = os.path.join(self.config.py_lib_dir, self.platform_lib(bpy_lib))
if os.access(bpy_lib_path, os.F_OK):
py_lib = bpy_lib
if self._debug:
py_lib = py_lib + "_d"
@ -440,7 +430,7 @@ class Makefile:
libs.append(self.platform_lib(py_lib))
if self.generator in ("MSVC", "MSVC.NET", "BMAKE"):
if self.generator in ("MSVC", "MSVC.NET"):
if win_exceptions:
cflags_exceptions = "CFLAGS_EXCEPTIONS_ON"
cxxflags_exceptions = "CXXFLAGS_EXCEPTIONS_ON"
@ -494,7 +484,7 @@ class Makefile:
cxxflags_debug = "CXXFLAGS_RELEASE"
lflags_debug = "LFLAGS_RELEASE"
if self.generator in ("MSVC", "MSVC.NET", "BMAKE"):
if self.generator in ("MSVC", "MSVC.NET"):
if self._threaded:
cflags.extend(self.optional_list(cflags_mt))
cxxflags.extend(self.optional_list(cxxflags_mt))
@ -540,7 +530,7 @@ class Makefile:
# Windows needs the version number appended if TQt is a DLL.
tqt_lib = self.config.tqt_lib
if self.generator in ("MSVC", "MSVC.NET", "BMAKE") and win_shared:
if self.generator in ("MSVC", "MSVC.NET") and win_shared:
tqt_lib = tqt_lib + version_to_string(self.config.tqt_version).replace(".", "")
if self.config.tqt_edition == "non-commercial":
@ -664,7 +654,7 @@ class Makefile:
clib is the library name in cannonical form.
"""
if self.generator in ("MSVC", "MSVC.NET", "BMAKE"):
if self.generator in ("MSVC", "MSVC.NET"):
plib = clib + ".lib"
else:
plib = "-l" + clib
@ -679,7 +669,7 @@ class Makefile:
"""
prl_libs = []
if self.generator in ("MSVC", "MSVC.NET", "BMAKE"):
if self.generator in ("MSVC", "MSVC.NET"):
prl_name = os.path.join(self.config.tqt_lib_dir, clib + ".prl")
else:
prl_name = os.path.join(self.config.tqt_lib_dir, "lib" + clib + ".prl")
@ -765,7 +755,7 @@ class Makefile:
bdict[i] = ""
# Generate the list of objects.
if self.generator in ("MSVC", "MSVC.NET", "BMAKE"):
if self.generator in ("MSVC", "MSVC.NET"):
ext = ".obj"
else:
ext = ".o"
@ -937,23 +927,6 @@ class Makefile:
\t$(CC) -c $(CFLAGS) $(CPPFLAGS) -Fo @<<
\t$<
<<
""")
elif self.generator == "BMAKE":
mfile.write("""
.cpp.obj:
\t$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o$@ $<
.cc.obj:
\t$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o$@ $<
.cxx.obj:
\t$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o$@ $<
.C.obj:
\t$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o$@ $<
.c.obj:
\t$(CC) -c $(CFLAGS) $(CPPFLAGS) -o$@ $<
""")
else:
mfile.write("""
@ -1353,7 +1326,7 @@ class ModuleMakefile(Makefile):
mfile.write("\n")
if self.static:
if self.generator in ("MSVC", "MSVC.NET", "BMAKE"):
if self.generator in ("MSVC", "MSVC.NET"):
mfile.write("LIB = %s\n" % self.required_string("LIB"))
elif self.generator == "MINGW":
mfile.write("AR = %s\n" % self.required_string("LIB"))
@ -1399,33 +1372,6 @@ class ModuleMakefile(Makefile):
if self._manifest:
mfile.write("\tmt -nologo -manifest $(TARGET).manifest -outputresource:$(TARGET);2\n")
elif self.generator == "BMAKE":
if self.static:
mfile.write("\t-%s $(TARGET)\n" % (self.rm))
mfile.write("\t$(LIB) $(TARGET) @&&|\n")
for of in self._build["objects"].split():
mfile.write("+%s \\\n" % (of))
mfile.write("|\n")
else:
mfile.write("\t$(LINK) @&&|\n")
mfile.write("\t$(LFLAGS) $(OFILES) ,$(TARGET),,$(LIBS),%s\n" % (self._target))
mfile.write("|\n")
# Create the .def file that renames the entry point.
defname = os.path.join(self.dir, self._target + ".def")
try:
dfile = open(defname, "w")
except IOError:
error("Unable to create \"%s\"" % defname)
dfile.write("EXPORTS\n")
dfile.write("%s=_%s\n" % (self._entry_point, self._entry_point))
dfile.close()
else:
if self.static:
mfile.write("\t-%s $(TARGET)\n" % self.rm)
@ -1565,17 +1511,10 @@ class ProgramMakefile(Makefile):
build.extend(self.optional_list("CXXFLAGS"))
# Borland requires all flags to precede all file names.
if self.generator != "BMAKE":
build.append(source)
if self.generator in ("MSVC", "MSVC.NET"):
build.append("-Fe")
build.append("/link")
libdir_prefix = "/LIBPATH:"
elif self.generator == "BMAKE":
build.append("-e" + exe)
libdir_prefix = "-L"
else:
build.append("-o")
build.append(exe)
@ -1586,34 +1525,9 @@ class ProgramMakefile(Makefile):
lflags = self.optional_list("LFLAGS")
# This is a huge hack demonstrating my lack of understanding of how the
# Borland compiler works.
if self.generator == "BMAKE":
blflags = []
for lf in lflags:
for f in lf.split():
# Tell the compiler to pass the flags to the linker.
if f[-1] == "-":
f = "-l-" + f[1:-1]
elif f[0] == "-":
f = "-l" + f[1:]
# Remove any explicit object files otherwise the compiler
# will complain that they can't be found, but they don't
# seem to be needed.
if f[-4:].lower() != ".obj":
blflags.append(f)
lflags = blflags
build.extend(lflags)
build.extend(self.optional_list("LIBS"))
if self.generator == "BMAKE":
build.append(source)
return (exe, ' '.join(build))
def finalise(self):
@ -1680,10 +1594,6 @@ class ProgramMakefile(Makefile):
mfile.write("\t$(LINK) $(LFLAGS) /OUT:$(TARGET) @<<\n")
mfile.write("\t $(OFILES) $(LIBS)\n")
mfile.write("<<\n")
elif self.generator == "BMAKE":
mfile.write("\t$(LINK) @&&|\n")
mfile.write("\t$(LFLAGS) $(OFILES) ,$(TARGET),,$(LIBS),,\n")
mfile.write("|\n")
else:
mfile.write("\t$(LINK) $(LFLAGS) -o $(TARGET) $(OFILES) $(LIBS)\n")

@ -1,90 +0,0 @@
#
# qmake configuration for win32-borland
#
# Written for Borland C++
#
MAKEFILE_GENERATOR = BMAKE
TEMPLATE = app
CONFIG += qt warn_on release link_prl copy_dir_files no_empty_targets cd_change_global debug_and_release debug_and_release_target
QT += core gui
DEFINES += UNICODE
QMAKE_NOFORCE = 1
QMAKE_COMPILER_DEFINES += __BORLANDC__ WIN32
QMAKE_CC = bcc32
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -tWR -tWM
QMAKE_CFLAGS_WARN_ON = -w -w-hid
QMAKE_CFLAGS_WARN_OFF = -w-
QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_DEBUG = -v
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_CONSOLE = -tWC
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_CONSOLE = $$QMAKE_CFLAGS_CONSOLE
QMAKE_CXXFLAGS_STL_ON =
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON =
QMAKE_CXXFLAGS_RTTI_OFF = -RT-
QMAKE_CXXFLAGS_EXCEPTIONS_ON =
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -x-
QMAKE_INCDIR =
QMAKE_LIBDIR = $(BCB)\lib
QMAKE_INCDIR_TQT = $$[QT_INSTALL_HEADERS]
QMAKE_LIBDIR_TQT = $$[QT_INSTALL_LIBS]
QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o$obj $src
QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o$@ $<
QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o$obj $src
QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o$@ $<
QMAKE_LINK = ilink32
QMAKE_LFLAGS = -c -x -Gn
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG = -v
QMAKE_LFLAGS_CONSOLE = -ap -Tpe c0x32.obj
QMAKE_LFLAGS_WINDOWS = -aa -Tpe c0w32.obj
QMAKE_LFLAGS_DLL= -Gi -aa -Tpd c0d32.obj
QMAKE_LIBS = import32.lib cw32mti.lib
QMAKE_LIBS_CORE =
QMAKE_LIBS_GUI =
QMAKE_LIBS_NETWORK = ws2_32.lib
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_QT_ENTRY = -lqtmain
#QMAKE_LIBS_OPENGL =
#QMAKE_LFLAGS_OPENGL = /dopengl32.dll
QMAKE_MOC = $$[QT_INSTALL_BINS]\tqmoc.exe
QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
QMAKE_IDL = midl
QMAKE_LIB = tlib /C /P256
QMAKE_RC = brcc32 -dQ_CC_BOR
QMAKE_ZIP = zip -r -9
QMAKE_COPY = copy /y
QMAKE_COPY_DIR = xcopy /s /q /y /i
QMAKE_MOVE = move
QMAKE_DEL_FILE = del
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = if not exist
QMAKE_MKDIR = mkdir
load(qt_config)

@ -366,8 +366,7 @@ work of creating these additional configuration modules.
.. attribute:: generator
A string that defines the platform specific style of Makefile. The
only supported values are ``UNIX``, ``MSVC``, ``MSVC.NET``, ``MINGW``
and ``BMAKE``.
only supported values are ``UNIX``, ``MSVC``, ``MSVC.NET`` and ``MINGW``.
.. attribute:: mkdir

@ -135,23 +135,6 @@ option to specify the correct platform. For example::
c:\python26\python configure.py --platform win32-g++
Configuring for the Borland C++ Compiler
****************************************
SIP, and the modules it generates, can be built with the free Borland C++
compiler. You must use the :option:`--platform <configure.py -p>` command line
option to specify the correct platform. For example::
c:\python26\python configure.py --platform win32-borland
You must also make sure you have a Borland-compatible version of the Python
library. If you are using the standard Python distribution (built using the
Microsoft compiler) then you must convert the format of the Python library.
For example::
coff2omf python26.lib python26_bcpp.lib
Building
--------

Loading…
Cancel
Save