aboutsummaryrefslogtreecommitdiff
path: root/build2/parser.cxx
AgeCommit message (Collapse)AuthorFilesLines
2019-07-01Split build system into library and driverBoris Kolpackov1-5526/+0
2019-06-19Improve diagnosticsBoris Kolpackov1-1/+1
2019-06-03Adapt to renaming traits alias to traits_type for basic_path, basic_url, and ↵Karen Arutyunov1-6/+6
string_table class templates
2019-05-15Add ability to depend on (declared) ad hoc group memberBoris Kolpackov1-9/+23
2019-05-13Remove order dependence in ad hoc group handlingBoris Kolpackov1-18/+5
Also, don't match group_recipe since we neither execute nor access the state.
2019-05-10Change ad hoc group syntax from primary<...> to <primary ...>Boris Kolpackov1-22/+62
2019-05-10Generalize target/prerequisite var block, initial ad hoc target workBoris Kolpackov1-294/+495
Target/prerequisite-specific variable blocks can now be present even if there are prerequisites. For example, now instead of: exe{foo}: cxx{foo} exe{foo}: cc.loptions += ... Or: exe{foo}: cxx{foo} exe{foo}: { cc.loptions += ... cc.libs += ... } We can write: exe{foo}: cxx{foo} { cc.loptions += ... cc.libs += ... } This also works with dependency chains in which case the block applies to the set of prerequisites (note: not targets) before the last ':'. For example: ./: exe{foo}: libue{foo}: cxx{foo} { bin.whole = false # Applies to the libue{foo} prerequisite. }
2019-03-14Add support for multiple variable overridesBoris Kolpackov1-1/+1
Now we can do: $ b config.cxx.coptions=-O3 config.cxx.coptions=-O0 Or even: $ b config.cxx.coptions=-O3 config.cxx.coptions+=-g
2019-03-12Diagnose out of project inclusionBoris Kolpackov1-5/+14
2019-03-07Add support for alternative build file/directory naming schemeBoris Kolpackov1-8/+23
Now the build/*.build, buildfile, and .buildignore filesystem entries in a project can alternatively (but consistently) be called build2/*.build2, build2file, and .build2ignore. See a note at the beginning of the Project Structure section in the manual for details (motivation, restrictions, etc).
2019-01-16Update copyright yearKaren Arutyunov1-1/+1
2018-12-03Diagnose separated variable/function nameBoris Kolpackov1-1/+3
2018-11-23Don't allow pattern characters in target names, scope directoriesBoris Kolpackov1-16/+49
2018-11-22Fix bug in dependency chain logicBoris Kolpackov1-13/+15
2018-11-21Add support for target and prerequisite specific variable blocksBoris Kolpackov1-212/+387
For example, now instead of: lib{foo}: cxx.loptions += -static lib{foo}: cxx.libs += -lpthread We can write: lib{foo}: { cxx.loptions += -static cxx.libs += -lpthread } The same works for prerequisites as well as target type/patterns. For example: exe{*.test}: { test = true install = false }
2018-11-16Implement support for dependency chainsBoris Kolpackov1-136/+167
Now instead of: ./: exe{foo} exe{foo}: cxx{*} We can write: ./: exe{foo}: cxx{*} Or even: ./: exe{foo}: libue{foo}: cxx{*} This can be combined with prerequisite-specific variables (which naturally only apply to the last set of prerequisites in the chain): ./: exe{foo}: libue{foo}: bin.whole = false
2018-11-14Fallback to loading outer buildfile if there isn't one in src_baseBoris Kolpackov1-3/+3
This covers the case where the target is defined in the outer buildfile which is common with non-intrusive project conversions where everything is built from a single root buildfile.
2018-11-14Tweak assert directive diagnosticsBoris Kolpackov1-3/+4
2018-11-07Remove extraneous spaceBoris Kolpackov1-1/+1
2018-11-07Improve parser diagnosticsBoris Kolpackov1-0/+11
2018-10-23Treat invalid names as values if they are quotedBoris Kolpackov1-19/+29
2018-09-14Fix uncaught invalid_path exceptionKaren Arutyunov1-18/+25
2018-09-05Create .buildignore file in testscript root working directoryKaren Arutyunov1-1/+2
2018-09-03Ignore directories with .buildignore file when generating names with ↵Karen Arutyunov1-9/+11
wildcard patterns
2018-08-31Adjust terminology in diagnostic and commentsBoris Kolpackov1-5/+5
2018-08-30Handle missing export directive in export stubBoris Kolpackov1-0/+3
If none were executed, then we assume the requested target is not exported.
2018-08-09Handle few corner cases in concatenated expansionBoris Kolpackov1-23/+42
2018-08-09Add support for name patterns without wildcard charactersBoris Kolpackov1-16/+17
In particular, this allows the "if-exists" specification of prerequisites, for example: for t: $tests exe{$t}: cxx{$t} test{+$t}
2018-08-09Fix issue with concatenating empty typed LHSBoris Kolpackov1-3/+14
2018-08-07Add support for default extension specification, trailing dot escapingBoris Kolpackov1-67/+133
For example: cxx{*}: extension = cxx cxx{foo} # foo.cxx cxx{foo.test} # foo.test (probably what we want...) cxx{foo.test...} # foo.test.cxx (... is this) cxx{foo..} # foo. cxx{foo....} # foo.. cxx{foo.....} # error (must come in escape pair)
2018-07-30Make project variable to be of project_name typeKaren Arutyunov1-8/+19
2018-06-28Add prerequisite variable visibility specification/enforcementBoris Kolpackov1-10/+36
2018-05-19Update copyright yearKaren Arutyunov1-1/+1
2018-05-16Fix uncaught invalid_path exceptionKaren Arutyunov1-11/+19
2018-05-12Fix assertion failure due to parser::attributes_pop() call in pre-parse modeKaren Arutyunov1-1/+2
2018-05-04Enable new directory target-specific variable assignment syntaxBoris Kolpackov1-125/+103
2018-05-03Regularize directory target/scope-specific variable assignment syntaxBoris Kolpackov1-117/+204
2018-04-27Redo run directive diagnostics not to rely on invalid pathsBoris Kolpackov1-28/+13
2018-04-26Implement run buildfile directiveBoris Kolpackov1-53/+170
Now we can do: run echo 'foo = bar' print $foo
2018-02-07Add support for update-for-{test,install} operation aliasesBoris Kolpackov1-2/+2
2018-02-03Get rid of action rule override semanticsBoris Kolpackov1-6/+7
Instead we now have two more or less separate match states for outer and inner parts of an action.
2018-01-02Fix few undefined behavior (ubsan) bugsBoris Kolpackov1-3/+3
2017-12-16Split stream verbosity into components (path, extension)Boris Kolpackov1-7/+0
Use to make sure structured result output always contains absolute target path.
2017-11-28Fix bug in importing multiple targets with single directiveBoris Kolpackov1-0/+7
2017-11-20Add support for dumping prerequisite-specific variablesBoris Kolpackov1-3/+6
2017-11-20Implement dump directiveBoris Kolpackov1-9/+100
It can be used to print (to stderr) a human-readable representation of the current scope or a list of targets. For example: dump # Dump current scope. dump lib{foo} details/exe{bar} # Dump two targets. This is primarily useful for debugging as well as to write build system tests.
2017-11-09Add support for for-loopBoris Kolpackov1-2/+168
The semantics is similar to the C++11 range-based for: list = 1 2 3 for i: $list print $i Note that there is no scoping of any kind for the loop variable ('i' in the above example). See tests/loop/for.test for some examples/ideas. In the future the plan is to also support more general while-loop as well as break and continue.
2017-11-09Initial support for prerequisite-specific variables, use for bin.wholeBoris Kolpackov1-25/+121
2017-10-03Adapt to modularization of libbutlKaren Arutyunov1-1/+1
2017-09-29Allow pattern group to start with inclusionKaren Arutyunov1-30/+130