diff options
Diffstat (limited to 'src/boost/tools/build/example/make')
-rw-r--r-- | src/boost/tools/build/example/make/foo.py | 2 | ||||
-rw-r--r-- | src/boost/tools/build/example/make/jamroot.jam | 22 | ||||
-rw-r--r-- | src/boost/tools/build/example/make/main_cpp.pro | 1 | ||||
-rw-r--r-- | src/boost/tools/build/example/make/readme.txt | 7 |
4 files changed, 32 insertions, 0 deletions
diff --git a/src/boost/tools/build/example/make/foo.py b/src/boost/tools/build/example/make/foo.py new file mode 100644 index 000000000..e4c0b824a --- /dev/null +++ b/src/boost/tools/build/example/make/foo.py @@ -0,0 +1,2 @@ +import sys +open(sys.argv[2], "w").write(open(sys.argv[1]).read()) diff --git a/src/boost/tools/build/example/make/jamroot.jam b/src/boost/tools/build/example/make/jamroot.jam new file mode 100644 index 000000000..3f5ec5b56 --- /dev/null +++ b/src/boost/tools/build/example/make/jamroot.jam @@ -0,0 +1,22 @@ +import feature ; +import toolset ; +import os ; + +path-constant HERE : . ; +make main.cpp : main_cpp.pro : @do-something ; + +feature.feature example.python.interpreter : : free ; + +toolset.flags do-something PYTHON : <example.python.interpreter> ; +actions do-something +{ + "$(PYTHON:E=python)" "$(HERE)/foo.py" "$(>)" "$(<)" +} + +if [ os.name ] = VMS +{ + actions do-something + { + $(PYTHON:E=python) $(HERE:W)foo.py $(>:W) $(<:W) + } +} diff --git a/src/boost/tools/build/example/make/main_cpp.pro b/src/boost/tools/build/example/make/main_cpp.pro new file mode 100644 index 000000000..237c8ce18 --- /dev/null +++ b/src/boost/tools/build/example/make/main_cpp.pro @@ -0,0 +1 @@ +int main() {} diff --git a/src/boost/tools/build/example/make/readme.txt b/src/boost/tools/build/example/make/readme.txt new file mode 100644 index 000000000..333c55a71 --- /dev/null +++ b/src/boost/tools/build/example/make/readme.txt @@ -0,0 +1,7 @@ +Copyright 2002, 2005 Vladimir Prus +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + + +Example of using custom command to create one file from another, using the +built-in 'make' rule. |