-I {include1}
-I {include2}
{cpp_file}
- ''').strip().replace( '\n', ' \\\n')
+ ''')
jlib.build(
[include1, include2, cpp_file],
o_file,
-I {include2}
{" ".join(o_files)}
{link_l_flags(libmupdf)}
- ''').strip().replace( '\n', ' \\\n')
+ ''')
)
jlib.build(
[include1, include2] + o_files,
-I {include2}
{cpp_files_text}
{link_l_flags(libmupdf)}
- ''').strip().replace( '\n', ' \\\n')
+ ''')
)
command_was_run = jlib.build(
[include1, include2] + cpp_files,
-I {include2}
-o {ofile}
{cpp_file}
- ''').strip().replace( '\n', ' \\\n')
+ ''')
)
jlib.build(
[include1, include2, cpp_file],
-o {libmupdfcpp_so}
{' '.join(ofiles)}
{' '.join(alibs)}
- ''').strip().replace( '\n', ' \\\n')
+ ''')
jlib.build(
ofiles + alibs,
libmupdfcpp_so,
{flags_link2}
{link_l_flags( [libmupdf, libmupdfcpp])}
-Wno-deprecated-declarations
- ''').strip().replace( '\n', ' \\\n')
+ ''')
)
infiles = [
cpp2_path,
-Wno-deprecated-declarations
-Wno-free-nonheap-object
-DSWIG_PYTHON_SILENT_MEMLEAK
- ''').strip().replace( '\n', ' \\\n')
+ ''')
)
infiles = [
cpp_path,
-shared
{flags_link}
{link_l_flags( sos)}
- ''').strip().replace( '\n', ' \\\n')
+ ''')
)
infiles = [
o_file,
-DSWIG_PYTHON_SILENT_MEMLEAK
{flags_link}
{link_l_flags( sos)}
- ''').strip().replace( '\n', ' \\\n')
+ ''')
)
infiles = [
cpp_path,
f' -I {build_dirs.dir_mupdf}/include'
f' -I {build_dirs.dir_mupdf}/platform/c++/include'
)
- # Enable asserts in this test.
- cpp_flags = build_dirs.cpp_flags.replace( '-DNDEBUG', '')
+ cpp_flags = build_dirs.cpp_flags
if state.state_.windows:
win32_infix = _windows_vs_upgrade( vs_upgrade, build_dirs, devenv=None)
windows_build_type = build_dirs.windows_build_type()
/link
{lib}
/out:{exe}
- ''').replace('\n', ' ')
+ ''')
jlib.system(command, verbose=1)
path = os.environ.get('PATH')
env_extra = dict(PATH = f'{build_dirs.dir_so}{os.pathsep}{path}' if path else build_dirs.dir_so)
{includes}
{src}
{link_l_flags( [libmupdf, libmupdfcpp])}
- ''').replace('\n', '\\\n')
+ ''')
jlib.system(command, verbose=1)
jlib.system( 'pwd', verbose=1)
if state.state_.macos:
# include/mupdf/fitz/heap.h. Otherwise swig's preprocessor seems to
# ignore #undef's in include/mupdf/fitz/heap-imp.h then complains
# about redefinition of macros in include/mupdf/fitz/heap.h.
- command = (
- textwrap.dedent(
- f'''
+ command = (f'''
"{swig_command}"
{"-D_WIN32" if state_.windows else ""}
-c++
-ignoremissing
-DMUPDF_FITZ_HEAP_H
{swig_i}
- ''').strip().replace( '\n', "" if state_.windows else " \\\n")
- )
+ ''')
return command
def modify_py( rebuilt, swig_py, do_enums):
# swig generated c dll reference to a c sharp project".
#
dllimport = 'mupdfcsharp.dll'
- command = (
- textwrap.dedent(
- f'''
+ command = (f'''
"{swig_command}"
{"-D_WIN32" if state_.windows else ""}
-c++
-ignoremissing
-DMUPDF_FITZ_HEAP_H
{os.path.relpath(swig_i)}
- ''').strip().replace( '\n', "" if state_.windows else "\\\n")
- )
+ ''')
+
rebuilt = jlib.build(
(swig_i, include1, include2),
(f'{outdir}/mupdf.cs', os.path.relpath(swig_cpp)),