2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-19 14:22:10 +00:00

Actually unbreak the 'make' test

[SVN r48388]
This commit is contained in:
Vladimir Prus
2008-08-25 19:05:39 +00:00
parent ea6706743b
commit 613ab83963
3 changed files with 8 additions and 17 deletions

View File

@@ -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 : <python.interpreter> ;
actions do-something
{
$(CP) $(>) $(<)
$(PYTHON:E=python) $(HERE)/foo.py $(>) $(<)
}

3
v2/example/make/foo.py Normal file
View File

@@ -0,0 +1,3 @@
import sys
open(sys.argv[2], "w").write(open(sys.argv[1]).read())

View File

@@ -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()