about summary refs log tree commit diff
path: root/manual/libc-texinfo.sh
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2012-05-14 21:45:48 +0200
committerAndreas Jaeger <aj@suse.de>2012-05-14 22:01:08 +0200
commit6a4888ffd67163b589e602d62ca6330a608d8b89 (patch)
tree0c0a35db72928c17eded23c800a8c91742618782 /manual/libc-texinfo.sh
parentb8caea2cb90092ba8ecd3274898f227bbe2d305d (diff)
downloadglibc-6a4888ffd67163b589e602d62ca6330a608d8b89.tar.gz
glibc-6a4888ffd67163b589e602d62ca6330a608d8b89.tar.xz
glibc-6a4888ffd67163b589e602d62ca6330a608d8b89.zip
Do not build manual in source dir
[BZ #13750]
Do not build manual anymore in the source dir. Also clean up the
Makefile and remove rules that have been used previously
when we had a stand-alone Makefile which was obsoleted recently.
Diffstat (limited to 'manual/libc-texinfo.sh')
-rw-r--r--manual/libc-texinfo.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/manual/libc-texinfo.sh b/manual/libc-texinfo.sh
index 79ac9773ee..60e224bb8d 100644
--- a/manual/libc-texinfo.sh
+++ b/manual/libc-texinfo.sh
@@ -1,10 +1,13 @@
 #! /bin/sh
 
+OUTDIR=$1
+shift
+
 # Create libc.texinfo from the chapter files.
 
-trap "rm -f *.$$; exit 1" 1 2 15
+trap "rm -f ${OUTDIR}*.$$; exit 1" 1 2 15
 
-exec 3>incl.$$ 4>smenu.$$ 5>lmenu.$$
+exec 3>${OUTDIR}incl.$$ 4>${OUTDIR}smenu.$$ 5>${OUTDIR}lmenu.$$
 
 build_menu () {
   while IFS=: read file node; do
@@ -51,7 +54,7 @@ collect_nodes $3 | build_menu
 
 exec 3>&- 4>&- 5>&-
 
-mv -f incl.$$ chapters.texi
+mv -f ${OUTDIR}incl.$$ ${OUTDIR}chapters.texi
 
 {
  echo '@menu'
@@ -72,7 +75,7 @@ mv -f incl.$$ chapters.texi
   }
 
   !/^\*/ { print; }
- ' smenu.$$
+ ' ${OUTDIR}smenu.$$
  cat <<EOF
 * Free Manuals::		 Free Software Needs Free Documentation.
 * Copying::                      The GNU Lesser General Public License says
@@ -90,8 +93,8 @@ Indices
 
  --- The Detailed Node Listing ---
 EOF
- cat lmenu.$$
- echo '@end menu'; } >top-menu.texi.$$
-mv -f top-menu.texi.$$ top-menu.texi
+ cat ${OUTDIR}lmenu.$$
+ echo '@end menu'; } >${OUTDIR}top-menu.texi.$$
+mv -f ${OUTDIR}top-menu.texi.$$ ${OUTDIR}top-menu.texi
 
-rm -f *.$$
+rm -f ${OUTDIR}*.$$