Add ONLY_MAN_DOCS variable to only install the man page, not the html
and ps documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70589 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/Makefile b/docs/Makefile
index 47db7eb..9b706c7 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -33,7 +33,10 @@
.PHONY: install-html install-doxygen doxygen generated
-install_targets := install-html
+install_targets :=
+ifndef ONLY_MAN_DOCS
+install_targets += install-html
+endif
ifeq ($(ENABLE_DOXYGEN),1)
install_targets += install-doxygen
endif
diff --git a/docs/tools/Makefile b/docs/tools/Makefile
index f00af25..da99a1d 100644
--- a/docs/tools/Makefile
+++ b/docs/tools/Makefile
@@ -52,6 +52,12 @@
MAN := $(patsubst $(SRC_DOC_DIR)%.pod, $(DST_MAN_DIR)%.1, $(POD))
PS := $(patsubst $(SRC_DOC_DIR)%.pod, $(DST_PS_DIR)%.ps, $(POD))
+ifdef ONLY_MAN_DOCS
+INSTALL_TARGETS := install-man
+else
+INSTALL_TARGETS := install-html install-man install-ps
+endif
+
.SUFFIXES:
.SUFFIXES: .html .pod .1 .ps
@@ -79,18 +85,24 @@
MAN_DIR := $(PROJ_mandir)/man1
PS_DIR := $(PROJ_docsdir)/ps
-install-local:: $(HTML) $(MAN) $(PS)
+install-html::
$(Echo) Installing HTML Clang Tools Documentation
$(Verb) $(MKDIR) $(HTML_DIR)
$(Verb) $(DataInstall) $(HTML) $(HTML_DIR)
$(Verb) $(DataInstall) $(PROJ_SRC_DIR)/manpage.css $(HTML_DIR)
+
+install-man::
$(Echo) Installing MAN Clang Tools Documentation
$(Verb) $(MKDIR) $(MAN_DIR)
$(Verb) $(DataInstall) $(MAN) $(MAN_DIR)
+
+install-ps::
$(Echo) Installing PS Clang Tools Documentation
$(Verb) $(MKDIR) $(PS_DIR)
$(Verb) $(DataInstall) $(PS) $(PS_DIR)
+install-local:: $(INSTALL_TARGETS)
+
uninstall-local::
$(Echo) Uninstalling Clang Tools Documentation
$(Verb) $(RM) -rf $(HTML_DIR) $(MAN_DIR) $(PS_DIR)