summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2014-06-02 10:38:29 +0000
committerrandomdan <randomdan@localhost>2014-06-02 10:38:29 +0000
commit6ccda12311837f2853805eaf8c3ab54cc9cbc90b (patch)
treebe22674d626dce68a1cd86c1adc163f88ff42a55
parentAdds missing constructors to support all things being part of a dictionary (diff)
downloadslicer-6ccda12311837f2853805eaf8c3ab54cc9cbc90b.tar.bz2
slicer-6ccda12311837f2853805eaf8c3ab54cc9cbc90b.tar.xz
slicer-6ccda12311837f2853805eaf8c3ab54cc9cbc90b.zip
Split out ICE support from project jam file, add support for slicer
-rw-r--r--Jamroot.jam43
-rw-r--r--slice.jam39
2 files changed, 40 insertions, 42 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index e0e750e..bab30f0 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -1,10 +1,8 @@
import os ;
+import slice ;
using gcc : : [ os.environ CXX ] ;
-import type : register ;
-import generators : register-standard ;
-
project
: requirements
<variant>release:<cflags>"-std=c++0x"
@@ -12,44 +10,5 @@ project
<variant>debug:<linkflags>"-Wl,-z,defs"
;
-import type ;
-import generators ;
-import feature ;
-import "class" : new ;
-import scanner ;
-type.register SLICE : ice ;
-class slice-scanner : common-scanner
-{
- rule pattern ( )
- {
- return "^[ \t]*#[ \t]*include[ ]*[<\"]([^>\"]*)[>\"]" ;
- }
-}
-scanner.register slice-scanner : include ;
-type.set-scanner SLICE : slice-scanner ;
-class slice-generator : generator
-{
- import "class" : new ;
- rule __init__ ( * : * )
- {
- generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
- }
- rule run ( project name ? : property-set : sources * )
- {
- #could I register new virtual targets here? The problem is I can't seem to
- #be able to get the list of includes that the scanner built from anywhere
- return [ generator.run $(project) $(name) : $(property-set) : $(sources) ] ;
- }
- rule generated-targets ( sources + : property-set : project name ? )
- {
- return [ generator.generated-targets $(sources) : $(property-set) : $(project) $(name) ] ;
- }
-}
-generators.register [ new slice-generator slice.slice2cpp : SLICE : CPP H ] ;
-actions slice.slice2cpp
-{
- slice2cpp --checksum --output-dir $(1[1]:D) $(2)
-}
-IMPORT $(__name__) : slice.slice2cpp : : slice.slice2cpp ;
alias all : project2 netfs ytfs ;
diff --git a/slice.jam b/slice.jam
new file mode 100644
index 0000000..5c7fc83
--- /dev/null
+++ b/slice.jam
@@ -0,0 +1,39 @@
+import type : register ;
+import generators : register-standard ;
+import type ;
+import feature : feature ;
+import scanner ;
+
+type.register SLICE : ice ;
+
+feature slicer : no yes : propagated ;
+
+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 H : <slicer>yes ;
+
+actions slice.slice2cpp
+{
+ slice2cpp --checksum --output-dir $(1[1]:D) $(2)
+}
+
+actions slice.slicer
+{
+ slice2cpp --checksum --output-dir $(1[1]:D) $(2)
+ slicer $(2) $(1[1])
+}
+
+IMPORT $(__name__) : slice.slice2cpp : : slice.slice2cpp ;
+IMPORT $(__name__) : slice.slicer : : slice.slicer ;
+