mirror of
https://github.com/oasislinux/oasis.git
synced 2025-12-20 09:13:52 +01:00
29 lines
557 B
Lua
29 lines
557 B
Lua
cflags{
|
|
'-std=c99',
|
|
'-D _XOPEN_SOURCE=700',
|
|
'-I $outdir',
|
|
'-I $srcdir',
|
|
}
|
|
|
|
yacc('awkgram', 'awkgram.y')
|
|
|
|
pkg.deps = {'$outdir/awkgram.tab.h'}
|
|
|
|
sub('tools.ninja', function()
|
|
toolchain(config.host)
|
|
cflags{'-I $outdir'}
|
|
exe('maketab', {'maketab.c'})
|
|
end)
|
|
|
|
rule('maketab', '$outdir/maketab $in >$out')
|
|
build('maketab', '$outdir/proctab.c', {'$outdir/awkgram.tab.h', '|', '$outdir/maketab'})
|
|
|
|
exe('awk', [[
|
|
b.c main.c parse.c tran.c lib.c run.c lex.c
|
|
$outdir/(awkgram.tab.c proctab.c)
|
|
]])
|
|
file('bin/awk', '755', '$outdir/awk')
|
|
man{'awk.1'}
|
|
|
|
fetch 'git'
|