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


  1. cflags{
  2. '-std=c99', '-Wall', '-Wpedantic', '-Wno-maybe-uninitialized',
  3. '-D _DEFAULT_SOURCE',
  4. '-D _BSD_SOURCE',
  5. '-D _XOPEN_SOURCE=700',
  6. '-I $outdir',
  7. }
  8. lib('libutil.a', [[libutil/(
  9. concat.c
  10. cp.c
  11. crypt.c
  12. ealloc.c
  13. enmasse.c
  14. eprintf.c
  15. eregcomp.c
  16. estrtod.c
  17. fnck.c
  18. fshut.c
  19. getlines.c
  20. human.c
  21. linecmp.c
  22. md5.c
  23. memmem.c
  24. mkdirp.c
  25. mode.c
  26. parseoffset.c
  27. putword.c
  28. reallocarray.c
  29. recurse.c
  30. rm.c
  31. sha1.c
  32. sha224.c
  33. sha256.c
  34. sha384.c
  35. sha512.c
  36. sha512-224.c
  37. sha512-256.c
  38. strcasestr.c
  39. strlcat.c
  40. strlcpy.c
  41. strsep.c
  42. strtonum.c
  43. unescape.c
  44. writeall.c
  45. )]])
  46. lib('libutf.a', [[libutf/(
  47. fgetrune.c
  48. fputrune.c
  49. isalnumrune.c
  50. isalpharune.c
  51. isblankrune.c
  52. iscntrlrune.c
  53. isdigitrune.c
  54. isgraphrune.c
  55. isprintrune.c
  56. ispunctrune.c
  57. isspacerune.c
  58. istitlerune.c
  59. isxdigitrune.c
  60. lowerrune.c
  61. rune.c
  62. runetype.c
  63. upperrune.c
  64. utf.c
  65. utftorunestr.c
  66. )]])
  67. rule('getconf', '$srcdir/getconf.sh >$out')
  68. build('getconf', '$outdir/getconf.h', {'|', '$srcdir/getconf.sh'})
  69. local cmds = {
  70. 'cal',
  71. 'cols',
  72. 'comm',
  73. 'cp',
  74. 'cron',
  75. 'dd',
  76. 'du',
  77. 'ed',
  78. 'expand',
  79. 'find',
  80. 'flock',
  81. 'fold',
  82. 'grep',
  83. 'hostname',
  84. 'kill',
  85. 'logger',
  86. 'ls',
  87. 'md5sum',
  88. 'nl',
  89. 'od',
  90. 'printenv',
  91. 'rev',
  92. 'sed',
  93. 'setsid',
  94. 'sha224sum',
  95. 'sha384sum',
  96. 'sha512-224sum',
  97. 'sha512-256sum',
  98. 'sort',
  99. 'sponge',
  100. 'tail',
  101. -- use tar from OpenBSD
  102. 'tftp',
  103. 'tsort',
  104. 'unexpand',
  105. 'uudecode',
  106. 'xargs',
  107. }
  108. for _, cmd in ipairs(cmds) do
  109. local src = cmd
  110. if src == 'install' then
  111. src = 'xinstall'
  112. end
  113. local deps
  114. if cmd == 'getconf' then
  115. deps = {'$outdir/getconf.h'}
  116. end
  117. file('bin/'..cmd, '755', exe(cmd, {src..'.c', 'libutil.a', 'libutf.a'}, deps))
  118. man{'$srcdir/'..src..'.1'}
  119. end
  120. -- TODO: binutils' config/lib-ld.m4 should use AC_REQUIRE([AC_PROG_EGREP]) and
  121. -- $EGREP instead of egrep.
  122. file('bin/egrep', '755', '$dir/egrep')
  123. fetch 'git'