6 # Create libc.texinfo from the chapter files.
8 trap "rm -f ${OUTDIR}*.$$; exit 1" 1 2 15
10 exec 3>${OUTDIR}incl.$$ 4>${OUTDIR}smenu.$$ 5>${OUTDIR}lmenu.$$
13 while IFS=: read file node; do
14 echo "@include $file" >&3
15 echo "* $node:: `sed -n 's/^@c %MENU% //p' $file`" >&4
16 $AWK 'BEGIN { do_menu = 0 }
17 /^@node / { sub(/^@node /, ""); sub(/,.*$/, ""); node = $0 }
18 /^@menu/ { printf "\n%s\n\n", node; do_menu = 1; next }
19 /^@end menu/ { do_menu = 0 }
20 do_menu { print }' $file >&5
25 grep -E '^(@c )?@node.*Top' "$@" /dev/null | cut -d, -f-2 |
26 sed 's/@c //; s/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g' |
27 $AWK '{ file[$2] = $1; nnode[$2] = $3 }
30 print file[x] ":" x, file[nnode[x]] ":" nnode[x] }' |
31 $AWK -f tsort.awk | sed 's/_/ /g'
34 collect_nodes $1 | build_menu
36 { echo; echo 'Appendices'; echo; } >&4
38 collect_nodes $2 | build_menu
42 mv -f ${OUTDIR}incl.$$ ${OUTDIR}chapters.texi
48 printf("%-32s", $1 "::");
49 x = split($3, word, " ");
51 for (i = 1; i <= x; i++) {
52 hpos += length(word[i]) + 1;
55 hpos = 35 + length(word[i]);
57 printf(" %s", word[i]);
65 * Free Manuals:: Free Software Needs Free Documentation.
66 * Copying:: The GNU Lesser General Public License says
67 how you can copy and share the GNU C Library.
68 * Documentation License:: This manual is under the GNU Free
69 Documentation License.
73 * Concept Index:: Index of concepts and names.
74 * Type Index:: Index of types and type qualifiers.
75 * Function Index:: Index of functions and function-like macros.
76 * Variable Index:: Index of variables and variable-like macros.
77 * File Index:: Index of programs and files.
80 --- The Detailed Node Listing ---
83 echo '@end detailmenu'
84 echo '@end menu'; } >${OUTDIR}top-menu.texi.$$
85 mv -f ${OUTDIR}top-menu.texi.$$ ${OUTDIR}top-menu.texi