logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

gen.lua (580B)


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