summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2013-04-25 22:13:44 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2013-04-25 22:13:44 +0100
commit53369d632ef5103eaca2ef024bb13c9a2237dff6 (patch)
treef1c1153904149f0dbb09170abc1104b3d6a801a8
parentffa73194da6eb6e9e32348fa1770724faaec213e (diff)
downloadgitano-53369d632ef5103eaca2ef024bb13c9a2237dff6.tar.gz
MAKE: Manpage installation
-rw-r--r--Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d5aaf4d..5e0249c 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,8 @@ LIB_BIN_INST_PATH := $(DESTDIR)$(LIB_BIN_PATH)
SHARE_PATH := $(INST_ROOT)/share/gitano
SHARE_INST_PATH := $(DESTDIR)$(SHARE_PATH)
SKEL_INST_PATH := $(SHARE_INST_PATH)/skel
+MAN_PATH := $(INST_ROOT)/share/man
+MAN_INST_PATH := $(DESTDIR)$(MAN_PATH)
LIB_BINS := gitano-auth gitano-post-receive-hook gitano-update-hook \
gitano-update-ssh gitano-pre-receive-hook
@@ -42,6 +44,7 @@ SKEL_FILES := gitano-admin/rules/selfchecks.lace \
gitano-admin/rules/adminchecks.lace \
gitano-admin/rules/createrepo.lace
+MAN1S := gitano-setup.1
MOD_DIRS := gitano
MOD_FILES := $(patsubst %,%.lua,$(subst .,/,$(MODS)))
@@ -66,6 +69,13 @@ chmod 755 $2
endef
+define GEN_INSTALL_MAN
+
+cp $1 $2
+chmod 644 $2
+
+endef
+
define GEN_INSTALL_MOD
install -m 644 $1 $2
@@ -84,7 +94,11 @@ distclean: clean
bin/%: bin/%.in $(GEN_BIN)
$(call GEN_LOCAL_BIN,$<,$@)
-install: install-bins install-lib-bins install-mods install-skel
+install: install-bins install-lib-bins install-mods install-skel install-man
+
+install-man:
+ mkdir -p $(MAN_INST_PATH)/man1
+ $(foreach MAN,$(MAN1S),$(call GEN_INSTALL_MAN,doc/$(MAN),$(MAN_INST_PATH)/man1/$(MAN)))
install-bins: $(BIN_SRCS) $(GEN_BIN)
mkdir -p $(BIN_INST_PATH)