summaryrefslogtreecommitdiff
path: root/slice.jam
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-03-06 08:30:08 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2018-03-06 08:30:08 +0000
commitafb5ebabf55c5c806e221ad15fca2fa0d5ef6d2b (patch)
treee63b671e8dd8e3813ed2fa76a82a5aa39c5c2667 /slice.jam
downloadmirrorsearch-afb5ebabf55c5c806e221ad15fca2fa0d5ef6d2b.tar.bz2
mirrorsearch-afb5ebabf55c5c806e221ad15fca2fa0d5ef6d2b.tar.xz
mirrorsearch-afb5ebabf55c5c806e221ad15fca2fa0d5ef6d2b.zip
Initial commit, WIP
Diffstat (limited to 'slice.jam')
-rw-r--r--slice.jam58
1 files changed, 58 insertions, 0 deletions
diff --git a/slice.jam b/slice.jam
new file mode 100644
index 0000000..434e562
--- /dev/null
+++ b/slice.jam
@@ -0,0 +1,58 @@
+import type : register ;
+import generators : register-standard ;
+import type ;
+import feature : feature ;
+import scanner ;
+import toolset ;
+
+type.register SLICE : ice ;
+
+feature slicer : no yes pure ;
+feature allow-ice : no yes ;
+feature ice-visibility : public hidden ;
+
+class slice-scanner : common-scanner
+{
+ rule pattern ( )
+ {
+ return "^[ \t]*#[ \t]*include[ ]*[<\"]([^>\"]*)[>\"]" ;
+ }
+}
+
+scanner.register slice-scanner : include ;
+
+type.set-scanner SLICE : slice-scanner ;
+
+generators.register-standard slice.slice2cpp : SLICE : CPP H : <slicer>no ;
+generators.register-standard slice.slicer : SLICE : CPP CPP(slicer-%) H : <slicer>yes ;
+generators.register-standard slice.slicer.pure : SLICE : CPP(slicer-%) : <slicer>pure ;
+
+toolset.flags slice.slice2cpp INCLUDES <include> ;
+toolset.flags slice.slice2cpp DLLEXPORT <ice-visibility>public : --dll-export JAM_DLL_PUBLIC ;
+toolset.flags slice.slice2cpp ALLOWICE <allow-ice>yes : --ice ;
+toolset.flags slice.slicer INCLUDES <include> ;
+toolset.flags slice.slicer DLLEXPORT <ice-visibility>public : --dll-export JAM_DLL_PUBLIC ;
+toolset.flags slice.slicer ALLOWICE <allow-ice>yes : --ice ;
+toolset.flags slice.slicer.pure INCLUDES <include> ;
+toolset.flags slice.slicer.pure ALLOWICE <allow-ice>yes : --ice ;
+
+actions slice.slice2cpp
+{
+ slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) $(DLLEXPORT) $(ALLOWICE[1])
+}
+
+actions slice.slicer
+{
+ slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) $(DLLEXPORT) $(ALLOWICE[1])
+ slicer -I"$(INCLUDES)" $(2) $(1[2]) $(ALLOWICE[1])
+}
+
+actions slice.slicer.pure
+{
+ slicer -I"$(INCLUDES)" $(2) $(1[1]) $(ALLOWICE[1])
+}
+
+IMPORT $(__name__) : slice.slice2cpp : : slice.slice2cpp ;
+IMPORT $(__name__) : slice.slicer : : slice.slicer ;
+IMPORT $(__name__) : slice.slicer.pure : : slice.slicer.pure ;
+