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-04 13:13:57 +0200
committerAndreas Jaeger <aj@suse.de>2012-05-04 13:13:57 +0200
commite3945c47bdac1149a1fec5d46bd567a248cd17b9 (patch)
treee67a0c0f333cd35de310a66749f9793aaf5b1b13 /manual/libc-texinfo.sh
parent31dc8730af585d8e13021484752fb20decae0661 (diff)
downloadglibc-e3945c47bdac1149a1fec5d46bd567a248cd17b9.tar.gz
glibc-e3945c47bdac1149a1fec5d46bd567a248cd17b9.tar.xz
glibc-e3945c47bdac1149a1fec5d46bd567a248cd17b9.zip
Do not build manual in the source directory
[BZ #13750]

Build the manual in the build directory and
not anymore in the source directory.
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}*.$$