From 604a39beef75f3fcb7753c49f98902374b137d41 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 1 Oct 2002 18:16:15 +0000 Subject: [PATCH] Add SHOBJPREFIX AND SHOBJSUFFIX. git-svn-id: http://scons.tigris.org/svn/scons/trunk@472 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- doc/man/scons.1 | 19 +++++++++++++------ src/CHANGES.txt | 3 +++ src/engine/SCons/Defaults.py | 6 +++--- src/engine/SCons/Platform/cygwin.py | 2 ++ src/engine/SCons/Platform/os2.py | 2 ++ src/engine/SCons/Platform/posix.py | 2 ++ src/engine/SCons/Platform/win32.py | 2 ++ 7 files changed, 27 insertions(+), 9 deletions(-) diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 6ff35db2..47e21410 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -882,11 +882,12 @@ Source files must have one of the same set of extensions specified above for the .B StaticObject builder. -The target object file prefix -(specified by the $OBJPREFIX construction variable; nothing by default) +The target shared object file prefix +(specified by the $SHOBJPREFIX construction variable; +by default, the same as $OBJPREFIX) and suffix -(specified by the $OBJSUFFIX construction variable; -\.obj on Windows systems, .o on POSIX systems) +(specified by the $SHOBJSUFFIX construction variable; +by default, the same as $OBJSUFFIX) are automatically added to the target if not already present. Examples: @@ -1781,10 +1782,10 @@ General options passed to the linker. The command line used to link object files into an executable. .IP OBJPREFIX -The prefix used for object file names. +The prefix used for (static) object file names. .IP OBJSUFFIX -The suffix used for object file names. +The suffix used for (static) object file names. .IP PDFCOM The command line used to convert TeX DVI files into a PDF file. @@ -1875,6 +1876,12 @@ The linker for programs that use shared libraries. .IP SHLINKFLAGS General options passed to the linker for programs using shared libraries. +.IP SHOBJPREFIX +The prefix used for shared object file names. + +.IP SHOBJSUFFIX +The suffix used for shared object file names. + .IP TAR The tar archiver. diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 3ad1fc7d..0d506287 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -45,6 +45,9 @@ RELEASE 0.09 - ...," "done reading SConscript files," "Building targets," and "done building targets." + - Add separate $SHOBJPREFIX and $SHOBJSUFFIX construction variables + (by default, the same as $OBJPREFIX and $OBJSUFFIX). + From Jeff Petkau: - Fix interpretation of '#/../foo' on Win32 systems. diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py index 136b3e0c..d70be0d2 100644 --- a/src/engine/SCons/Defaults.py +++ b/src/engine/SCons/Defaults.py @@ -140,8 +140,8 @@ def StaticObject(): def SharedObject(): """A function for generating the shared object Builder.""" return SCons.Builder.Builder(action = {}, - prefix = '$OBJPREFIX', - suffix = '$OBJSUFFIX', + prefix = '$SHOBJPREFIX', + suffix = '$SHOBJSUFFIX', src_builder = ['CFile', 'CXXFile']) ProgScan = SCons.Scanner.Prog.ProgScan() @@ -157,7 +157,7 @@ SharedLibrary = SCons.Builder.Builder(action=[ SharedCheck, "$SHLINKCOM" ], prefix = '$SHLIBPREFIX', suffix = '$SHLIBSUFFIX', scanner = ProgScan, - src_suffix = '$OBJSUFFIX', + src_suffix = '$SHOBJSUFFIX', src_builder = 'SharedObject') def DVI(): diff --git a/src/engine/SCons/Platform/cygwin.py b/src/engine/SCons/Platform/cygwin.py index c01c022d..47b64d66 100644 --- a/src/engine/SCons/Platform/cygwin.py +++ b/src/engine/SCons/Platform/cygwin.py @@ -40,6 +40,8 @@ def generate(env): env['ENV']['PATH'] = '/usr/local/bin:/bin:/usr/bin' env['OBJPREFIX'] = '' env['OBJSUFFIX'] = '.o' + env['SHOBJPREFIX'] = '$OBJPREFIX' + env['SHOBJSUFFIX'] = '$OBJSUFFIX' env['PROGPREFIX'] = '' env['PROGSUFFIX'] = '.exe' env['LIBPREFIX'] = 'lib' diff --git a/src/engine/SCons/Platform/os2.py b/src/engine/SCons/Platform/os2.py index d56150c0..c3895219 100644 --- a/src/engine/SCons/Platform/os2.py +++ b/src/engine/SCons/Platform/os2.py @@ -39,6 +39,8 @@ def generate(env): env['ENV'] = {} env['OBJPREFIX'] = '' env['OBJSUFFIX'] = '.obj' + env['SHOBJPREFIX'] = '$OBJPREFIX' + env['SHOBJSUFFIX'] = '$OBJSUFFIX' env['PROGPREFIX'] = '' env['PROGSUFFIX'] = '.exe' env['LIBPREFIX'] = '' diff --git a/src/engine/SCons/Platform/posix.py b/src/engine/SCons/Platform/posix.py index ab3fb7fc..551265c7 100644 --- a/src/engine/SCons/Platform/posix.py +++ b/src/engine/SCons/Platform/posix.py @@ -40,6 +40,8 @@ def generate(env): env['ENV']['PATH'] = '/usr/local/bin:/bin:/usr/bin' env['OBJPREFIX'] = '' env['OBJSUFFIX'] = '.o' + env['SHOBJPREFIX'] = '$OBJPREFIX' + env['SHOBJSUFFIX'] = '$OBJSUFFIX' env['PROGPREFIX'] = '' env['PROGSUFFIX'] = '' env['LIBPREFIX'] = 'lib' diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py index ea6a23b5..5ad9ff17 100644 --- a/src/engine/SCons/Platform/win32.py +++ b/src/engine/SCons/Platform/win32.py @@ -40,6 +40,8 @@ def generate(env): env['ENV']['PATHEXT'] = '.COM;.EXE;.BAT;.CMD' env['OBJPREFIX'] = '' env['OBJSUFFIX'] = '.obj' + env['SHOBJPREFIX'] = '$OBJPREFIX' + env['SHOBJSUFFIX'] = '$OBJSUFFIX' env['PROGPREFIX'] = '' env['PROGSUFFIX'] = '.exe' env['LIBPREFIX'] = '' -- 2.26.2