From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- .../build/example/built_tool/core/Jamfile.jam | 39 ++++++++++++++++++++++ src/boost/tools/build/example/built_tool/core/a.td | 0 .../tools/build/example/built_tool/core/core.cpp | 5 +++ 3 files changed, 44 insertions(+) create mode 100644 src/boost/tools/build/example/built_tool/core/Jamfile.jam create mode 100644 src/boost/tools/build/example/built_tool/core/a.td create mode 100644 src/boost/tools/build/example/built_tool/core/core.cpp (limited to 'src/boost/tools/build/example/built_tool/core') diff --git a/src/boost/tools/build/example/built_tool/core/Jamfile.jam b/src/boost/tools/build/example/built_tool/core/Jamfile.jam new file mode 100644 index 000000000..d4ec62382 --- /dev/null +++ b/src/boost/tools/build/example/built_tool/core/Jamfile.jam @@ -0,0 +1,39 @@ + +import toolset ; +import os ; + +project : requirements ../tblgen//tblgen ; + + +# Create a.c using a custom action defined below. +make a.c : a.td : @tblgen ; + +# Use a.c in executable. +exe core : core.cpp a.c ; + +# The action has to invoke the tool built in other +# parts of the project. The feature is used +# to specify the location of the tool, and the flags +# statement below make the full path to the tool +# available inside the action. +toolset.flags tblgen COMMAND ; + +# We generally want a.c to be rebuilt when the tool changes. +rule tblgen ( targets * : sources * : properties * ) +{ + DEPENDS $(targets) : [ on $(targets) return $(COMMAND) ] ; +} + +# The action that invokes the tool +actions tblgen bind COMMAND +{ + $(COMMAND:E=tblgen) > $(<) +} + +if [ os.name ] = VMS +{ + actions tblgen bind COMMAND + { + PIPE MCR $(COMMAND:WE=tblgen) > $(<:W) + } +} diff --git a/src/boost/tools/build/example/built_tool/core/a.td b/src/boost/tools/build/example/built_tool/core/a.td new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/tools/build/example/built_tool/core/core.cpp b/src/boost/tools/build/example/built_tool/core/core.cpp new file mode 100644 index 000000000..31a133726 --- /dev/null +++ b/src/boost/tools/build/example/built_tool/core/core.cpp @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} -- cgit v1.2.3