From 27a2e2090adbc4e848169b9fbec31aeb80f29a62 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 28 Jan 2015 19:45:25 +0000 Subject: Pass include dirs to slice tools --- slice.jam | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/slice.jam b/slice.jam index 5c7fc83..9120a61 100644 --- a/slice.jam +++ b/slice.jam @@ -1,38 +1,42 @@ import type : register ; import generators : register-standard ; -import type ; -import feature : feature ; -import scanner ; +import type ; +import feature : feature ; +import scanner ; +import toolset ; -type.register SLICE : ice ; +type.register SLICE : ice ; feature slicer : no yes : propagated ; class slice-scanner : common-scanner -{ - rule pattern ( ) - { - return "^[ \t]*#[ \t]*include[ ]*[<\"]([^>\"]*)[>\"]" ; - } -} +{ + rule pattern ( ) + { + return "^[ \t]*#[ \t]*include[ ]*[<\"]([^>\"]*)[>\"]" ; + } +} + +scanner.register slice-scanner : include ; -scanner.register slice-scanner : include ; +type.set-scanner SLICE : slice-scanner ; -type.set-scanner SLICE : slice-scanner ; +generators.register-standard slice.slice2cpp : SLICE : CPP H : no ; +generators.register-standard slice.slicer : SLICE : CPP H : yes ; -generators.register-standard slice.slice2cpp : SLICE : CPP H : no ; -generators.register-standard slice.slicer : SLICE : CPP H : yes ; +toolset.flags slice.slice2cpp INCLUDES ; +toolset.flags slice.slicer INCLUDES ; -actions slice.slice2cpp -{ - slice2cpp --checksum --output-dir $(1[1]:D) $(2) +actions slice.slice2cpp +{ + slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) } -actions slice.slicer +actions slice.slicer { - slice2cpp --checksum --output-dir $(1[1]:D) $(2) - slicer $(2) $(1[1]) -} + slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) + slicer -I"$(INCLUDES)" $(2) $(1[1]) +} IMPORT $(__name__) : slice.slice2cpp : : slice.slice2cpp ; IMPORT $(__name__) : slice.slicer : : slice.slicer ; -- cgit v1.2.3