]>
code.delx.au - gnu-emacs/blob - build-aux/make-info-dir
3 ### make-info-dir - create info/dir, for systems without install-info
5 ## Copyright (C) 2013 Free Software Foundation, Inc.
7 ## Author: Glenn Morris <rgm@gnu.org>
9 ## This file is part of GNU Emacs.
11 ## GNU Emacs is free software: you can redistribute it and/or modify
12 ## it under the terms of the GNU General Public License as published by
13 ## the Free Software Foundation, either version 3 of the License, or
14 ## (at your option) any later version.
16 ## GNU Emacs is distributed in the hope that it will be useful,
17 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ## GNU General Public License for more details.
21 ## You should have received a copy of the GNU General Public License
22 ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
26 ## Generate info/dir, for systems without install-info.
27 ## Expects to be called from top-level Emacs source directory.
29 ## It only handles the case where info/dir is missing from the
30 ## installation directory. It does not handle info/dir being present
31 ## but missing some entries.
35 if test $# -ne 1; then
36 echo "Specify destination file"
42 echo "Creating $outfile..."
44 if test -f "$outfile"; then
45 echo "$outfile already present"
49 ## Header contains non-printing characters, so this is more
50 ## reliable than using echo.
51 basefile
=build-aux
/dir_top
53 if test ! -f "$basefile"; then
54 echo "$basefile not found"
62 ## FIXME inefficient looping.
63 for topic
in "Texinfo documentation system" "Emacs" "GNU Emacs Lisp" \
64 "Emacs editing modes" "Emacs network features" "Emacs misc features" \
65 "Emacs lisp libraries"; do
67 cat - <<EOF >> $outfile
71 for file in info
/*.info
; do
73 ## FIXME do not ignore w32 if OS is w32.
75 *-xtra.info|
*efaq-w32.info
) continue ;;
78 dircat
=`sed -n -e 's/^INFO-DIR-SECTION //p' $file`
80 ## TODO warn about unknown topics.
81 test "$dircat" = "$topic" ||
continue
83 sed -n -e '/^START-INFO-DIR-ENTRY/,/^END-INFO-DIR-ENTRY/ s/^\([^SE]\)/\1/p' \
89 echo "Created $outfile"
93 ### make-info-dir ends here