No description
| .gitignore | ||
| LICENSE | ||
| readme.md | ||
| schmorder.smu | ||
schmorder
Portmanteau of "schmu" and "order"
This is a program which takes as input dependency information generated by the
schmu compiler on stdin and outputs a topologically sorted list of dependencies
suitable for the tup build system (which needs its targets already in
topologically sorted order).
building
schmorder only depends on the schmu std lib
schmu --release schmorder.smu
usage
Run the compiled executable with input from stdin. The format matches the
--deps output of the schmu compiler.
In this example we grab all module files, exclude main.smu (because it is the executable and gets an extra build step in our Tupfile) and use schmu -m --deps to generate dependency information.
find *smu -not -path "main.smu" -exec schmu -m --deps {} \; | schmorder > tupdeps
schmorder then toposorts it and outputs it in a format suitable for this Tupfile:
# macro for modules
!schmu = |> schmu @(release) -s $(TUP_VARIANTDIR) -o %1o -m %f |> %B.o %B.smi
include tupdeps
# main compilation
: main.smu | {objs} |> schmu @(release) -s $(TUP_VARIANTDIR) %f -o %o |> %B