opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

gen.lua (585B)


      1 cflags({
      2 	'-std=c11', '-Wall', '-Wpedantic',
      3 	'-D _XOPEN_SOURCE=700',
      4 	'-I $outdir',
      5 	'-I $srcdir',
      6 })
      7 
      8 yacc('awkgram', 'awkgram.y')
      9 
     10 pkg.deps = {'$outdir/awkgram.tab.h'}
     11 
     12 sub('tools.ninja', function()
     13 	toolchain(config.host)
     14 	cflags{'-I $outdir'}
     15 	exe('maketab', {'maketab.c'})
     16 end)
     17 
     18 rule('maketab', '$outdir/maketab $in >$out')
     19 build('maketab', '$outdir/proctab.c', {'$outdir/awkgram.tab.h', '|', '$outdir/maketab'})
     20 
     21 exe('awk', [[
     22 	b.c main.c parse.c tran.c lib.c run.c lex.c
     23 	$outdir/(awkgram.tab.c proctab.c)
     24 ]])
     25 file('bin/awk', '755', '$outdir/awk')
     26 man({'awk.1'})
     27 
     28 fetch('git')