summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2015-04-06 16:11:15 (GMT)
committerDirk Baechle <dl9obn@darc.de>2015-04-06 16:11:15 (GMT)
commit08eae186d3237d214b5db70af9e54360002701e4 (patch)
treeadb5ebc87bea4941cf4cf815f3b870a65885f9ae
parent0aae461a4be40d812ba8ec7c1026a7188101e4a4 (diff)
parent46536adb150648780c0f79cc26390376a386894f (diff)
downloadSCons-08eae186d3237d214b5db70af9e54360002701e4.zip
SCons-08eae186d3237d214b5db70af9e54360002701e4.tar.gz
SCons-08eae186d3237d214b5db70af9e54360002701e4.tar.bz2
Merged in bdbaddog/scons (pull request #230), extending docs for InstallVersionedLib and SharedLibrary
-rw-r--r--SConstruct29
-rw-r--r--doc/generated/builders.gen24
-rw-r--r--doc/man/scons.xml4
-rw-r--r--src/CHANGES.txt21
-rw-r--r--src/engine/SCons/Tool/__init__.xml5
-rw-r--r--src/engine/SCons/Tool/install.xml19
6 files changed, 86 insertions, 16 deletions
diff --git a/SConstruct b/SConstruct
index ae1a06e..abf5fa8 100644
--- a/SConstruct
+++ b/SConstruct
@@ -172,6 +172,14 @@ if build_id is None:
else:
build_id = ''
+import os.path
+import distutils.command
+
+no_winpack_templates = not os.path.exists(os.path.join(os.path.split(distutils.command.__file__)[0],'wininst-9.0.exe'))
+skip_win_packages = ARGUMENTS.get('SKIP_WIN_PACKAGES',False) or no_winpack_templates
+if skip_win_packages:
+ print "Skipping the build of Windows packages..."
+
python_ver = sys.version[0:3]
#
@@ -235,6 +243,8 @@ command_line_variables = [
("VERSION=", "The SCons version being packaged. The default " +
"is the hard-coded value '%s' " % default_version +
"from this SConstruct file."),
+
+ ("SKIP_WIN_PACKAGES=", "If set, skip building win32 and win64 packages."),
]
Default('.', build_dir)
@@ -495,10 +505,13 @@ Version_values = [Value(version), Value(build_id)]
# separate packages.
#
+from distutils.sysconfig import get_python_lib;
+
+
python_scons = {
'pkg' : 'python-' + project,
'src_subdir' : 'engine',
- 'inst_subdir' : os.path.join('lib', 'python1.5', 'site-packages'),
+ 'inst_subdir' : get_python_lib(),
'rpm_dir' : '/usr/lib/scons',
'debian_deps' : [
@@ -737,8 +750,6 @@ for p in [ scons ]:
'dist',
"%s.%s.zip" % (pkg_version, platform))
- win64_exe = os.path.join(build, 'dist', "%s.win-amd64.exe" % pkg_version)
- win32_exe = os.path.join(build, 'dist', "%s.win32.exe" % pkg_version)
#
# Update the environment with the relevant information
@@ -849,8 +860,13 @@ for p in [ scons ]:
Local(*build_src_files)
distutils_formats = []
+ distutils_targets = []
+
+ if not skip_win_packages:
+ win64_exe = os.path.join(build, 'dist', "%s.win-amd64.exe" % pkg_version)
+ win32_exe = os.path.join(build, 'dist', "%s.win32.exe" % pkg_version)
+ distutils_targets.extend([ win32_exe , win64_exe ])
- distutils_targets = [ win32_exe , win64_exe ]
dist_distutils_targets = []
for target in distutils_targets:
@@ -1088,9 +1104,10 @@ for p in [ scons ]:
commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY sdist --formats=%s" % \
','.join(distutils_formats))
- commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY bdist_wininst --plat-name=win32 --user-access-control auto")
+ if not skip_win_packages:
+ commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY bdist_wininst --plat-name=win32 --user-access-control auto")
- commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY bdist_wininst --plat-name=win-amd64 --user-access-control auto")
+ commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY bdist_wininst --plat-name=win-amd64 --user-access-control auto")
env.Command(distutils_targets, build_src_files, commands)
diff --git a/doc/generated/builders.gen b/doc/generated/builders.gen
index 259fe79..02dc04b 100644
--- a/doc/generated/builders.gen
+++ b/doc/generated/builders.gen
@@ -486,6 +486,14 @@ and
source
arguments list different numbers of files or directories.
</para>
+
+<example_commands xmlns="http://www.scons.org/dbxsd/v1.0">
+env.InstallAs(target = '/usr/local/bin/foo',
+ source = 'foo_debug')
+env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'],
+ source = ['libFOO.a', 'libBAR.a'])
+</example_commands>
+
</listitem>
</varlistentry>
<varlistentry id="b-InstallVersionedLib">
@@ -500,14 +508,17 @@ arguments list different numbers of files or directories.
Installs a versioned shared library. The <link xmlns="http://www.scons.org/dbxsd/v1.0" linkend="cv-SHLIBVERSION"><envar>$SHLIBVERSION</envar></link>
construction variable should be defined in the environment
to confirm the version number in the library name.
+If <link xmlns="http://www.scons.org/dbxsd/v1.0" linkend="cv-SHLIBVERSION"><envar>$SHLIBVERSION</envar></link> is not defined a warning will be issued
+and the name of the library will be parsed to derive the version.
The symlinks appropriate to the architecture will be generated.
</para>
<example_commands xmlns="http://www.scons.org/dbxsd/v1.0">
-env.InstallAs(target = '/usr/local/bin/foo',
- source = 'foo_debug')
-env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'],
- source = ['libFOO.a', 'libBAR.a'])
+env.InstallVersionedLib(target = '/usr/local/bin/foo',
+ source = 'libxyz.1.5.2.so')
+env.InstallVersionedLib(target = '/usr/local/bin/foo',
+ source = 'libxyz.1.5.2.so',
+ SHLIBVERSION='1.5.2')
</example_commands>
</listitem>
</varlistentry>
@@ -1989,6 +2000,11 @@ and Y are numbers, and Z is a number but can also contain letters to designate
alpha, beta, or release candidate patch levels.
</para>
+<example_commands xmlns="http://www.scons.org/dbxsd/v1.0">
+env.SharedLibrary(target = 'bar', source = ['bar.c', 'foo.o'], SHLIBVERSION='1.5.2')
+</example_commands>
+
+
<para xmlns="http://www.scons.org/dbxsd/v1.0">
This builder may create multiple links to the library. On a POSIX system,
for the shared library libbar.so.2.3.1, the links created would be
diff --git a/doc/man/scons.xml b/doc/man/scons.xml
index 08a942b..c3abb64 100644
--- a/doc/man/scons.xml
+++ b/doc/man/scons.xml
@@ -54,10 +54,10 @@
<corpauthor>Steven Knight and the SCons Development Team</corpauthor>
- <pubdate>2004 - 2014</pubdate>
+ <pubdate>2004 - 2015</pubdate>
<copyright>
- <year>2004 - 2014</year>
+ <year>2004 - 2015</year>
<holder>The SCons Foundation</holder>
</copyright>
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 55b48a5..45c8a8c 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -6,17 +6,38 @@
RELEASE VERSION/DATE TO BE FILLED IN LATER
+ From William Deegan:
+ - Extended docs for InstallVersionedLib/SharedLibrary,
+ and added SKIP_WIN_PACKAGES argument to build script
+ bootstrap.py (PR #230, #3002).
+
+ From William Blevins:
+ - Fixed symlink support (PR #227, #2395).
+ - Updated debug-count test case (PR #229).
+
+ From Alexey Klimkin:
+ - Fixed incomplete LIBS flattening and substitution in
+ Program scanner(PR #205, #2954).
+
+ From Dirk Baechle:
+ - Added new method rentry_exists_on_disk to Node.FS (PR #193).
+
From Russel Winder:
+ - Fixed several D tests under the different OS.
- Add support for f08 file extensions for Fortran 2008 code.
From Anatoly Techtonik:
- Show --config choices if no argument is specified (PR #202).
+ - Fixed build crash when XML toolchain isn't installed, and
+ activated compression for ZIP archives.
From Alexandre Feblot:
- Fix for VersionedSharedLibrary under 'sunos' platform.
From Laurent Marchelli:
- Support for multiple cmdargs (one per variant) in VS project files.
+ - Various improvements for TempFileMunge class.
+ - Added an implementation for Visual Studio users files (PR #209).
From Dan Pidcock:
- Added support for the 'PlatformToolset' tag in VS project files (#2978).
diff --git a/src/engine/SCons/Tool/__init__.xml b/src/engine/SCons/Tool/__init__.xml
index dd06f12..ee56fc3 100644
--- a/src/engine/SCons/Tool/__init__.xml
+++ b/src/engine/SCons/Tool/__init__.xml
@@ -205,6 +205,11 @@ and Y are numbers, and Z is a number but can also contain letters to designate
alpha, beta, or release candidate patch levels.
</para>
+<example_commands>
+env.SharedLibrary(target = 'bar', source = ['bar.c', 'foo.o'], SHLIBVERSION='1.5.2')
+</example_commands>
+
+
<para>
This builder may create multiple links to the library. On a POSIX system,
for the shared library libbar.so.2.3.1, the links created would be
diff --git a/src/engine/SCons/Tool/install.xml b/src/engine/SCons/Tool/install.xml
index 0a0ad71..0aa9384 100644
--- a/src/engine/SCons/Tool/install.xml
+++ b/src/engine/SCons/Tool/install.xml
@@ -68,6 +68,14 @@ and
source
arguments list different numbers of files or directories.
</para>
+
+<example_commands>
+env.InstallAs(target = '/usr/local/bin/foo',
+ source = 'foo_debug')
+env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'],
+ source = ['libFOO.a', 'libBAR.a'])
+</example_commands>
+
</summary>
</builder>
@@ -77,14 +85,17 @@ arguments list different numbers of files or directories.
Installs a versioned shared library. The &cv-link-SHLIBVERSION;
construction variable should be defined in the environment
to confirm the version number in the library name.
+If &cv-link-SHLIBVERSION; is not defined a warning will be issued
+and the name of the library will be parsed to derive the version.
The symlinks appropriate to the architecture will be generated.
</para>
<example_commands>
-env.InstallAs(target = '/usr/local/bin/foo',
- source = 'foo_debug')
-env.InstallAs(target = ['../lib/libfoo.a', '../lib/libbar.a'],
- source = ['libFOO.a', 'libBAR.a'])
+env.InstallVersionedLib(target = '/usr/local/bin/foo',
+ source = 'libxyz.1.5.2.so')
+env.InstallVersionedLib(target = '/usr/local/bin/foo',
+ source = 'libxyz.1.5.2.so',
+ SHLIBVERSION='1.5.2')
</example_commands>
</summary>
</builder>