diff options
| author | Glenn Morris | 2013-12-12 17:41:31 -0500 |
|---|---|---|
| committer | Glenn Morris | 2013-12-12 17:41:31 -0500 |
| commit | b55e11bf851ac73e1041a4a24cca3f81d93039e4 (patch) | |
| tree | b24425084a1636447ccd57cadedae75737c3dfc2 | |
| parent | 2cc82b9fbc6e67878e89d7006cc69ffb5227daa1 (diff) | |
| download | emacs-b55e11bf851ac73e1041a4a24cca3f81d93039e4.tar.gz emacs-b55e11bf851ac73e1041a4a24cca3f81d93039e4.zip | |
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).
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | Makefile.in | 21 | ||||
| -rwxr-xr-x | build-aux/make-info-dir | 22 | ||||
| -rw-r--r-- | doc/lispintro/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/lispintro/emacs-lisp-intro.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 2 |
7 files changed, 49 insertions, 11 deletions
| @@ -1,5 +1,12 @@ | |||
| 1 | 2013-12-12 Glenn Morris <rgm@gnu.org> | 1 | 2013-12-12 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * Makefile.in (install-info): Handle missing info/dir. | ||
| 4 | (info_dir_deps): New variable. | ||
| 5 | (${srcdir}/info/dir): Depend on .texi files rather than .info files. | ||
| 6 | (check-info): Update topics. | ||
| 7 | * build-aux/make-info-dir: Use .texi files rather than .info files. | ||
| 8 | Update topics. | ||
| 9 | |||
| 3 | * Makefile.in (install-info): Remove some useless subshells. | 10 | * Makefile.in (install-info): Remove some useless subshells. |
| 4 | 11 | ||
| 5 | Stop keeping info/dir in the repository. | 12 | Stop keeping info/dir in the repository. |
diff --git a/Makefile.in b/Makefile.in index 7effadd6479..c2871d6f735 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -643,6 +643,9 @@ install-etcdoc: src install-arch-indep | |||
| 643 | ## If info/dir is missing, but we have install-info, we should let | 643 | ## If info/dir is missing, but we have install-info, we should let |
| 644 | ## that handle it. If info/dir is present and we do not have install-info, | 644 | ## that handle it. If info/dir is present and we do not have install-info, |
| 645 | ## we should check for missing entries and add them by hand. | 645 | ## we should check for missing entries and add them by hand. |
| 646 | ## | ||
| 647 | ## FIXME: | ||
| 648 | ## If HAVE_MAKEINFO = no and there are no info files, do not install info/dir. | ||
| 646 | install-info: info | 649 | install-info: info |
| 647 | umask 022; ${MKDIR_P} "$(DESTDIR)${infodir}" | 650 | umask 022; ${MKDIR_P} "$(DESTDIR)${infodir}" |
| 648 | -unset CDPATH; \ | 651 | -unset CDPATH; \ |
| @@ -652,6 +655,7 @@ install-info: info | |||
| 652 | true; \ | 655 | true; \ |
| 653 | else \ | 656 | else \ |
| 654 | [ -f "$(DESTDIR)${infodir}/dir" ] || \ | 657 | [ -f "$(DESTDIR)${infodir}/dir" ] || \ |
| 658 | [ ! -f ${srcdir}/info/dir ] || \ | ||
| 655 | ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \ | 659 | ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \ |
| 656 | info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \ | 660 | info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \ |
| 657 | cd ${srcdir}/info ; \ | 661 | cd ${srcdir}/info ; \ |
| @@ -961,12 +965,21 @@ ps: $(PSS) | |||
| 961 | 965 | ||
| 962 | info-dir: ${srcdir}/info/dir | 966 | info-dir: ${srcdir}/info/dir |
| 963 | 967 | ||
| 968 | ## Not strictly necessary, but speeds things up a bit by stopping | ||
| 969 | ## the info-dir rule from running when not needed. | ||
| 970 | ## Hopefully doc/misc/*.texi is not too long for some systems? | ||
| 971 | info_dir_deps = ${srcdir}/build-aux/dir_top \ | ||
| 972 | ${srcdir}/doc/emacs/emacs.texi \ | ||
| 973 | ${srcdir}/doc/lispintro/emacs-lisp-intro.texi \ | ||
| 974 | ${srcdir}/doc/lispref/elisp.texi ${srcdir}/doc/misc/*.texi | ||
| 975 | |||
| 964 | ## It would be much simpler if info/dir was only created in the | 976 | ## It would be much simpler if info/dir was only created in the |
| 965 | ## installation location by the install-info rule, but we also | 977 | ## installation location by the install-info rule, but we also |
| 966 | ## need one in the source directory for people running uninstalled. | 978 | ## need one in the source directory for people running uninstalled. |
| 967 | ## FIXME Change make-info-dir to use texi files rather than info-files, | 979 | ## FIXME it would be faster to use the install-info program if we have it, |
| 968 | ## depend on ${srcdir}/doc/*/*.texi here rather than info-real. | 980 | ## but then we would need to depend on info-real, which would |
| 969 | ${srcdir}/info/dir: info-real ${srcdir}/build-aux/dir_top | 981 | ## slow down parallelization. |
| 982 | ${srcdir}/info/dir: ${info_dir_deps} | ||
| 970 | tempfile=info-dir.$$$$; \ | 983 | tempfile=info-dir.$$$$; \ |
| 971 | rm -f $${tempfile}; \ | 984 | rm -f $${tempfile}; \ |
| 972 | thisdir=`pwd`; \ | 985 | thisdir=`pwd`; \ |
| @@ -1051,7 +1064,7 @@ check-info: info | |||
| 1051 | esac ; \ | 1064 | esac ; \ |
| 1052 | cat=`sed -n 's/^INFO-DIR-SECTION //p' $${file}`; \ | 1065 | cat=`sed -n 's/^INFO-DIR-SECTION //p' $${file}`; \ |
| 1053 | case $${cat} in \ | 1066 | case $${cat} in \ |
| 1054 | "Texinfo documentation system" | "Emacs"| "GNU Emacs Lisp" | \ | 1067 | "Texinfo documentation system" | "Emacs"| "Emacs lisp" | \ |
| 1055 | "Emacs editing modes" | "Emacs network features" | \ | 1068 | "Emacs editing modes" | "Emacs network features" | \ |
| 1056 | "Emacs misc features" | "Emacs lisp libraries" ) : ;; \ | 1069 | "Emacs misc features" | "Emacs lisp libraries" ) : ;; \ |
| 1057 | *) bad="$${bad} $${file}" ;; \ | 1070 | *) bad="$${bad} $${file}" ;; \ |
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 | |||
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | ## FIXME inefficient looping. | 62 | ## FIXME inefficient looping. |
| 63 | for topic in "Texinfo documentation system" "Emacs" "GNU Emacs Lisp" \ | 63 | ## What we should do is loop once over files, collecting topic and |
| 64 | ## direntry information for each. Then loop over topics and write | ||
| 65 | ## out the results. But that seems to require associative arrays, | ||
| 66 | ## and I do not know how to do that with portable sh. | ||
| 67 | ## Could use Emacs instead of sh, but till now info generation does | ||
| 68 | ## not require Emacs to have been built. | ||
| 69 | for topic in "Texinfo documentation system" "Emacs" "Emacs lisp" \ | ||
| 64 | "Emacs editing modes" "Emacs network features" "Emacs misc features" \ | 70 | "Emacs editing modes" "Emacs network features" "Emacs misc features" \ |
| 65 | "Emacs lisp libraries"; do | 71 | "Emacs lisp libraries"; do |
| 66 | 72 | ||
| @@ -68,19 +74,25 @@ for topic in "Texinfo documentation system" "Emacs" "GNU Emacs Lisp" \ | |||
| 68 | 74 | ||
| 69 | $topic | 75 | $topic |
| 70 | EOF | 76 | EOF |
| 71 | for file in info/*.info; do | 77 | ## Bit faster than doc/*/*.texi. |
| 78 | for file in doc/emacs/emacs.texi doc/lispintro/emacs-lisp-intro.texi \ | ||
| 79 | doc/lispref/elisp.texi doc/misc/*.texi; do | ||
| 72 | 80 | ||
| 73 | ## FIXME do not ignore w32 if OS is w32. | 81 | ## FIXME do not ignore w32 if OS is w32. |
| 74 | case $file in | 82 | case $file in |
| 75 | *-xtra.info|*efaq-w32.info) continue ;; | 83 | *-xtra.texi|*efaq-w32.texi|*doclicense.texi) continue ;; |
| 76 | esac | 84 | esac |
| 77 | 85 | ||
| 78 | dircat=`sed -n -e 's/^INFO-DIR-SECTION //p' $file` | 86 | dircat=`sed -n -e 's/@value{emacsname}/Emacs/' -e 's/^@dircategory //p' $file` |
| 79 | 87 | ||
| 80 | ## TODO warn about unknown topics. | 88 | ## TODO warn about unknown topics. |
| 89 | ## (check-info in top-level Makefile does that.) | ||
| 81 | test "$dircat" = "$topic" || continue | 90 | test "$dircat" = "$topic" || continue |
| 82 | 91 | ||
| 83 | sed -n -e '/^START-INFO-DIR-ENTRY/,/^END-INFO-DIR-ENTRY/ s/^\([^SE]\)/\1/p' \ | 92 | |
| 93 | sed -n -e 's/@value{emacsname}/Emacs/' \ | ||
| 94 | -e 's/@acronym{\([A-Z]*\)}/\1/' \ | ||
| 95 | -e '/^@direntry/,/^@end direntry/ s/^\([^@]\)/\1/p' \ | ||
| 84 | $file >> $outfile | 96 | $file >> $outfile |
| 85 | 97 | ||
| 86 | done | 98 | done |
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index b8c2c93bbb6..57dc740fbfa 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2013-12-12 Glenn Morris <rgm@gnu.org> | 1 | 2013-12-12 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * emacs-lisp-intro.texi: Tweak dircategory. | ||
| 4 | |||
| 3 | * emacs-lisp-intro.texi: Sync direntry with info/dir version. | 5 | * emacs-lisp-intro.texi: Sync direntry with info/dir version. |
| 4 | 6 | ||
| 5 | 2013-12-02 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2013-12-02 Paul Eggert <eggert@cs.ucla.edu> |
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 0111c58ad82..396780408a5 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -96,7 +96,7 @@ | |||
| 96 | 96 | ||
| 97 | @c ---------------------------------------------------- | 97 | @c ---------------------------------------------------- |
| 98 | 98 | ||
| 99 | @dircategory GNU Emacs Lisp | 99 | @dircategory Emacs lisp |
| 100 | @direntry | 100 | @direntry |
| 101 | * Emacs Lisp Intro: (eintr). A simple introduction to Emacs Lisp programming. | 101 | * Emacs Lisp Intro: (eintr). A simple introduction to Emacs Lisp programming. |
| 102 | @end direntry | 102 | @end direntry |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index f2b6026fe26..9bdc35a112c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-12-12 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * elisp.texi: Tweak dircategory. | ||
| 4 | |||
| 1 | 2013-12-12 Eli Zaretskii <eliz@gnu.org> | 5 | 2013-12-12 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * nonascii.texi (Encoding and I/O): Document file-name encoding | 7 | * nonascii.texi (Encoding and I/O): Document file-name encoding |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 0e09b1eed2d..d6f7df5fb01 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -117,7 +117,7 @@ developing GNU and promoting software freedom.'' | |||
| 117 | 117 | ||
| 118 | @documentencoding UTF-8 | 118 | @documentencoding UTF-8 |
| 119 | 119 | ||
| 120 | @dircategory GNU Emacs Lisp | 120 | @dircategory Emacs lisp |
| 121 | @direntry | 121 | @direntry |
| 122 | * Elisp: (elisp). The Emacs Lisp Reference Manual. | 122 | * Elisp: (elisp). The Emacs Lisp Reference Manual. |
| 123 | @end direntry | 123 | @end direntry |