aboutsummaryrefslogtreecommitdiff
path: root/manual/libc-texinfo.sh
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
committerZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
commit5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch)
tree4470480d904b65cf14ca524f96f79eca818c3eaf /manual/libc-texinfo.sh
parent199fc19d3aaaf57944ef036e15904febe877fc93 (diff)
downloadglibc-zack/build-layout-experiment.tar
glibc-zack/build-layout-experiment.tar.gz
glibc-zack/build-layout-experiment.tar.bz2
glibc-zack/build-layout-experiment.zip
Prepare for radical source tree reorganization.zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage directory, REORG.TODO, except for files that will certainly still exist in their current form at top level when we're done (COPYING, COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which are moved to the new directory OldChangeLogs, instead), and the generated file INSTALL (which is just deleted; in the new order, there will be no generated files checked into version control).
Diffstat (limited to 'manual/libc-texinfo.sh')
-rw-r--r--manual/libc-texinfo.sh102
1 files changed, 0 insertions, 102 deletions
diff --git a/manual/libc-texinfo.sh b/manual/libc-texinfo.sh
deleted file mode 100644
index 4d0a52213b..0000000000
--- a/manual/libc-texinfo.sh
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/bin/sh
-
-OUTDIR=$1
-shift
-
-# Create libc.texinfo from the chapter files.
-
-trap "rm -f ${OUTDIR}*.$$; exit 1" 1 2 15
-
-exec 3>${OUTDIR}incl.$$ 4>${OUTDIR}smenu.$$ 5>${OUTDIR}lmenu.$$
-
-build_menu () {
- while IFS=: read file node; do
- echo "@include $file" >&3
- echo "* $node:: `sed -n 's/^@c %MENU% //p' $file`" >&4
- $AWK 'BEGIN { do_menu = 0 }
- /^@node / { sub(/^@node /, ""); sub(/,.*$/, ""); node = $0 }
- /^@menu/ { printf "\n%s\n\n", node; do_menu = 1; next }
- /^@end menu/ { do_menu = 0 }
- do_menu { print }' $file >&5
- done
-}
-
-collect_nodes () {
- egrep '^(@c )?@node.*Top' "$@" /dev/null | cut -d, -f-2 |
- sed 's/@c //; s/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g' |
- $AWK '{ file[$2] = $1; nnode[$2] = $3 }
- END { for (x in file)
- if (file[x] != "")
- print file[x] ":" x, file[nnode[x]] ":" nnode[x] }' |
- $AWK -f tsort.awk | sed 's/_/ /g'
-}
-
-# Emit "@set ADD-ON" for each add-on contributing a manual chapter.
-for addon in $2; do
- addon=`basename $addon .texi`
- echo >&3 "@set $addon"
-done
-
-collect_nodes $1 | build_menu
-
-if [ -n "$2" ]; then
-
- { echo; echo 'Add-ons'; echo; } >&4
-
- egrep '^(@c )?@node.*Top' `echo $2 /dev/null | tr ' ' '\n' | sort` |
- cut -d, -f1 | sed 's/@c //;s/@node //' | build_menu
-
-fi
-
-{ echo; echo 'Appendices'; echo; } >&4
-
-collect_nodes $3 | build_menu
-
-exec 3>&- 4>&- 5>&-
-
-mv -f ${OUTDIR}incl.$$ ${OUTDIR}chapters.texi
-
-{
- echo '@menu'
- $AWK -F: '
- /^\*/ {
- printf("%-32s", $1 "::");
- x = split($3, word, " ");
- hpos = 34;
- for (i = 1; i <= x; i++) {
- hpos += length(word[i]) + 1;
- if (hpos > 78) {
- printf("\n%34s", "");
- hpos = 35 + length(word[i]);
- }
- printf(" %s", word[i]);
- }
- print ".";
- }
-
- !/^\*/ { print; }
- ' ${OUTDIR}smenu.$$
- cat <<EOF
-* Free Manuals:: Free Software Needs Free Documentation.
-* Copying:: The GNU Lesser General Public License says
- how you can copy and share the GNU C Library.
-* Documentation License:: This manual is under the GNU Free
- Documentation License.
-
-Indices
-
-* Concept Index:: Index of concepts and names.
-* Type Index:: Index of types and type qualifiers.
-* Function Index:: Index of functions and function-like macros.
-* Variable Index:: Index of variables and variable-like macros.
-* File Index:: Index of programs and files.
-
- @detailmenu
- --- The Detailed Node Listing ---
-EOF
- cat ${OUTDIR}lmenu.$$
- echo '@end detailmenu'
- echo '@end menu'; } >${OUTDIR}top-menu.texi.$$
-mv -f ${OUTDIR}top-menu.texi.$$ ${OUTDIR}top-menu.texi
-
-rm -f ${OUTDIR}*.$$