Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[enhance] manpages: added target install-man to install manpages by d…

…efault
  • Loading branch information...
commit 8c3019bb28afe9a58fa9395c843184156ea83249 1 parent babea9c
Mathieu Baudet authored
Showing with 15 additions and 3 deletions.
  1. +15 −3 Makefile
View
18 Makefile
@@ -33,7 +33,7 @@ export
##
.PHONY: all
-all: $(MYOCAMLBUILD)
+all: $(MYOCAMLBUILD) manpages
$(OCAMLBUILD) $(call target-tools,$(ALL_TOOLS)) opa-packages.stamp
@$(call copy-tools,$(ALL_TOOLS))
@@ -67,6 +67,10 @@ distrib: $(MYOCAMLBUILD)
$(OCAMLBUILD) $(call target-tools,$(DISTRIB_TOOLS)) opa-packages.stamp
@$(call copy-tools,$(DISTRIB_TOOLS))
+.PHONY: manpages
+manpages:
+ make -C manpages BLDDIR=../$(BUILD_DIR)
+
##
## INSTALLATION
##
@@ -99,7 +103,7 @@ OPA_PLUGINS := $(shell cd stdlib && ./all_plugins.sh)
#
# This doesn't rely on install rules generated by Makefile.bld ;
# instead it assumes that what you want to install has been properly
-# put in $(BUILD_DIR)/{bin,lib/opa,share/opa}.
+# put in $(BUILD_DIR)/{bin,lib/opa,share/opa,share/man}.
#
# This is the case of tools (because of Makefile.bld),
# and of opa runtime libs (because build rules copy them
@@ -160,7 +164,15 @@ install-doc:
fi
@printf "Installation to $(INSTALL_DIR)/share/doc/opa done.\n"
-install: install-bin install-lib install-share install-plugins install-packages install-doc
+install-man:
+ @printf "Installing into $(INSTALL_DIR)/share/man\r"
+ @if [ -d $(BUILD_DIR)/man/man1 ]; then \
+ mkdir -p $(INSTALL_DIR)/share/man/man1; \
+ $(INSTALL) -r $(BUILD_DIR)/man/man1/*.1 $(INSTALL_DIR)/share/man/man1; \
+ fi
+ @printf "Installation to $(INSTALL_DIR)/share/man done.\n"
+
+install: install-bin install-lib install-share install-plugins install-packages install-doc install-man
@printf "Installation into $(INSTALL_DIR) done.\n"
.PHONY: uninstall
Please sign in to comment.
Something went wrong with that request. Please try again.