diff --git a/example/make/Jamroot b/example/make/Jamroot index 4fb950b83..8f09ebaa7 100644 --- a/example/make/Jamroot +++ b/example/make/Jamroot @@ -1,23 +1,11 @@ -import notfile ; -import common ; +import toolset : flags ; -exe main : main.cpp ; - -# Create 'main.cpp' from 'main.cpp.pro' using action -# 'do-something' defined below. -# +path-constant HERE : . ; make main.cpp : main_cpp.pro : @do-something ; -# In this example, we'll just copy a file. -# Need to find out the name of a command to copy a file. -CP = [ common.copy-command ] ; - -# The action itself. -# The 'CP' variable is defined below -# $(>) is source -# $(<) is target +flags do-something PYTHON : ; actions do-something { - $(CP) $(>) $(<) + $(PYTHON:E=python) $(HERE)/foo.py $(>) $(<) } diff --git a/example/make/foo.py b/example/make/foo.py new file mode 100644 index 000000000..2c8df8542 --- /dev/null +++ b/example/make/foo.py @@ -0,0 +1,3 @@ + +import sys +open(sys.argv[2], "w").write(open(sys.argv[1]).read()) \ No newline at end of file diff --git a/test/example_make.py b/test/example_make.py index 3eb360912..6430574a8 100644 --- a/test/example_make.py +++ b/test/example_make.py @@ -15,6 +15,6 @@ t.set_tree("../example/make") t.run_build_system() -t.expect_addition(["bin/$toolset/debug/main.exe"]) +t.expect_addition(["bin/$toolset/debug/main.cpp"]) t.cleanup()