summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HOWTO/change.txt20
-rw-r--r--HOWTO/release.txt68
-rw-r--r--README30
-rw-r--r--SConstruct10
-rw-r--r--debian/changelog7
-rw-r--r--doc/man/scons.134
-rw-r--r--rpm/scons.spec2
-rw-r--r--src/CHANGES.txt9
-rw-r--r--src/engine/SCons/Action.py20
9 files changed, 124 insertions, 76 deletions
diff --git a/HOWTO/change.txt b/HOWTO/change.txt
index 81b56b45..5fe9c00c 100644
--- a/HOWTO/change.txt
+++ b/HOWTO/change.txt
@@ -30,28 +30,28 @@ Handling a change set:
-- Distribute the change to scons-aedist:
- aedist -s -p scons.0.10 {cnum} > scons.0.10.C{cnum}.ae
- pine -attach scons.0.10.C{cnum}.ae scons-aedist@lists.sourceforge.net
- Subject: scons.0.10 - {SUMMARY}
- Body: aegis -l -p scons.0.10 -c {cnum} cd
+ aedist -s -p scons.0.11 {cnum} > scons.0.11.C{cnum}.ae
+ pine -attach scons.0.11.C{cnum}.ae scons-aedist@lists.sourceforge.net
+ Subject: scons.0.11 - {SUMMARY}
+ Body: aegis -l -p scons.0.11 -c {cnum} cd
- rm scons.0.10.C{cnum}.ae
+ rm scons.0.11.C{cnum}.ae
[This will eventually be automated.]
-- Update the aedist baseline on the web site:
- aedist -s -bl -p scons.0.10 > scons.0.10.ae
- scp scons.0.10.ae stevenknight@scons.sourceforge.net:/home/groups/s/sc/scons/htdocs/scons.0.10.ae
- rm scons.0.10.ae
+ aedist -s -bl -p scons.0.11 > scons.0.11.ae
+ scp scons.0.11.ae stevenknight@scons.sourceforge.net:/home/groups/s/sc/scons/htdocs/scons.0.11.ae
+ rm scons.0.11.ae
[This will eventually be automated.]
-- Distribute the change to CVS:
export CVS_RSH=ssh
- ae2cvs -n -aegis -p scons.0.10 -c {cnum} -u ~/SCons/scons
- ae2cvs -X -aegis -p scons.0.10 -c {cnum} -u ~/SCons/scons
+ ae2cvs -n -aegis -p scons.0.11 -c {cnum} -u ~/SCons/scons
+ ae2cvs -X -aegis -p scons.0.11 -c {cnum} -u ~/SCons/scons
If you need the "ae2cvs" Perl script, you can find a copy
checked in to the bin/subdirectory.
diff --git a/HOWTO/release.txt b/HOWTO/release.txt
index 3ba17243..47e83ecf 100644
--- a/HOWTO/release.txt
+++ b/HOWTO/release.txt
@@ -65,11 +65,11 @@ Things to do to release a new version of SCons:
ae_p scons.0
- aede {10}
+ aede {11}
- aerpass {10}
+ aerpass {11}
- aeib {10}
+ aeib {11}
aeb
@@ -94,16 +94,16 @@ Things to do to release a new version of SCons:
<your email>
cd incoming
bin
- put scons-0.10-1.noarch.rpm
- put scons-0.10-1.src.rpm
- put scons-0.10.tar.gz
- put scons-0.10.win32.exe
- put scons-0.10.zip
- put scons-local-0.10.tar.gz
- put scons-local-0.10.zip
- put scons-src-0.10.tar.gz
- put scons-src-0.10.zip
- put scons_0.10-1_all.deb
+ put scons-0.11-1.noarch.rpm
+ put scons-0.11-1.src.rpm
+ put scons-0.11.tar.gz
+ put scons-0.11.win32.exe
+ put scons-0.11.zip
+ put scons-local-0.11.tar.gz
+ put scons-local-0.11.zip
+ put scons-src-0.11.tar.gz
+ put scons-src-0.11.zip
+ put scons_0.11-1_all.deb
Create the new release at the SourceForge project page:
@@ -115,7 +115,7 @@ Things to do to release a new version of SCons:
=> Add Release
- New release name: 0.10
+ New release name: 0.11
Cut-and-paste or upload the RELEASE.txt file.
@@ -132,12 +132,12 @@ Things to do to release a new version of SCons:
Edit the file info:
- scons-0.10-1.noarch.rpm Any .rpm
- scons-0.10-1.src.rpm Any Source .rpm
- scons-0.10.tar.gz Any .gz
- scons-0.10.win32.exe i386 .exe (32-bit Windows)
- scons-0.10.zip Any .zip
- scons_0.10-1_all.deb Any .deb
+ scons-0.11-1.noarch.rpm Any .rpm
+ scons-0.11-1.src.rpm Any Source .rpm
+ scons-0.11.tar.gz Any .gz
+ scons-0.11.win32.exe i386 .exe (32-bit Windows)
+ scons-0.11.zip Any .zip
+ scons_0.11-1_all.deb Any .deb
Click "Update/Refresh" for each file; this must be done
one at a time.
@@ -154,7 +154,7 @@ Things to do to release a new version of SCons:
=> Add Release
- New release name: 0.10
+ New release name: 0.11
Cut-and-paste or upload the RELEASE.txt file.
@@ -171,8 +171,8 @@ Things to do to release a new version of SCons:
Edit the file info:
- scons-local-0.10.tar.gz Any .gz
- scons-local-0.10.zip Any .zip
+ scons-local-0.11.tar.gz Any .gz
+ scons-local-0.11.zip Any .zip
Click "Update/Refresh" for each file; this must be done
one at a time.
@@ -189,7 +189,7 @@ Things to do to release a new version of SCons:
=> Add Release
- New release name: 0.10
+ New release name: 0.11
Cut-and-paste or upload the RELEASE.txt file.
@@ -206,8 +206,8 @@ Things to do to release a new version of SCons:
Edit the file info:
- scons-src-0.10.tar.gz Any .gz
- scons-src-0.10.zip Any .zip
+ scons-src-0.11.tar.gz Any .gz
+ scons-src-0.11.zip Any .zip
Click "Update/Refresh" for each file; this must be done
one at a time.
@@ -270,7 +270,7 @@ Things to do to release a new version of SCons:
- In the Bugs Tracker, add a Group for the new release (0.10)
+ In the Bugs Tracker, add a Group for the new release (0.11)
@@ -343,15 +343,15 @@ Things to do to release a new version of SCons:
START THE NEW BRANCH
- aenbr -p scons.0 {11}
+ aenbr -p scons.0 {12}
- aenc -p scons.0.{11}
+ aenc -p scons.0.{12}
Call it something like, "Initialize the new
branch." Cause = internal_enhancement. Exempt
it from all tests (*_exempt = true).
- ae_p scons.0.{11}
+ ae_p scons.0.{12}
aedb 100
@@ -390,7 +390,7 @@ Things to do to release a new version of SCons:
=======================
Template describe-the-release section:
-IMPORTANT: Release 0.10 contains the following interface changes:
+IMPORTANT: Release 0.11 contains the following interface changes:
- XXX
This release adds the following features:
@@ -412,7 +412,7 @@ Template scons-devel announcement:
SConspirators--
-SCons alpha release 0.10 is now available for download.
+SCons alpha release 0.11 is now available for download.
XXX Template describe-the-release section goes here XXX
@@ -423,7 +423,7 @@ release.
=======================
Template scons-users + scons-announce announcement:
-Version 0.10 of SCons has been released and is available for download
+Version 0.11 of SCons has been released and is available for download
from the SCons web site:
http://www.scons.org/
@@ -456,7 +456,7 @@ SCons is a software construction tool (build tool, or make tool) written
in Python. It is based on the design which won the Software Carpentry
build tool competition in August 2000.
-Version 0.10 of SCons has been released and is available for download
+Version 0.11 of SCons has been released and is available for download
from the SCons web site:
http://www.scons.org/
diff --git a/README b/README
index 5a93f88d..96627c94 100644
--- a/README
+++ b/README
@@ -60,12 +60,12 @@ In this case, your options are:
-- (Optional.) Install from a pre-packaged SCons package that
does not require distutils:
- Red Hat Linux scons-0.10-1.noarch.rpm
+ Red Hat Linux scons-0.11-1.noarch.rpm
- Debian GNU/Linux scons_0.10-1_all.deb
+ Debian GNU/Linux scons_0.11-1_all.deb
(or use apt-get)
- Windows scons-0.10.win32.exe
+ Windows scons-0.11.win32.exe
-- (Recommended.) Download the latest distutils package from the
following URL:
@@ -178,18 +178,18 @@ more typing:
Depending on the utilities installed on your system, any or all of the
following packages will be built:
- build/dist/scons-0.10-1.noarch.rpm
- build/dist/scons-0.10-1.src.rpm
- build/dist/scons-0.10.linux-i686.tar.gz
- build/dist/scons-0.10.tar.gz
- build/dist/scons-0.10.win32.exe
- build/dist/scons-0.10.zip
- build/dist/scons-doc-0.10.tar.gz
- build/dist/scons-local-0.10.tar.gz
- build/dist/scons-local-0.10.zip
- build/dist/scons-src-0.10.tar.gz
- build/dist/scons-src-0.10.zip
- build/dist/scons_0.10-1_all.deb
+ build/dist/scons-0.11-1.noarch.rpm
+ build/dist/scons-0.11-1.src.rpm
+ build/dist/scons-0.11.linux-i686.tar.gz
+ build/dist/scons-0.11.tar.gz
+ build/dist/scons-0.11.win32.exe
+ build/dist/scons-0.11.zip
+ build/dist/scons-doc-0.11.tar.gz
+ build/dist/scons-local-0.11.tar.gz
+ build/dist/scons-local-0.11.zip
+ build/dist/scons-src-0.11.tar.gz
+ build/dist/scons-src-0.11.zip
+ build/dist/scons_0.11-1_all.deb
The SConstruct file is supposed to be smart enough to avoid trying to
build packages for which you don't have the proper utilities installed.
diff --git a/SConstruct b/SConstruct
index e7de9bdb..1d630b86 100644
--- a/SConstruct
+++ b/SConstruct
@@ -37,7 +37,7 @@ import sys
import time
project = 'scons'
-default_version = '0.10'
+default_version = '0.11'
Default('.')
@@ -224,10 +224,6 @@ def SCons_revision(target, source, env):
"""
t = str(target[0])
s = source[0].rstr()
- # Note: We don't use $VERSION from the environment so that
- # this routine will change when the version number changes
- # and things will get rebuilt properly.
- global version
inf = open(s, 'rb')
outf = open(t, 'wb')
for line in inf.readlines():
@@ -240,13 +236,13 @@ def SCons_revision(target, source, env):
line = string.replace(line, '__DEVELOPER' + '__', env['DEVELOPER'])
line = string.replace(line, '__FILE' + '__', s)
line = string.replace(line, '__REVISION' + '__', env['REVISION'])
- line = string.replace(line, '__VERSION' + '__', version)
+ line = string.replace(line, '__VERSION' + '__', env['VERSION'])
outf.write(line)
inf.close()
outf.close()
os.chmod(t, os.stat(s)[0])
-revbuilder = Builder(action = SCons_revision)
+revbuilder = Builder(action = Action(SCons_revision, varlist=['VERSION']))
env = Environment(
ENV = ENV,
diff --git a/debian/changelog b/debian/changelog
index 23bd576d..9dd6526e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+scons (0.11-1) unstable; urgency=low
+
+ * Fifth post-official-Debian build cycle
+
+ -- Steven Knight <knight@baldmt.com> Thu, 16 Jan 2003 04:11:46 -0600
+
+
scons (0.10-1) unstable; urgency=low
* Fourth post-official-Debian build cycle
diff --git a/doc/man/scons.1 b/doc/man/scons.1
index 08b62e27..441ef008 100644
--- a/doc/man/scons.1
+++ b/doc/man/scons.1
@@ -2987,6 +2987,7 @@ This function takes two arguments,
an array of targets to be created by the function action,
and an array of sources used to create the target(s):
+.ES
def build_it(target, source, env):
# build the target from the source
return 0
@@ -2994,7 +2995,40 @@ def build_it(target, source, env):
def string_it(target, source):
return "building '%s' from '%s'" % (target[0], source[0])
+# Use a positional argument.
a = Action(build_it, string_it)
+
+# Alternatively, use a keyword argument.
+a = Action(build_it, strfunction=string_it)
+.EE
+
+The third, also optional argument
+is a list of construction variables
+whose values will be included
+in the signature of the Action
+when deciding whether a target should
+be rebuilt because the action changed.
+This is necessary whenever you want a target to
+be rebuilt by an action when a specific
+construction variable changes,
+because the underlying Python code for a function
+will not change when the value of the construction variable does.
+
+.ES
+def build_it(target, source, env):
+ # build the target from the 'XXX' construction variable
+ open(target[0], 'w').write(env['XXX'])
+ return 0
+
+def string_it(target, source):
+ return "building '%s' from '%s'" % (target[0], source[0])
+
+# Use positional arguments.
+a = Action(build_it, string_it, ['XXX'])
+
+# Alternatively, use a keyword argument.
+a = Action(build_it, varlist=['XXX'])
+.EE
.PP
If the action argument is not one of the above,
None is returned.
diff --git a/rpm/scons.spec b/rpm/scons.spec
index bfa68a4a..b7462144 100644
--- a/rpm/scons.spec
+++ b/rpm/scons.spec
@@ -1,5 +1,5 @@
%define name scons
-%define version 0.10
+%define version 0.11
%define release 1
Summary: an Open Source software construction tool
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 4e69f9bd..eeaaf945 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -8,6 +8,15 @@
+RELEASE 0.11 - XXX
+
+ From Steven Knight:
+
+ - Allow Python function Actions to specify a list of construction
+ variables that should be included in the Action's signature.
+
+
+
RELEASE 0.10 - Thu, 16 Jan 2003 04:11:46 -0600
From Derrick 'dman' Hudson:
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py
index 2f8fc075..a23304b3 100644
--- a/src/engine/SCons/Action.py
+++ b/src/engine/SCons/Action.py
@@ -72,7 +72,7 @@ class CommandGenerator:
def __init__(self, generator):
self.generator = generator
-def _do_create_action(act, strfunction=_null):
+def _do_create_action(act, strfunction=_null, varlist=[]):
"""This is the actual "implementation" for the
Action factory method, below. This handles the
fact that passing lists to Action() itself has
@@ -90,7 +90,7 @@ def _do_create_action(act, strfunction=_null):
elif isinstance(act, CommandGenerator):
return CommandGeneratorAction(act.generator)
elif callable(act):
- return FunctionAction(act, strfunction=strfunction)
+ return FunctionAction(act, strfunction=strfunction, varlist=varlist)
elif SCons.Util.is_String(act):
var=SCons.Util.get_environment_var(act)
if var:
@@ -110,17 +110,19 @@ def _do_create_action(act, strfunction=_null):
else:
return None
-def Action(act, strfunction=_null):
+def Action(act, strfunction=_null, varlist=[]):
"""A factory for action objects."""
if SCons.Util.is_List(act):
- acts = map(lambda x, s=strfunction: _do_create_action(x, s), act)
+ acts = map(lambda x, s=strfunction, v=varlist:
+ _do_create_action(x, s, v),
+ act)
acts = filter(lambda x: not x is None, acts)
if len(acts) == 1:
return acts[0]
else:
return ListAction(acts)
else:
- return _do_create_action(act, strfunction=strfunction)
+ return _do_create_action(act, strfunction=strfunction, varlist=varlist)
class ActionBase:
"""Base class for actions that create output objects."""
@@ -316,7 +318,7 @@ class LazyCmdGenerator:
class FunctionAction(ActionBase):
"""Class for Python function actions."""
- def __init__(self, execfunction, strfunction=_null):
+ def __init__(self, execfunction, strfunction=_null, varlist=[]):
self.execfunction = execfunction
if strfunction is _null:
def strfunction(target, source, execfunction=execfunction):
@@ -339,6 +341,7 @@ class FunctionAction(ActionBase):
sstr = str(map(lambda x, q=quote: q(x), source))
return "%s(%s, %s)" % (name, tstr, sstr)
self.strfunction = strfunction
+ self.varlist = varlist
def __call__(self, target, source, env):
r = 0
@@ -361,15 +364,14 @@ class FunctionAction(ActionBase):
By providing direct access to the code object of the
function, Python makes this extremely easy. Hooray!
"""
- #XXX DOES NOT ACCOUNT FOR CHANGES IN ENVIRONMENT VARIABLES
- #THE FUNCTION MAY USE
try:
# "self.execfunction" is a function.
code = self.execfunction.func_code.co_code
except:
# "self.execfunction" is a callable object.
code = self.execfunction.__call__.im_func.func_code.co_code
- return str(code)
+ return str(code) + string.join(map(lambda v, e=env: str(e[v]),
+ self.varlist))
class ListAction(ActionBase):
"""Class for lists of other actions."""