Age | Commit message (Collapse) | Author | Files | Lines |
|
The new plan is to use 0.1.0, 0.2.0 rather than 0.1.0-a1, 0.1.0-a2 for
early development. Easier on the eye and we have 99 versions instead of
49.
|
|
|
|
The syntax is:
using build@0.1.0-a1
The idea is that we will later also use it for modules and 'build' is
a special, the "build system itself" module.
Also fix a problem with peeking and lexer mode switching.
|
|
|
|
|
|
One can also do:
define cpp: cxx
cpp{*}: extension = cpp
cpp{foo}: # foo.cpp
|
|
|
|
Now we can use directive names as variables and targets type, for
example:
print = foo # variable
print{foo}: # target
|
|
|
|
|
|
|
|
A module can set and then check the config.*.configured special variable
to false.
|
|
if
if!
elif
elif!
else
The expression should evaluate to true of false. The if! and elif!
versions are provided as shortcuts to writing if (!...).
See tests/if-else for examples.
|
|
We now first check the 'extension' variable, then use the default.
|
|
|
|
|
|
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).
|
|
We now also check target type/pattern-specific variables. So the new
usage is:
cli{*}: extension = cli
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
Now a wildcard/fallback rule should explicitly detect and handle unresolved
situation.
|
|
For example:
cxx{*-options}: dist = true
|
|
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.
|
|
This happens when we use the group only for setting cli.options.
Not very clean.
|
|
|
|
This, for example, can happen when we have a fallback rule for dist(update)
or configure(update).
|
|
|
|
See tests/names for more examples.
|
|
|
|
|
|
'foo/ {a b}' should be equivalent to 'foo/ a b', not 'foo/a foo/b'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sometimes (e.g., in bpkg configuration) we don't have a project name.
In fact, it is not really a project; it can never be referenced in an
import directive.
So we now have a notion of an unnamed project. Such a project should
still have the 'project' variable set first thing in bootstrap.build
but its value should be empty.
Note that we can still amalgamate such projects just liked named ones.
|
|
|
|
In short, in buildspec, parens are treated as operation application
rather than eval context unless double-quoted. So in 'clean(foo)' we
have the clean operation on target foo while in '"clean(foo)"' we
have target cleanfoo.
Also, as a bonus, we can now do {clean update}(/long/target/name/).
|
|
|
|
|
|
|
|
To capture literal newline, use quoting.
|
|
Now only unquoted, literal names are recognized as directives, for
example:
'print' = abc
print $print
|
|
Now it is just a stub that prints the function name and its argument.
Currently only single argument can be passed (no value pack support
yet).
|
|
For now it acts as just the value mode that can be enabled anywhere
variable expansion is supported, for example:
(foo=bar):
And the primary use currently is to enable/test quoted and indirect
variable expansion:
"foo bar" = FOO BAR
print $"foo bar" # Invalid.
print $("foo bar") # Yeah, baby.
foo = FOO
FOO = foo
print $($foo)
Not that you should do something like this...
|