Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
d786b1a9
Commit
d786b1a9
authored
Aug 16, 2001
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Patch #441691] preprocess() method for Borland C compiler.
I have no way of testing this.
parent
95bdf9af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
bcppcompiler.py
bcppcompiler.py
+35
-1
No files found.
bcppcompiler.py
View file @
d786b1a9
...
...
@@ -21,7 +21,7 @@ from distutils.errors import \
from
distutils.ccompiler
import
\
CCompiler
,
gen_preprocess_options
,
gen_lib_options
from
distutils.file_util
import
write_file
from
distutils.dep_util
import
newer
class
BCPPCompiler
(
CCompiler
)
:
"""Concrete class that implements an interface to the Borland C/C++
...
...
@@ -373,3 +373,37 @@ class BCPPCompiler(CCompiler) :
return
obj_names
# object_filenames ()
def
preprocess
(
self
,
source
,
output_file
=
None
,
macros
=
None
,
include_dirs
=
None
,
extra_preargs
=
None
,
extra_postargs
=
None
):
(
_
,
macros
,
include_dirs
)
=
\
self
.
_fix_compile_args
(
None
,
macros
,
include_dirs
)
pp_opts
=
gen_preprocess_options
(
macros
,
include_dirs
)
pp_args
=
[
'cpp32.exe'
]
+
pp_opts
if
output_file
is
not
None
:
pp_args
.
append
(
'-o'
+
output_file
)
if
extra_preargs
:
pp_args
[:
0
]
=
extra_preargs
if
extra_postargs
:
pp_args
.
extend
(
extra_postargs
)
pp_args
.
append
(
source
)
# We need to preprocess: either we're being forced to, or the
# source file is newer than the target (or the target doesn't
# exist).
if
self
.
force
or
output_file
is
None
or
newer
(
source
,
output_file
):
if
output_file
:
self
.
mkpath
(
os
.
path
.
dirname
(
output_file
))
try
:
self
.
spawn
(
pp_args
)
except
DistutilsExecError
,
msg
:
print
msg
raise
CompileError
,
msg
# preprocess()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment