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 | |
| parent | cb362b531d79708a259bbf070dee5104fd63df08 (diff) | |
Rewrite ninja generation scripts in Lua
Diffstat (limited to 'pkg/blind')
| -rw-r--r-- | pkg/blind/gen.lua | 64 | ||||
| -rw-r--r-- | pkg/blind/gen.rc | 65 |
2 files changed, 64 insertions, 65 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' diff --git a/pkg/blind/gen.rc b/pkg/blind/gen.rc deleted file mode 100644 index 9b259e85..00000000 --- a/pkg/blind/gen.rc +++ /dev/null @@ -1,65 +0,0 @@ -cflags\ - '-std=c99' -Wall -pedantic\ - -D _DEFAULT_SOURCE\ - -D HAVE_PRCTL\ - -D HAVE_EPOLL - -exes=(\ - 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\ -) -scripts=(\ - blind-rotate-90\ - blind-rotate-180\ - blind-rotate-270\ -) - -lib libutil.a src/^(util.c stream.c) - -for(exe in $exes) { - exe $exe src/$exe.c libutil.a - file bin/$exe '$outdir'/$exe 755 -} -for(script in $scripts) { - file bin/$script '$srcdir'/$script 755 -} - -man -d man\ - 1 ($exes $scripts)^.1\ - 7 blind.7 - -fetch git |
