emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115496: Generate info/dir from .texi files rather t


From: Glenn Morris
Subject: [Emacs-diffs] trunk r115496: Generate info/dir from .texi files rather than .info files
Date: Thu, 12 Dec 2013 22:41:34 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115496
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2013-12-12 17:41:31 -0500
message:
  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).
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  Makefile.in                    makefile.in-20091113204419-o5vbwnq5f7feedwu-446
  build-aux/make-info-dir        makeinfodir-20131212075529-1jlhgh0v9uyouuip-1
  doc/lispintro/ChangeLog        changelog-20091113204419-o5vbwnq5f7feedwu-6128
  doc/lispintro/emacs-lisp-intro.texi 
emacslispintro.texi-20091113204419-o5vbwnq5f7feedwu-6143
  doc/lispref/ChangeLog          changelog-20091113204419-o5vbwnq5f7feedwu-6155
  doc/lispref/elisp.texi         elisp.texi-20091113204419-o5vbwnq5f7feedwu-6176
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-12-12 09:39:13 +0000
+++ b/ChangeLog 2013-12-12 22:41:31 +0000
@@ -1,5 +1,12 @@
 2013-12-12  Glenn Morris  <address@hidden>
 
+       * 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.
+
        * Makefile.in (install-info): Remove some useless subshells.
 
        Stop keeping info/dir in the repository.

=== modified file 'Makefile.in'
--- a/Makefile.in       2013-12-12 09:08:26 +0000
+++ b/Makefile.in       2013-12-12 22:41:31 +0000
@@ -643,6 +643,9 @@
 ## If info/dir is missing, but we have install-info, we should let
 ## that handle it.  If info/dir is present and we do not have install-info,
 ## we should check for missing entries and add them by hand.
+##
+## FIXME:
+## If HAVE_MAKEINFO = no and there are no info files, do not install info/dir.
 install-info: info
        umask 022; ${MKDIR_P} "$(DESTDIR)${infodir}"
        -unset CDPATH; \
@@ -652,6 +655,7 @@
          true; \
        else \
           [ -f "$(DESTDIR)${infodir}/dir" ] || \
+             [ ! -f ${srcdir}/info/dir ] || \
              ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \
           info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
           cd ${srcdir}/info ; \
@@ -961,12 +965,21 @@
 
 info-dir: ${srcdir}/info/dir
 
+## Not strictly necessary, but speeds things up a bit by stopping
+## the info-dir rule from running when not needed.
+## Hopefully doc/misc/*.texi is not too long for some systems?
+info_dir_deps = ${srcdir}/build-aux/dir_top \
+       ${srcdir}/doc/emacs/emacs.texi \
+       ${srcdir}/doc/lispintro/emacs-lisp-intro.texi \
+       ${srcdir}/doc/lispref/elisp.texi ${srcdir}/doc/misc/*.texi
+
 ## It would be much simpler if info/dir was only created in the
 ## installation location by the install-info rule, but we also
 ## need one in the source directory for people running uninstalled.
-## FIXME Change make-info-dir to use texi files rather than info-files,
-## depend on ${srcdir}/doc/*/*.texi here rather than info-real.
-${srcdir}/info/dir: info-real ${srcdir}/build-aux/dir_top
+## FIXME it would be faster to use the install-info program if we have it,
+## but then we would need to depend on info-real, which would
+## slow down parallelization.
+${srcdir}/info/dir: ${info_dir_deps}
        tempfile=info-dir.$$$$; \
        rm -f $${tempfile}; \
        thisdir=`pwd`; \
@@ -1051,7 +1064,7 @@
          esac ; \
          cat=`sed -n 's/^INFO-DIR-SECTION //p' $${file}`; \
          case $${cat} in \
-          "Texinfo documentation system" | "Emacs"| "GNU Emacs Lisp" | \
+          "Texinfo documentation system" | "Emacs"| "Emacs lisp" | \
            "Emacs editing modes" | "Emacs network features" | \
           "Emacs misc features" | "Emacs lisp libraries" ) : ;; \
           *)  bad="$${bad} $${file}" ;; \

=== modified file 'build-aux/make-info-dir'
--- a/build-aux/make-info-dir   2013-12-12 08:54:21 +0000
+++ b/build-aux/make-info-dir   2013-12-12 22:41:31 +0000
@@ -60,7 +60,13 @@
 
 
 ## 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 @@
 
 $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/address@hidden 
//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 '/address@hidden/,/address@hidden direntry/ 
s/^\(address@hidden)/\1/p' \
             $file >> $outfile
 
     done

=== modified file 'doc/lispintro/ChangeLog'
--- a/doc/lispintro/ChangeLog   2013-12-12 03:37:38 +0000
+++ b/doc/lispintro/ChangeLog   2013-12-12 22:41:31 +0000
@@ -1,5 +1,7 @@
 2013-12-12  Glenn Morris  <address@hidden>
 
+       * emacs-lisp-intro.texi: Tweak dircategory.
+
        * emacs-lisp-intro.texi: Sync direntry with info/dir version.
 
 2013-12-02  Paul Eggert  <address@hidden>

=== modified file 'doc/lispintro/emacs-lisp-intro.texi'
--- a/doc/lispintro/emacs-lisp-intro.texi       2013-12-12 03:37:38 +0000
+++ b/doc/lispintro/emacs-lisp-intro.texi       2013-12-12 22:41:31 +0000
@@ -96,7 +96,7 @@
 
 @c ----------------------------------------------------
 
address@hidden GNU Emacs Lisp
address@hidden Emacs lisp
 @direntry
 * Emacs Lisp Intro: (eintr).    A simple introduction to Emacs Lisp 
programming.
 @end direntry

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2013-12-12 18:19:10 +0000
+++ b/doc/lispref/ChangeLog     2013-12-12 22:41:31 +0000
@@ -1,3 +1,7 @@
+2013-12-12  Glenn Morris  <address@hidden>
+
+       * elisp.texi: Tweak dircategory.
+
 2013-12-12  Eli Zaretskii  <address@hidden>
 
        * nonascii.texi (Encoding and I/O): Document file-name encoding

=== modified file 'doc/lispref/elisp.texi'
--- a/doc/lispref/elisp.texi    2013-12-12 03:37:38 +0000
+++ b/doc/lispref/elisp.texi    2013-12-12 22:41:31 +0000
@@ -117,7 +117,7 @@
 
 @documentencoding UTF-8
 
address@hidden GNU Emacs Lisp
address@hidden Emacs lisp
 @direntry
 * Elisp: (elisp).               The Emacs Lisp Reference Manual.
 @end direntry


reply via email to

[Prev in Thread] Current Thread [Next in Thread]