build-aux/Makefile.am: Introduce .experimental files

If a source file is paired with a `.experimental` file (for example,
`foo.xml` has a silbing `foo.experimental` file), then it will be
precompiled using `--emit xmlo-experimental` instead of `--emit
xmlo`.  Further, the contents of the experimental file may contain
`#`-prefixed comments describing why it exists, as well as additional
options to pass to `tamec`.

For example, if this is an experimental file:

```

--foo
--bar=baz
```

Then the tamec invocation will contain:

  tamec [...] --emit xmlo-experimental --foo --bar=baz -o foo.xmli

This allows for package-level conditional compilation with new features so
that I am able to focus on packages that will provide the most meaningful
benefits to our team, whether they be performance or features.

DEV-13162
main
Mike Gerwitz 2023-06-14 12:02:57 -04:00
parent 7487bdccc3
commit a9bbb87612
1 changed files with 6 additions and 1 deletions

View File

@ -136,7 +136,12 @@ common: $(xmlo_common)
program-ui: ui/package.strip.js ui/Program.js ui/html/index.phtml
# Handle an intermediate step as we transition to the new compiler
# Handle an intermediate step as we transition to the new compiler.
# If a source file is paired with an `*.experimental` file with the same
# stem, then it will trigger compilation using `xmlo-experimental`. The
# file may contain additional arguments to the pass to the compiler.
%.xmli: %.xml %.experimental
$(path_tame)/tamer/target/release/tamec --emit xmlo-experimental $$(grep -v '^#' $*.experimental) -o $@ $<
%.xmli: %.xml
$(path_tame)/tamer/target/release/tamec --emit xmlo -o $@ $<