couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [6/50] git commit: Finally got custom install hooks working for info files
Date Sun, 18 Nov 2012 16:56:23 GMT
Finally got custom install hooks working for info files


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e9987dc2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e9987dc2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e9987dc2

Branch: refs/heads/docs
Commit: e9987dc279680c723e43841ce53b82e6e97d1d8a
Parents: 8e6d44a
Author: Noah Slater <nslater@apache.org>
Authored: Sun Oct 14 17:59:06 2012 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Sun Nov 18 00:15:33 2012 +0000

----------------------------------------------------------------------
 configure.ac                |   12 ++++++++++
 share/doc/build/Makefile.am |   46 ++++++++++++++++++++++++-------------
 2 files changed, 42 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e9987dc2/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 2ad05d8..efebc80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -585,6 +585,18 @@ Is GNU Texinfo installed?])
     fi
 fi
 
+AC_CHECK_PROG([HAS_INSTALLINFO], [install-info], [yes])
+
+if test x${HAS_INSTALLINFO} = x; then
+    if test x${strictness_enabled} = xyes; then
+        AC_MSG_ERROR([Could not find the `install-info' executable.
+    
+Is GNU Texinfo installed?])
+    else
+        AC_MSG_WARN([You will be unable to install info documentation.])
+    fi
+fi
+
 AC_ARG_VAR([ERL], [path to the `erl' executable])
 AC_ARG_VAR([ERLC], [path to the `erlc' executable])
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/e9987dc2/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index a20210e..6860e76 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -41,9 +41,13 @@ SPHINXOPTS = \
 
 # -----------------------------------------------------------------------------
 
-texinfo_files = texinfo/CouchDB.texi 
+info_name = CouchDB
 
-pdf_files = latex/CouchDB.pdf.gz
+info_file = texinfo/$(info_name)
+
+texinfo_file = texinfo/CouchDB.texi
+
+pdf_file = latex/CouchDB.pdf.gz
 
 html_files = \
     html/_images/futon-createdb.png \
@@ -161,9 +165,11 @@ src_files = \
 	../src/replication.rst \
 	../src/ssl.rst
 
+
 dist_localdoc_DATA = \
-    $(texinfo_files) \
-    $(pdf_files)
+    $(info_file) \
+    $(texinfo_file) \
+    $(pdf_file)
 
 nobase_dist_localdoc_DATA = $(html_files)
 
@@ -176,30 +182,31 @@ EXTRA_DIST = \
 	$(src_files) \
 	html/.buildinfo
 
-$(pdf_files): pdf
+$(pdf_file): pdf
 
 $(html_files): html
 
-$(texinfo_files): texinfo.stamp
+$(info_file): info.stamp
 	@if test -f $@; then :; else \
-	    rm -f texinfo.stamp; \
-	    $(MAKE) $(AM_MAKEFLAGS) texinfo.stamp; \
+	    rm -f info.stamp; \
+	    $(MAKE) $(AM_MAKEFLAGS) info.stamp; \
 	fi
 
-texinfo.stamp: $(image_files) $(src_files)
-	@rm -f texinfo.tmp
-	@touch texinfo.tmp
+info.stamp: $(image_files) $(src_files)
+	@rm -f info.tmp
+	@touch info.tmp
 	if test -z "`which makeinfo`"; then \
 	    $(top_srcdir)/build-aux/missing makeinfo; \
 	fi
 	if test -n "`which sphinx-build`"; then \
 	    sphinx-build -b texinfo $(SPHINXOPTS) $(builddir)/texinfo; \
+	    $(MAKE) -C texinfo info; \
 	else \
 	    $(top_srcdir)/build-aux/missing sphinx-build; \
 	fi
-	@mv -f texinfo.tmp $@
+	@mv -f info.tmp $@
 
-$(pdf_files): pdf.stamp
+$(pdf_file): pdf.stamp
 	@if test -f $@; then :; else \
 	    rm -f pdf.stamp; \
 	    $(MAKE) $(AM_MAKEFLAGS) pdf.stamp; \
@@ -243,13 +250,20 @@ html-local:
 	$(MAKE) $(AM_MAKEFLAGS) html.stamp
 
 install-data-local:
-	$(MAKE) -C texinfo install-info;
+	$(INSTALL) -d $(DESTDIR)$(infodir)
+	$(INSTALL_DATA) $(info_file) $(DESTDIR)$(infodir)/$(info_name);
+	if test -n "`which install-info`"; then\
+	    install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$(info_name); \
+	fi
 
 uninstall-local:
-	$(MAKE) -C texinfo uninstall-info;
+	rm -f $(infodir)/$(info_name)
+	if test -n "`which install-info`"; then\
+	    install-info --delete --info-dir=$(DESTDIR)$(infodir) $(info_name) \;
+	fi
 
 DISTCLEANFILES = \
-    texinfo.stamp \
+    info.stamp \
     pdf.stamp \
     html.stamp
 


Mime
View raw message