aboutsummaryrefslogtreecommitdiff
path: root/build/target.cxx
AgeCommit message (Collapse)AuthorFilesLines
2015-12-02Redo extension derivation for file{}, doc{}, and cli{}Boris Kolpackov1-4/+5
We now first check the 'extension' variable, then use the default.
2015-12-02Implement optional module loadingBoris Kolpackov1-1/+14
The syntax is: using? cli Now each module use results in two bool variables: <module>.loaded and <module>.configured. Also implement variable visibility (the above two variables are limited to project).
2015-12-01Use 'extension' variable to resolve extension for file{}Boris Kolpackov1-71/+10
We now also check target type/pattern-specific variables. So the new usage is: cli{*}: extension = cli
2015-12-01Reimplement define as dynamic derivation rather than aliasBoris Kolpackov1-35/+13
New syntax: define cli: file The rationale is we need to be able to assign the file extension (using type/pattern-specific variables). And if it is an alias, we will assign it to the original target type. Note that we could still support aliases if we need to. Will need to bring back the id member in target_type that would normally point to itself but for an alias would point to the origin.
2015-12-01Implement support for definition target type aliasesBoris Kolpackov1-14/+25
For example: define cli=file Currently, the semantics is that of a real alias with only name differences that are used for display. See tests/define/buildfile for more use cases.
2015-11-30Implement target type/pattern-specific variablesBoris Kolpackov1-10/+46
For example: cxx{*-options}: dist = true 1. Only single '*' wildcard is supported, matches 0 or more characters. 2. If target type is not specified, it defaults to any target. 3. Appending (+=) is not allowed. 4. The value is expanded immediately in the context of the scope. 5. The more specific pattern (i.e., with the shortest "stem") is preferred. If the stem has the same length, then the last defined (but not redefined) pattern is used. This will probably have to change to become an error. See tests/variable/type-pattern for more examples.
2015-09-08Rework diagnostics verbosity, add quiet mode/optionBoris Kolpackov1-1/+1
2015-08-31Rework scoping logicBoris Kolpackov1-1/+1
Now the src directory is entered into the scope map and points to the same scope as out. This means that targets that are in src, not out (e.g., source files) will "see" rules, variables, etc. This becomes important when we try, for example, to install a source file (say, a header) from src: we need the rule as well as the install.* variables.
2015-08-27Dist module/meta-operation initial implementationBoris Kolpackov1-0/+20
2015-08-24New variable architectureBoris Kolpackov1-15/+17
2015-08-17Tighten variable_map interfaceBoris Kolpackov1-11/+5
2015-08-14Don't short-cut to group_state if recipe is group_recipeBoris Kolpackov1-4/+1
This way we mess up the dependents count.
2015-08-14Fix several issues in outer operation recipe override logicBoris Kolpackov1-0/+40
2015-08-13Rework postponed logicBoris Kolpackov1-1/+1
Specifically, now postponed is only used by the execution mode logic and rules should not return it directly.
2015-08-03match_only rework, part 2Boris Kolpackov1-0/+6
2015-07-31Essential install module functionalityBoris Kolpackov1-34/+88
2015-07-29Initial support for target type/pattern-specific variablesBoris Kolpackov1-1/+44
2015-07-24Add support for generated test input/outputBoris Kolpackov1-2/+2
2015-07-24Further test module developmentBoris Kolpackov1-1/+2
2015-07-21Improve nested operations supportBoris Kolpackov1-1/+1
The idea is this: we need to be able to override "conditional, inner for outer" recipes with the "unconditional inner" ones. Here is the concrete scenario: we have {update, test} action and the lib{} target that is both mentioned as a prerequisite of ./ and exe{}, which is a test. At first, we want to ignore lib{} when reached as a prerequisite of ./. But then we get to it via exe{} (which is a test and thus should be updated). At this point we should override the recipe for lib{} with the one that would update it rather than ignore.
2015-07-21Add alias{} target type, use as base for dir{}Boris Kolpackov1-4/+14
2015-07-07Rework module architectureBoris Kolpackov1-77/+0
Now the target type and rule maps are in scopes (builtins -- in global scope). We also now have the map of loaded modules in the root scope of each project.
2015-07-01Group state supportBoris Kolpackov1-1/+2
2015-07-01Cleanup group "see through" designBoris Kolpackov1-15/+19
2015-06-30Group "see through" iteration, take 1Boris Kolpackov1-0/+12
2015-06-26Part two of dependency injection with auto-generation supportBoris Kolpackov1-0/+11
2015-06-25Part one of dependency injection with auto-generation supportBoris Kolpackov1-1/+9
2015-06-24First take on the cli module plus necessary infrastructureBoris Kolpackov1-14/+60
2015-06-18Move path_mtime to filesystem, rename file_mtime, follow symlinksBoris Kolpackov1-3/+8
2015-05-22Avoid relying on static initialization orderBoris Kolpackov1-16/+14
2015-05-11Correct copyrightBoris Kolpackov1-1/+1
2015-04-24Implement lib/liba/libso{} target group, shared/static library buildBoris Kolpackov1-19/+3
2015-04-17Search in target group during variable lookupBoris Kolpackov1-3/+7
2015-04-17Add support for target groups, use to handle obj/obja/objso object targetsBoris Kolpackov1-14/+16
2015-04-15New variables architectureBoris Kolpackov1-4/+21
Now operator[] is only used for lookup.
2015-04-15Initial library supportBoris Kolpackov1-0/+37
2015-04-13Add separate type to represent directory pathsBoris Kolpackov1-19/+19
2015-04-07Provide more convenient access to root scopeBoris Kolpackov1-8/+23
2015-03-27Rework dependency state dump supportBoris Kolpackov1-1/+1
We now have a combined (scopes, variables, and targets) dump.
2015-03-24Make meta-operations control build loop; add disfigure skeletonBoris Kolpackov1-5/+5
2015-03-13Add support for "first" and "last" execution modesBoris Kolpackov1-5/+12
2015-03-12Implement clean operationBoris Kolpackov1-2/+15
2015-03-10Further operation implementationBoris Kolpackov1-0/+2
2015-03-09Build according to buildspecBoris Kolpackov1-31/+109
At this stage operations are still ignored.
2015-03-04Move roots and bases to appropriate scopesBoris Kolpackov1-1/+1
2015-03-03Implement new default target logic, canonical directory name (empty value)Boris Kolpackov1-1/+0
The logic is as follows: if we have an explicit current directory target, then that's the default target. Otherwise, we take the first target and use it as a prerequisite to create an implicit current directory target, effectively making it the default target via an alias. If there are no targets in this buildfile, then we don't do anything.
2015-03-02Cleanup to support clang compilationBoris Kolpackov1-3/+5
2015-02-27Variable assignment, appending supportBoris Kolpackov1-1/+1
2015-02-24Use prefix_map for scopes, establish root scopeBoris Kolpackov1-1/+1
2015-02-24Add fsdir{} for creating directoriesBoris Kolpackov1-0/+9