diff options
| author | Dirk Baechle <dl9obn@darc.de> | 2013-10-06 15:04:19 (GMT) |
|---|---|---|
| committer | Dirk Baechle <dl9obn@darc.de> | 2013-10-06 15:04:19 (GMT) |
| commit | e2d8d87c5911067374d0b3b5be562c4ce2dddcce (patch) | |
| tree | 2ee5b8a387b880e61a23a7abda1a152fead7af00 /doc/user/add-method.xml | |
| parent | 43f296c7c2a350de0c59a442e566c165420803e3 (diff) | |
| download | SCons-e2d8d87c5911067374d0b3b5be562c4ce2dddcce.zip SCons-e2d8d87c5911067374d0b3b5be562c4ce2dddcce.tar.gz SCons-e2d8d87c5911067374d0b3b5be562c4ce2dddcce.tar.bz2 | |
- left-aligned all code examples in documentation
- accordingly updated the generated files, containing example output
Diffstat (limited to 'doc/user/add-method.xml')
| -rw-r--r-- | doc/user/add-method.xml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/user/add-method.xml b/doc/user/add-method.xml index a9a89d3..e94626b 100644 --- a/doc/user/add-method.xml +++ b/doc/user/add-method.xml @@ -63,17 +63,17 @@ <scons_example name="addmethod_ex1"> <file name="SConstruct" printme="1"> - def install_in_bin_dirs(env, source): - """Install source in both bin dirs""" - i1 = env.Install("$BIN", source) - i2 = env.Install("$LOCALBIN", source) - return [i1[0], i2[0]] # Return a list, like a normal builder - env = Environment(BIN='__ROOT__/usr/bin', LOCALBIN='#install/bin') - env.AddMethod(install_in_bin_dirs, "InstallInBinDirs") - env.InstallInBinDirs(Program('hello.c')) # installs hello in both bin dirs +def install_in_bin_dirs(env, source): + """Install source in both bin dirs""" + i1 = env.Install("$BIN", source) + i2 = env.Install("$LOCALBIN", source) + return [i1[0], i2[0]] # Return a list, like a normal builder +env = Environment(BIN='__ROOT__/usr/bin', LOCALBIN='#install/bin') +env.AddMethod(install_in_bin_dirs, "InstallInBinDirs") +env.InstallInBinDirs(Program('hello.c')) # installs hello in both bin dirs </file> <file name="hello.c"> - int main() { printf("Hello, world!\n"); } +int main() { printf("Hello, world!\n"); } </file> </scons_example> |
