Updated Branches: refs/heads/docs 96327cd70 -> 5f03193be
Added experimental handling to man files Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5f03193b Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5f03193b Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5f03193b Branch: refs/heads/docs Commit: 5f03193be6e0075de09576eb9fe2ecbc81e5978a Parents: 96327cd Author: Noah Slater <[email protected]> Authored: Sat Nov 24 19:58:48 2012 +0000 Committer: Noah Slater <[email protected]> Committed: Sat Nov 24 19:58:48 2012 +0000 ---------------------------------------------------------------------- bin/Makefile.am | 24 +++++++++++++++++++----- src/couchdb/priv/Makefile.am | 23 +++++++++++++++++------ 2 files changed, 36 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/5f03193b/bin/Makefile.am ---------------------------------------------------------------------- diff --git a/bin/Makefile.am b/bin/Makefile.am index 1f3dda8..c8667e9 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -16,9 +16,13 @@ else bin_SCRIPTS = couchdb couch-config endif +man1dir = $(mandir)/man1 + noinst_SCRIPTS = couchjs_dev couch-config_dev -dist_man1_MANS = couchdb.1 +man_file = couchdb.1 + +BUILT_SOURCES = $(man_file) CLEANFILES = $(bin_SCRIPTS) $(dist_man1_MANS) $(noinst_SCRIPTS) @@ -107,12 +111,22 @@ couch-config_dev: couch-config.tpl $@ < $< chmod +x $@ -HELP2MAN_OPTION=--no-info --help-option="-h" --version-option="-V" +HELP2MAN_OPTION= # Depend on source files so distributed man pages are not rebuilt for end user. -couchdb.1: couchdb.tpl.in +$(man_file): couchdb.tpl.in $(MAKE) -f Makefile couchdb; \ $(top_srcdir)/build-aux/missing --run \ - help2man $(HELP2MAN_OPTION) \ - --name="$(package_name) database server" ./couchdb --output $@ + help2man \ + --no-info + --help-option="-h" + --version-option="-V" + --name="$(package_name) database server" + ./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); \ + fi http://git-wip-us.apache.org/repos/asf/couchdb/blob/5f03193b/src/couchdb/priv/Makefile.am ---------------------------------------------------------------------- diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am index 4a163fd..56490cd 100644 --- a/src/couchdb/priv/Makefile.am +++ b/src/couchdb/priv/Makefile.am @@ -13,8 +13,11 @@ couchlibdir = $(localerlanglibdir)/couch-$(version) couchprivdir = $(couchlibdir)/priv couchprivlibdir = $(couchlibdir)/priv/lib +man1dir = $(mandir)/man1 -dist_man1_MANS = couchjs.1 +man_file = couchjs.1 + +BUILT_SOURCES = $(man_file) EXTRA_DIST = \ spawnkillable/couchspawnkillable.sh \ @@ -64,15 +67,23 @@ couchjs_LDADD = $(CURL_LIBS) $(JS_LIBS) couchpriv_DATA = stat_descriptions.cfg couchpriv_PROGRAMS = couchspawnkillable -HELP2MAN_OPTION=--no-info --help-option="-h" --version-option="-V" - # Depend on source files so distributed man pages are not rebuilt for end user. -couchjs.1: $(COUCHJS_SRCS) +$(man_file): $(COUCHJS_SRCS) $(MAKE) -f Makefile couchjs; \ $(top_srcdir)/build-aux/missing --run \ - help2man $(HELP2MAN_OPTION) \ - --name="$(package_name) JavaScript interpreter" ./couchjs --output $@ + help2man \ + --no-info + --help-option="-h" + --version-option="-V" + --name="$(package_name) JavaScript interpreter" + ./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); \ + fi %.cfg: %.cfg.in cp $< $@
