Warning, /frameworks/syntax-highlighting/autotests/input/Jamroot is written in an unsupported language. File is not indexed.
0001 project 0002 : requirements <include>/home/ghost/Work/boost <threading>multi 0003 ; 0004 project a : : debug ; 0005 0006 exe hello : hello.cpp ; 0007 0008 exe hello 0009 : hello.cpp 0010 : <include>boost <threading>multi 0011 ; 0012 exe app : app.cpp ../util/foo//bar ; 0013 exe important : main.cpp helpers/<link>static ; 0014 0015 exe b : [ glob *.cpp ] ; 0016 0017 lib tools : 0018 [ glob *.cpp ] ; 0019 0020 lib tools : [ glob *.cpp : file_to_exclude.cpp bad*.cpp ] ; 0021 0022 lib network : network.cpp 0023 : <conditional>@my-rule 0024 ; 0025 0026 DEPENDS foo.o : foo.c ; 0027 0028 using msvc : : "Z:/Programs/Microsoft Visual Studio/vc98/bin/cl" ; 0029 using msvc : : echo Compiling && foo/bar/baz/cl ; 0030 using gcc : 5 : : <cxxflags>"-std=c++14 -O2" ; 0031 using clang : 3.9 : : <cxxflags>-std=c++14 <cxxflags>-O2 ; 0032 exe test3 : test3.cpp : -<threading>multi ; 0033 XYZ += <cxxflags>-Wzero-as-null-pointer-constant&&-Wno-zero-as-null-pointer-constant ; 0034 exe hello : hello.cpp : <os>NT,<toolset>gcc:<link>static ; 0035 0036 install dist : hello helpers : 0037 <variant>release:<location>dist/release 0038 <variant>debug:<location>dist/debug ; 0039 install dist2 : hello helpers : <location>$(DIST) ; 0040 0041 exe app : app.cpp : [ check-target-builds has_foo "System has foo" : <library>foo : <define>FOO_MISSING=1 ] ; 0042 0043 import path : * ; 0044 0045 using python 0046 : 2.7 # version 0047 : # Interpreter/path to dir 0048 : /usr/include/python2.7 # includes 0049 : /usr/lib/x86_64-linux-gnu # libs 0050 : # conditions 0051 ; 0052 0053 xx ; 0054 xx ;; ; 0055 xx ;a ; 0056 xx a; ; 0057 xx ;a; ; 0058 0059 ## comment title 0060 # BUG 0061 # TODO 0062 # aTODOa 0063 0064 #| multi 0065 line 0066 comment 0067 TODO 0068 bla bla 0069 |# 0070 0071 if cond { 0072 statements ; 0073 } 0074 else { 0075 statements ; 0076 } 0077 0078 for var in list { 0079 statements ; 0080 } 0081 0082 while cond { 0083 statements ; 0084 } 0085 0086 switch value 0087 { 0088 case pattern1 : statements ; 0089 case pattern2 : statements ; 0090 other ; 0091 } 0092 0093 if xxinxx { 0094 } 0095 0096 ifxxx s ; 0097 0098 rule a? ( x ) 0099 { 0100 echo $(x) ; 0101 } 0102 a? 23 ; 0103 0104 local rule test ( a ) 0105 { 0106 } 0107 0108 rule example 0109 ( 0110 parameter1 : 0111 parameter2 ? : 0112 parameter3 + : 0113 parameter4 * 0114 ) 0115 { 0116 if <variant>debug in $(properties) 0117 { 0118 OPTIONS on $(targets) = --debug ; 0119 } 0120 } 0121 0122 rule my-rule ( properties * ) 0123 { 0124 local result ; 0125 if <toolset>gcc <optimization>speed in $(properties) 0126 { 0127 result += <define>USE_INLINE_ASSEMBLER ; 0128 return $(result) ; 0129 } 0130 0131 local m = [ CALLER_MODULE ] ; 0132 local result ; 0133 for v in $(values) 0134 { 0135 if [ modules.call-in $(m) : $(f) $(v) ] 0136 { 0137 result += $(v) ; 0138 } 0139 } 0140 return result ; 0141 return <name>$(name) ; 0142 return [ virtual-target.register $(t) ] ; 0143 return [ sequence.transform virtual-target.register : $(targets) ] ; 0144 } 0145 0146 rule run ( project name ? : property-set : sources * ) 0147 { 0148 if [ $(s).type ] = PY 0149 { 0150 python = $(s) ; 0151 } 0152 0153 local new-sources ; 0154 for local s in $(sources) 0155 { 0156 if [ type.is-derived [ $(s).type ] CPP ] 0157 { 0158 local name = [ $(s).name ] ; # get the target's basename 0159 if $(name) = [ $(python).name ] 0160 { 0161 name = $(name)_ext ; # rename the target 0162 } 0163 new-sources += [ generators.construct $(project) $(name) : 0164 PYTHON_EXTENSION : $(property-set) : $(s) $(libs) ] ; 0165 } 0166 } 0167 0168 result = [ construct-result $(python) $(new-sources) : $(project) $(name) 0169 : $(property-set) ] ; 0170 } 0171 0172 0173 rule link 0174 { 0175 DEPENDS $(<) : [ on $(<) return $(DEF_FILE) ] ; 0176 } 0177 0178 0179 actions link bind DEF_FILE 0180 { 0181 $(.LD) .... /DEF:$(DEF_FILE) .... 0182 } 0183 0184 actions create-file-from-another 0185 { 0186 create-file-from-another $(OPTIONS) $(<) $(>) 0187 } 0188 0189 0190 mypackage = 0191 [ pkg-config.import mypackage : usage-requirements <conditional>@define_ns 0192 ] ; 0193 0194 me = [ modules.binding $(__name__) ] ; 0195 0196 local ZLIB_INCLUDE = [ modules.peek : ZLIB_INCLUDE ] ; 0197 0198 local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ; 0199 0200 $(var) field1 : field2 : ... : fieldN ; 0201 $(var)o aaaa ; 0202 0203 on target $(var) field1 : field2 : ... : fieldN ; 0204 0205 [ $(var) field1 : field2 : ... : fieldN ] 0206 [ on target $(var) field1 : field2 : ... : fieldN ] 0207 0208 local key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" ; 0209 local values = [ W32_GETREGNAMES "$(key)\\$(subkey)" : values ] ; 0210 0211 variable = $(b) $(c) ; 0212 variable += elements ; 0213 variable on targets = elements ; 0214 variable on targets += "elements" ; 0215 variable default = elements ; 0216 variable ?= elements ; 0217 0218 defs += <define>NAME='\"$(VALUE)\"' ; 0219 0220 x = $($(Z)) ; 0221 x = $(Z)x ; 0222 x = x$(Z) ; 0223 x = x$(Z)x ; 0224 0225 x = "C:\\Program Files\\Borland" ; ECHO $(x:T) ; 0226 0227 module my_module # my module 0228 { 0229 rule salute ( x ) { ECHO $(x), world ; } 0230 rule greet ( ) { salute hello ; } 0231 greet ; # ok 0232 } 0233 0234 class verbatim-scanner : common-scanner 0235 { 0236 rule pattern ( ) 0237 { 0238 return "//###include[ ]*\"([^\"]*)\"" ; 0239 } 0240 greet ; # error 0241 } 0242 0243 # test crazy (and valid) name 0244 a<b> a<b> [ a<b> a<b> a] ] ; 0245 rule a<b>() () { } 0246 actions a<b> { } 0247 local a<x> ; 0248 local a<x> = a<b> ;