couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nsla...@apache.org
Subject [2/2] git commit: Experimental non-packaging of man files when help2man not available
Date Sun, 25 Nov 2012 15:51:48 GMT
Experimental non-packaging of man files when help2man not available


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

Branch: refs/heads/docs
Commit: 6124f033c8dde6812557be877ab7b09557c82986
Parents: f53a4a7
Author: Noah Slater <nslater@apache.org>
Authored: Sun Nov 25 15:51:21 2012 +0000
Committer: Noah Slater <nslater@apache.org>
Committed: Sun Nov 25 15:51:21 2012 +0000

----------------------------------------------------------------------
 bin/Makefile.am              |   20 ++++++++++++++------
 configure.ac                 |   19 +++++++++++++++++++
 share/doc/build/Makefile.am  |    7 +++++++
 src/couchdb/priv/Makefile.am |   20 ++++++++++++++------
 4 files changed, 54 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6124f033/bin/Makefile.am
----------------------------------------------------------------------
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 841e94c..25d683a 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -22,11 +22,17 @@ noinst_SCRIPTS = couchjs_dev couch-config_dev
 
 man_file = couchdb.1
 
-BUILT_SOURCES = $(man_file)
+if BUILD_MAN
+build_man_file = $(man_file)
+else
+build_man_file =
+endif
+
+BUILT_SOURCES = $(build_man_file)
 
-EXTRA_DIST = $(man_file)
+EXTRA_DIST = $(build_man_file)
 
-CLEANFILES = $(bin_SCRIPTS) $(man_file) $(noinst_SCRIPTS)
+CLEANFILES = $(bin_SCRIPTS) $(build_man_file) $(noinst_SCRIPTS)
 
 transform = @program_transform_name@
 couchdb_command_name = `echo couchdb | sed '$(transform)'`
@@ -128,9 +134,11 @@ $(man_file): couchdb.tpl.in
 	        ./couchdb --output $@
 
 install-data-local:
-	if test `cat $(man_file) | wc -l` -gt 1; then \
-	    $(INSTALL) -d $(DESTDIR)$(man1dir); \
-	    $(INSTALL_DATA) $(man_file) $(DESTDIR)$(man1dir)/$(man_file); \
+	if test -s $(man_file); then \
+	    if test `cat $(man_file) | wc -l` -gt 1; then \
+	        $(INSTALL) -d $(DESTDIR)$(man1dir); \
+	        $(INSTALL_DATA) $(man_file) $(DESTDIR)$(man1dir)/$(man_file); \
+	    fi \
 	fi
 
 uninstall-local:

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6124f033/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index e908933..b05c53d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -591,6 +591,20 @@ if test x${HAS_SPHINX_BUILD} = x; then
     fi
 fi
 
+if test x${HAS_HELP2MAN} = x; then
+    build_man=yes
+fi
+
+if test x${HAS_SPHINX_BUILD} = x; then
+    build_html=yes
+    if test x${HAS_MAKEINFO} = x; then
+        build_info=yes
+    fi    
+    if test x${HAS_PDFLATEX} = x; then
+        build_pdf=yes
+    fi
+fi
+
 if test x${strictness_enabled} = xyes; then
     AX_PYTHON_MODULE([pygments], [fatal])
 else
@@ -605,6 +619,11 @@ AM_CONDITIONAL([LAUNCHD], [test x${launchd_enabled} = xtrue])
 AM_CONDITIONAL([USE_NATIVE_MOCHIJSON], [test x${native_mochijson_enabled} = xyes])
 AM_CONDITIONAL([USE_CURL], [test x${use_curl} = xyes])
 
+AM_CONDITIONAL([BUILD_MAN], [test x${build_man} = xyes])
+AM_CONDITIONAL([BUILD_INFO], [test x${build_info} = xyes])
+AM_CONDITIONAL([BUILD_PDF], [test x${build_pdf} = xyes])
+AM_CONDITIONAL([BUILD_HTML], [test x${build_html} = xyes])
+
 AM_CONDITIONAL([TESTS], [test x${tests_enabled} = xyes])
 AM_CONDITIONAL([STRICTNESS], [test x${strictness_enabled} = xyes])
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6124f033/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index f8d8946..4d3fbc3 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -34,6 +34,13 @@
 
 # @@ sort out sphinx variables in this file
 
+# @@ distcheck is not actually running `check`
+
+# @@ should be possible to:
+# @@ run the code checks & docs checks separately
+# @@ distcheck should do A as above
+# @@ it should be possible for endusers to build couch without docs or checks running
+
 # -----------------------------------------------------------------------------
 
 SPHINXOPTS = \

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6124f033/src/couchdb/priv/Makefile.am
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am
index 589510e..02f67eb 100644
--- a/src/couchdb/priv/Makefile.am
+++ b/src/couchdb/priv/Makefile.am
@@ -17,7 +17,13 @@ man1dir = $(mandir)/man1
 
 man_file = couchjs.1
 
-BUILT_SOURCES = $(man_file)
+if BUILD_MAN
+build_man_file = $(man_file)
+else
+build_man_file =
+endif
+
+BUILT_SOURCES = $(build_man_file)
 
 EXTRA_DIST = \
 	spawnkillable/couchspawnkillable.sh \
@@ -26,9 +32,9 @@ EXTRA_DIST = \
 	couch_js/sm170.c \
 	couch_js/sm180.c \
 	couch_js/sm185.c \
-	$(man_file)
+	$(build_man_file)
 
-CLEANFILES = $(man_file) stat_descriptions.cfg
+CLEANFILES = $(build_man_file) stat_descriptions.cfg
 
 couchprivlib_LTLIBRARIES = couch_icu_driver.la
 if USE_EJSON_COMPARE_NIF
@@ -81,9 +87,11 @@ $(man_file): $(COUCHJS_SRCS)
 	        ./couchjs --output $@
 
 install-data-local:
-	if test `cat $(man_file) | wc -l` -gt 1; then \
-	    $(INSTALL) -d $(DESTDIR)$(man1dir); \
-	    $(INSTALL_DATA) $(man_file) $(DESTDIR)$(man1dir)/$(man_file); \
+	if test -s $(man_file); then \
+	    if test `cat $(man_file) | wc -l` -gt 1; then \
+	        $(INSTALL) -d $(DESTDIR)$(man1dir); \
+	        $(INSTALL_DATA) $(man_file) $(DESTDIR)$(man1dir)/$(man_file); \
+	    fi \
 	fi
 
 %.cfg: %.cfg.in


Mime
View raw message