summaryrefslogtreecommitdiff
path: root/build-aux/make-info-dir
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-12-12 17:41:31 -0500
committerGlenn Morris <rgm@gnu.org>2013-12-12 17:41:31 -0500
commitb55e11bf851ac73e1041a4a24cca3f81d93039e4 (patch)
treeb24425084a1636447ccd57cadedae75737c3dfc2 /build-aux/make-info-dir
parent2cc82b9fbc6e67878e89d7006cc69ffb5227daa1 (diff)
downloademacs-b55e11bf851ac73e1041a4a24cca3f81d93039e4.tar.gz
Generate info/dir from .texi files rather than .info files
* Makefile.in (install-info): Handle missing info/dir. (info_dir_deps): New variable. (${srcdir}/info/dir): Depend on .texi files rather than .info files. (check-info): Update topics. * build-aux/make-info-dir: Use .texi files rather than .info files. Update topics. * doc/lispintro/emacs-lisp-intro.texi: * doc/lispref/elisp.texi: Tweak dircategory (all the others use "Emacs" + lower-case).
Diffstat (limited to 'build-aux/make-info-dir')
-rwxr-xr-xbuild-aux/make-info-dir22
1 files changed, 17 insertions, 5 deletions
diff --git a/build-aux/make-info-dir b/build-aux/make-info-dir
index 61f3b1a243c..2bac1f89392 100755
--- a/build-aux/make-info-dir
+++ b/build-aux/make-info-dir
@@ -60,7 +60,13 @@ cp $basefile $outfile
## FIXME inefficient looping.
-for topic in "Texinfo documentation system" "Emacs" "GNU Emacs Lisp" \
+## What we should do is loop once over files, collecting topic and
+## direntry information for each. Then loop over topics and write
+## out the results. But that seems to require associative arrays,
+## and I do not know how to do that with portable sh.
+## Could use Emacs instead of sh, but till now info generation does
+## not require Emacs to have been built.
+for topic in "Texinfo documentation system" "Emacs" "Emacs lisp" \
"Emacs editing modes" "Emacs network features" "Emacs misc features" \
"Emacs lisp libraries"; do
@@ -68,19 +74,25 @@ for topic in "Texinfo documentation system" "Emacs" "GNU Emacs Lisp" \
$topic
EOF
- for file in info/*.info; do
+ ## Bit faster than doc/*/*.texi.
+ for file in doc/emacs/emacs.texi doc/lispintro/emacs-lisp-intro.texi \
+ doc/lispref/elisp.texi doc/misc/*.texi; do
## FIXME do not ignore w32 if OS is w32.
case $file in
- *-xtra.info|*efaq-w32.info) continue ;;
+ *-xtra.texi|*efaq-w32.texi|*doclicense.texi) continue ;;
esac
- dircat=`sed -n -e 's/^INFO-DIR-SECTION //p' $file`
+ dircat=`sed -n -e 's/@value{emacsname}/Emacs/' -e 's/^@dircategory //p' $file`
## TODO warn about unknown topics.
+ ## (check-info in top-level Makefile does that.)
test "$dircat" = "$topic" || continue
- sed -n -e '/^START-INFO-DIR-ENTRY/,/^END-INFO-DIR-ENTRY/ s/^\([^SE]\)/\1/p' \
+
+ sed -n -e 's/@value{emacsname}/Emacs/' \
+ -e 's/@acronym{\([A-Z]*\)}/\1/' \
+ -e '/^@direntry/,/^@end direntry/ s/^\([^@]\)/\1/p' \
$file >> $outfile
done