gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] (no subject)


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] (no subject)
Date: Mon, 30 May 2016 12:00:32 +0000 (UTC)

branch: master
commit f26c870ae73acf4bd6232f8626a56896cd72933a
Author: Mohammad Akhlaghi <address@hidden>
Date:   Mon May 30 20:55:28 2016 +0900

    doc/authors.texi is now built in the source directories
    
    `doc/authors.texi' is a prerequisite of the Info output, so if it is
    necessary to build it, the Info output (which is built in the source
    directories by default) also needs to be rebuilt. If the user doesn't have
    write access in the source directories, and this file needs to be generated
    (configure has been rebuilt), then they will not be able to build the Info
    outputs either. Therefore there was no point in building it in the build
    directories.
---
 doc/Makefile.am |   14 ++++++++------
 doc/genauthors  |    7 ++++---
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 59f739b..ec24960 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -26,7 +26,7 @@
 ## Set the shell
 SHELL=/bin/bash
 
-BUILT_SOURCES = authors.texi
+BUILT_SOURCES = $(srcdir)/authors.texi
 
 
 ## fdl.texi (The GNU Free documentation license in Texinfo format) is
@@ -35,18 +35,20 @@ BUILT_SOURCES = authors.texi
 ## documentation. It is the job of AM_MAKEINFOFLAGS, to pass options to the
 ## documentation build programs. BOOTSTRPDOC is defined in `configure.ac'.
 bootstrpdoc = $(top_srcdir)/bootstrapped/doc
-AM_MAKEINFOFLAGS = -I $(bootstrpdoc)
+AM_MAKEINFOFLAGS = -I $(bootstrpdoc) -I $(srcdir)
 
 
 # This is just a temporary work-around since Automake does not pass the
 # AM_MAKEINFOFLAGS to texi2dvi (which builds DVI and PDF outputs). This was
-# reported in Automake's bug 23599.
-TEXI2DVI = texi2dvi -I $(bootstrpdoc)
+# reported in Automake's bug 23599. Note that a space is necessary between
+# the `-I' and directory for texi2dvi.
+TEXI2DVI = texi2dvi -I $(bootstrpdoc) -I $(srcdir)
 
 
 ## Commands to make the texinfo tools.
 info_TEXINFOS = gnuastro.texi
-gnuastro_TEXINFOS = $(bootstrpdoc)/fdl.texi formath.texi authors.texi
+gnuastro_TEXINFOS = $(bootstrpdoc)/fdl.texi formath.texi       \
+                    $(srcdir)/authors.texi
 
 
 ## Files not predefined by Automake, and not in dependencies that must
@@ -58,7 +60,7 @@ EXTRA_DIST = genauthors README
 ## version controlled source. For the non version controlled souce,
 ## deleting this file is like somehow deleting formath.texi, it will not be
 ## rebuilt and result in an error.
-authors.texi: $(top_srcdir)/configure
+$(srcdir)/authors.texi: $(top_srcdir)/configure
        $(top_srcdir)/doc/genauthors $(top_srcdir)
 
 
diff --git a/doc/genauthors b/doc/genauthors
index d900b8b..030b067 100755
--- a/doc/genauthors
+++ b/doc/genauthors
@@ -52,16 +52,17 @@ if [ -d $1/.git ]; then
     # recreated anyway.
     git --git-dir=$1/.git shortlog --numbered --summary --email --no-merges \
         | sed -e 's/</ /' -e 's/>/ /' -e 's/@/@@/' -e "s/รจ/@\`e/"           \
-        | awk '{printf "%s %s (%s, %s)@*\n", $2, $3, $4, $1}' > authors.texi
+        | awk '{printf "%s %s (%s, %s)@*\n", $2, $3, $4, $1}'               \
+        > $1/doc/authors.texi
 
     # Clean up:
     rm .mailmap
 
     # Check if the authors.texi file was actually written:
-    if [ ! -s authors.texi ]; then
+    if [ ! -s $1/doc/authors.texi ]; then
         echo "authors.texi is empty!"
         exit 1
     fi
 else
-    echo "No Git repository detected, leaving authors.texi unchanged."
+    echo "No Git repository detected, leaving $1/doc/authors.texi unchanged."
 fi



reply via email to

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