Debian Codegraph @

icmake/man

raw
1 void _man(string source, string nr, int usePath, string macroBase)
2 {
3 string manDst;
4 string manHtmlDst;
5 string nrs;
6 string includes;
7
8 nrs = (string)nr;
9
10 manDst = g_install + MAN + "/man" + nrs + "/" + source + "." + nrs;
11 manHtmlDst = g_wip + "/man/" + source + "." + nrs + ".html";
12
13 includes = " -I.:" + g_wip + ":" + macroBase;
14
15 run("scripts/configreplacements " +
16 "man/" + source + ".in " +
17 g_wip + "/manyo.yo " +
18 macroBase);
19
20 // manyo.yo is the file to convert to a man-page
21
22 if (usePath) // use yodl/yodlpost via yodl2man
23 {
24 putenv("YODL_BIN=" + g_cwd + g_install + BIN);
25 run("yodl2man" + includes +
26 " -o" + manDst + " "
27 "manyo");
28 run("yodl2html" + includes +
29 " -o" + manHtmlDst + " "
30 "manyo");
31 }
32 else
33 {
34 run(g_install + BIN + "/yodl" + includes +
35 " -o" + g_wip + "/out man manyo");
36
37 run(g_install + BIN + "/yodlpost "
38 + g_wip + "/out.idx " + g_wip + "/out " + manDst);
39
40 run(g_install + BIN + "/yodl" + includes +
41 " -o" + g_wip + "/outhtml html manyo");
42
43 run(g_install + BIN + "/yodlpost "
44 + g_wip + "/outhtml.idx " + g_wip + "/outhtml " +
45 manHtmlDst);
46 }
47 }
48
49 void manExit(string path)
50 {
51 int usePath;
52 string macroBase;
53
54 usePath = path == "path";
55 macroBase = g_wip + "/macros";
56
57 // where to install the man-pages
58 md(g_install + MAN + "/man1 " + g_install + MAN + "/man7");
59
60 md(g_wip + "/man"); // where to install the html man-pages
61
62
63 _man("yodl", "1", usePath, macroBase);
64 _man("yodlpost", "1", usePath, macroBase);
65 _man("yodlverbinsert", "1", usePath, macroBase);
66 _man("yodlstriproff", "1", usePath, macroBase);
67
68
69 _man("yodlconverters", "7", usePath, macroBase);
70 _man("yodlbuiltins", "7", usePath, macroBase);
71 _man("yodlmanpage", "7", usePath, macroBase);
72 _man("yodlletter", "7", usePath, macroBase);
73 _man("yodlmacros", "7", usePath, macroBase);
74 _man("yodltables", "7", usePath, macroBase);
75
76 exit(0);
77 }
78
79
80