diff options
| author | Michael Forney <mforney@mforney.org> | 2017-09-17 00:03:34 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2017-09-25 19:23:06 -0700 |
| commit | ba94a8513d9a0aadb3f2c834c74b64aa644c61e8 (patch) | |
| tree | 48ac6c85baa7b9d960b9e1e726a906e61ca60967 /pkg/tz/gen.lua | |
| parent | cb362b531d79708a259bbf070dee5104fd63df08 (diff) | |
Rewrite ninja generation scripts in Lua
Diffstat (limited to 'pkg/tz/gen.lua')
| -rw-r--r-- | pkg/tz/gen.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pkg/tz/gen.lua b/pkg/tz/gen.lua new file mode 100644 index 00000000..80c4dd5f --- /dev/null +++ b/pkg/tz/gen.lua @@ -0,0 +1,29 @@ +cflags{'-I $dir'} + +exe('zic', {'zic.c'}) + +rule('zic', 'zic -d $outdir/zoneinfo $in') +file('bin/zic', '755', '$outdir/zic') + +local tzdata = { + 'africa', + 'antarctica', + 'asia', + 'australasia', + 'europe', + 'northamerica', + 'southamerica', + 'pacificnew', + 'etcetera', + 'backward', + 'systemv', + 'factory', +} +build('awk', '$outdir/tzdata.index', { + expand{'$srcdir/', tzdata}, + '|', 'scripts/hash.rc', '$dir/tzdata.awk', + '||', '$builddir/root.stamp', +}, {expr='-f $dir/tzdata.awk out=$outdir/zoneinfo repo=$repo'}) +table.insert(pkg.inputs.index, '$outdir/tzdata.index') + +fetch 'git' |
