From 28c765b5617b9aa5598b5751e8c2240b5237811b Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Tue, 16 Feb 2021 07:26:52 -0700 Subject: [PR #3877] fix some broken examples from initial commit [ci skip] Signed-off-by: Mats Wichmann --- doc/generated/examples/sourcecode_bitkeeper_1.xml | 6 ------ doc/generated/examples/sourcecode_cvs_1.xml | 6 ------ doc/generated/examples/sourcecode_rcs_1.xml | 6 ------ doc/generated/examples/sourcecode_sccs_1.xml | 6 ------ doc/user/builders-writing.xml | 9 +++++++-- doc/user/factories.xml | 5 +++++ doc/user/file-removal.xml | 1 + 7 files changed, 13 insertions(+), 26 deletions(-) delete mode 100644 doc/generated/examples/sourcecode_bitkeeper_1.xml delete mode 100644 doc/generated/examples/sourcecode_cvs_1.xml delete mode 100644 doc/generated/examples/sourcecode_rcs_1.xml delete mode 100644 doc/generated/examples/sourcecode_sccs_1.xml diff --git a/doc/generated/examples/sourcecode_bitkeeper_1.xml b/doc/generated/examples/sourcecode_bitkeeper_1.xml deleted file mode 100644 index 41af3a2..0000000 --- a/doc/generated/examples/sourcecode_bitkeeper_1.xml +++ /dev/null @@ -1,6 +0,0 @@ - -% scons -Q -AttributeError: 'SConsEnvironment' object has no attribute 'BitKeeper': - File "/home/my/project/SConstruct", line 2: - env.SourceCode('.', env.BitKeeper()) - diff --git a/doc/generated/examples/sourcecode_cvs_1.xml b/doc/generated/examples/sourcecode_cvs_1.xml deleted file mode 100644 index 01ddb6b..0000000 --- a/doc/generated/examples/sourcecode_cvs_1.xml +++ /dev/null @@ -1,6 +0,0 @@ - -% scons -Q -AttributeError: 'SConsEnvironment' object has no attribute 'CVS': - File "/home/my/project/SConstruct", line 2: - env.SourceCode('.', env.CVS('/usr/local/CVS')) - diff --git a/doc/generated/examples/sourcecode_rcs_1.xml b/doc/generated/examples/sourcecode_rcs_1.xml deleted file mode 100644 index e6b36dd..0000000 --- a/doc/generated/examples/sourcecode_rcs_1.xml +++ /dev/null @@ -1,6 +0,0 @@ - -% scons -Q -AttributeError: 'SConsEnvironment' object has no attribute 'RCS': - File "/home/my/project/SConstruct", line 2: - env.SourceCode('.', env.RCS()) - diff --git a/doc/generated/examples/sourcecode_sccs_1.xml b/doc/generated/examples/sourcecode_sccs_1.xml deleted file mode 100644 index e0699d1..0000000 --- a/doc/generated/examples/sourcecode_sccs_1.xml +++ /dev/null @@ -1,6 +0,0 @@ - -% scons -Q -AttributeError: 'SConsEnvironment' object has no attribute 'SCCS': - File "/home/my/project/SConstruct", line 2: - env.SourceCode('.', env.SCCS()) - diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml index 8586853..6b32068 100644 --- a/doc/user/builders-writing.xml +++ b/doc/user/builders-writing.xml @@ -115,7 +115,8 @@ bld = Builder(action = 'foobuild < $SOURCE > $TARGET') -bld = Builder(action = 'foobuild < $SOURCE > $TARGET') +import os +bld=Builder(action = 'foobuild < $SOURCE > $TARGET') env = Environment(BUILDERS={'Foo': bld}) env.AppendENVPath('PATH', os.getcwd()) env.Foo('file.foo', 'file.input') @@ -129,7 +130,7 @@ cat -bld = Builder(action = 'foobuild < $SOURCE > $TARGET') +bld = Builder(action='foobuild < $SOURCE > $TARGET') env = Environment(BUILDERS={'Foo': bld}) @@ -225,6 +226,7 @@ hello.c +import os env = Environment() env.AppendENVPath('PATH', os.getcwd()) bld = Builder(action='foobuild < $SOURCE > $TARGET') @@ -303,6 +305,7 @@ env.Program('hello.c') +import os bld = Builder( action='foobuild < $SOURCE > $TARGET', suffix='.foo', @@ -606,6 +609,7 @@ def generate_actions(source, target, env, for_signature): +import os def generate_actions(source, target, env, for_signature): return 'foobuild < %s > %s' % (source[0], target[0]) @@ -689,6 +693,7 @@ env.Foo('file') +import os def modify_targets(target, source, env): target.append('new_target') source.append('new_source') diff --git a/doc/user/factories.xml b/doc/user/factories.xml index 8c2458d..ad35cc2 100644 --- a/doc/user/factories.xml +++ b/doc/user/factories.xml @@ -158,6 +158,7 @@ Command( ) +import os env = DefaultEnvironment() env.AppendENVPath('PATH', os.getcwd()) SConscript('S') @@ -230,6 +231,7 @@ Command( ) +import os env = DefaultEnvironment() env.AppendENVPath('PATH', os.getcwd()) SConscript('S') @@ -329,6 +331,7 @@ Command( ) +import os env = DefaultEnvironment() env.AppendENVPath('PATH', os.getcwd()) SConscript('S') @@ -374,6 +377,7 @@ Command( ) +import os env = DefaultEnvironment() env.AppendENVPath('PATH', os.getcwd()) SConscript('S') @@ -424,6 +428,7 @@ Command( ) +import os env = DefaultEnvironment() env.AppendENVPath('PATH', os.getcwd()) SConscript('S') diff --git a/doc/user/file-removal.xml b/doc/user/file-removal.xml index 6039175..3eb6a84 100644 --- a/doc/user/file-removal.xml +++ b/doc/user/file-removal.xml @@ -203,6 +203,7 @@ t = Command('foo.out', 'foo.in', 'build -o $TARGET $SOURCE') Clean(t, 'foo.log') +import os env = DefaultEnvironment() env.AppendENVPath('PATH', os.getcwd()) SConscript('S') -- cgit v0.12