summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/build/example/built_tool/core
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/boost/tools/build/example/built_tool/core
parentInitial commit. (diff)
downloadceph-upstream/18.2.2.tar.xz
ceph-upstream/18.2.2.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/tools/build/example/built_tool/core')
-rw-r--r--src/boost/tools/build/example/built_tool/core/Jamfile.jam39
-rw-r--r--src/boost/tools/build/example/built_tool/core/a.td0
-rw-r--r--src/boost/tools/build/example/built_tool/core/core.cpp5
3 files changed, 44 insertions, 0 deletions
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//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 <tblgen> 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 <tblgen> ;
+
+# 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
--- /dev/null
+++ b/src/boost/tools/build/example/built_tool/core/a.td
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;
+}