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


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