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/blind/gen.lua | |
| parent | cb362b531d79708a259bbf070dee5104fd63df08 (diff) | |
Rewrite ninja generation scripts in Lua
Diffstat (limited to 'pkg/blind/gen.lua')
| -rw-r--r-- | pkg/blind/gen.lua | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/pkg/blind/gen.lua b/pkg/blind/gen.lua new file mode 100644 index 00000000..a66fd78f --- /dev/null +++ b/pkg/blind/gen.lua @@ -0,0 +1,64 @@ +cflags{ + '-std=c99', '-Wall', '-pedantic', + '-D _DEFAULT_SOURCE', + '-D HAVE_PRCTL', + '-D HAVE_EPOLL', +} + +local cmds = { + 'blind-arithm', + 'blind-colour-ciexyz', + 'blind-colour-srgb', + 'blind-compress', + 'blind-concat', + 'blind-crop', + 'blind-cut', + 'blind-decompress', + 'blind-dissolve', + 'blind-extend', + 'blind-flip', + 'blind-flop', + 'blind-from-image', + 'blind-from-text', + 'blind-from-video', + 'blind-gauss-blur', + 'blind-invert-luma', + 'blind-next-frame', + 'blind-read-head', + 'blind-repeat', + 'blind-reverse', + 'blind-rewrite-head', + 'blind-set-alpha', + 'blind-set-luma', + 'blind-set-saturation', + 'blind-single-colour', + 'blind-skip-pattern', + 'blind-split', + 'blind-stack', + 'blind-time-blur', + 'blind-to-image', + 'blind-to-text', + 'blind-to-video', + 'blind-translate', + 'blind-transpose', + 'blind-write-head', +} +local scripts = { + 'blind-rotate-90', + 'blind-rotate-180', + 'blind-rotate-270', +} + +lib('libutil.a', {'src/util.c', 'src/stream.c'}) + +for _, cmd in ipairs(cmds) do + exe(cmd, {'src/'..cmd..'.c', 'libutil.a'}) + file('bin/'..cmd, '755', '$outdir/'..cmd) +end +for _, script in ipairs(scripts) do + file('bin/'..script, '755', '$srcdir/'..script) +end + +man(expand{'man/', {expand{{cmds, scripts}, '.1'}, 'blind.7'}}) + +fetch 'git' |
