summaryrefslogtreecommitdiff
path: root/pkg/mandoc/gen.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-09-17 00:03:34 -0700
committerMichael Forney <mforney@mforney.org>2017-09-25 19:23:06 -0700
commitba94a8513d9a0aadb3f2c834c74b64aa644c61e8 (patch)
tree48ac6c85baa7b9d960b9e1e726a906e61ca60967 /pkg/mandoc/gen.lua
parentcb362b531d79708a259bbf070dee5104fd63df08 (diff)
Rewrite ninja generation scripts in Lua
Diffstat (limited to 'pkg/mandoc/gen.lua')
-rw-r--r--pkg/mandoc/gen.lua116
1 files changed, 116 insertions, 0 deletions
diff --git a/pkg/mandoc/gen.lua b/pkg/mandoc/gen.lua
new file mode 100644
index 00000000..eff9c026
--- /dev/null
+++ b/pkg/mandoc/gen.lua
@@ -0,0 +1,116 @@
+cflags{
+ '-I include',
+ '-I $dir',
+ '-I pkg/openbsd/include',
+ '-I $builddir/pkg/zlib/include',
+}
+
+lib('libmandoc.a', {
+ 'man.c',
+ 'man_macro.c',
+ 'man_validate.c',
+
+ 'att.c',
+ 'lib.c',
+ 'mdoc.c',
+ 'mdoc_argv.c',
+ 'mdoc_macro.c',
+ 'mdoc_state.c',
+ 'mdoc_validate.c',
+ 'st.c',
+
+ 'eqn.c',
+ 'roff.c',
+ 'roff_validate.c',
+ 'tbl.c',
+ 'tbl_data.c',
+ 'tbl_layout.c',
+ 'tbl_opts.c',
+
+ 'chars.c',
+ 'mandoc.c',
+ 'mandoc_aux.c',
+ 'mandoc_ohash.c',
+ 'mandoc_xr.c',
+ 'msec.c',
+ 'preconv.c',
+ 'read.c',
+
+ 'compat_fts.c',
+ 'compat_ohash.c',
+}, {'pkg/zlib/headers'})
+
+exe('mandoc', {
+ 'main.c',
+ 'manpath.c',
+ 'mdoc_man.c',
+ 'mdoc_markdown.c',
+ 'out.c',
+ 'tag.c',
+ 'tree.c',
+
+ 'eqn_html.c',
+ 'html.c',
+ 'man_html.c',
+ 'mdoc_html.c',
+ 'roff_html.c',
+ 'tbl_html.c',
+
+ 'eqn_term.c',
+ 'man_term.c',
+ 'mdoc_term.c',
+ 'roff_term.c',
+ 'term.c',
+ 'term_ascii.c',
+ 'term_ps.c',
+ 'term_tab.c',
+ 'tbl_term.c',
+
+ 'dbm.c',
+ 'dbm_map.c',
+ 'mansearch.c',
+
+ 'dba.c',
+ 'dba_array.c',
+ 'dba_read.c',
+ 'dba_write.c',
+ 'mandocdb.c',
+
+ 'libmandoc.a',
+ '$builddir/pkg/openbsd/libbsd.a',
+ '$builddir/pkg/zlib/libz.a',
+})
+file('bin/mandoc', '755', '$outdir/mandoc')
+for _, cmd in ipairs{'apropos', 'man', 'whatis', 'makewhatis'} do
+ sym('bin/'..cmd, 'mandoc')
+end
+
+exe('demandoc', {
+ 'demandoc.c',
+ 'libmandoc.a',
+ '$builddir/pkg/openbsd/libbsd.a',
+ '$builddir/pkg/zlib/libz.a',
+})
+file('bin/demandoc', '755', '$outdir/demandoc')
+
+man{
+ 'mandoc.1',
+ 'demandoc.1',
+ 'man.1',
+ 'apropos.1',
+
+ 'man.conf.5',
+ 'mandoc.db.5',
+
+ 'man.7',
+ 'mdoc.7',
+ 'roff.7',
+ 'eqn.7',
+ 'tbl.7',
+ 'mandoc_char.7',
+
+ 'makewhatis.8',
+}
+sym('share/man/man1/whatis.1.gz', 'apropos.1.gz')
+
+fetch 'curl'