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 (1605B)


  1. cflags{
  2. '-std=c99', '-Wall', '-Wextra', '-Wpedantic', '-Wno-switch',
  3. '-D _XOPEN_SOURCE=700',
  4. }
  5. lib('libcommon.a', {
  6. 'blaze822.c',
  7. 'filter.c',
  8. 'mymemmem.c',
  9. 'mystrverscmp.c',
  10. 'mytimegm.c',
  11. 'pipeto.c',
  12. 'rfc2045.c',
  13. 'rfc2047.c',
  14. 'rfc2231.c',
  15. 'safe_u8putstr.c',
  16. 'seq.c',
  17. 'slurp.c',
  18. 'squeeze_slash.c',
  19. })
  20. local tools = {
  21. 'maddr',
  22. 'magrep',
  23. 'mdate',
  24. 'mdeliver',
  25. 'mdirs',
  26. 'mexport',
  27. 'mflag',
  28. 'mflow',
  29. 'mgenmid',
  30. 'mhdr',
  31. 'minc',
  32. 'mlist',
  33. 'mmime',
  34. 'mpick',
  35. 'mscan',
  36. 'msed',
  37. 'mseq',
  38. 'mshow',
  39. 'msort',
  40. 'mthread',
  41. }
  42. for _, tool in ipairs(tools) do
  43. exe(tool, {tool..'.c', 'libcommon.a'})
  44. file('bin/'..tool, '755', '$outdir/'..tool)
  45. end
  46. build('awk', '$outdir/museragent', {'$srcdir/VERSION'}, {
  47. expr=[['{print "#!/bin/sh"; print "exec printf \"User-Agent: mblaze/%s\\n\" \"" $$0 "\""}']],
  48. })
  49. local scripts = {
  50. 'mcolor',
  51. 'mcom',
  52. 'mless',
  53. 'mmkdir',
  54. 'mquote',
  55. }
  56. for _, script in ipairs(scripts) do
  57. file('bin/'..script, '755', '$srcdir/'..script)
  58. end
  59. file('bin/museragent', '755', '$outdir/museragent')
  60. sym('bin/mbnc', 'mcom')
  61. sym('bin/mfwd', 'mcom')
  62. sym('bin/mrep', 'mcom')
  63. man{
  64. 'man/maddr.1',
  65. 'man/magrep.1',
  66. 'man/mblaze-profile.5',
  67. 'man/mblaze.7',
  68. 'man/mbnc.1',
  69. 'man/mcom.1',
  70. 'man/mdeliver.1',
  71. 'man/mdirs.1',
  72. 'man/mexport.1',
  73. 'man/mflag.1',
  74. 'man/mflow.1',
  75. 'man/mfwd.1',
  76. 'man/mgenmid.1',
  77. 'man/mhdr.1',
  78. 'man/minc.1',
  79. 'man/mless.1',
  80. 'man/mlist.1',
  81. 'man/mmime.1',
  82. 'man/mmkdir.1',
  83. 'man/mmsg.7',
  84. 'man/mpick.1',
  85. 'man/mrefile.1',
  86. 'man/mrep.1',
  87. 'man/mscan.1',
  88. 'man/msed.1',
  89. 'man/mseq.1',
  90. 'man/mshow.1',
  91. 'man/msort.1',
  92. 'man/mthread.1',
  93. }
  94. fetch 'git'