Prevented ExceptionDemo example being built on WINDOWS via if( NOT WIN32 )
[oota-llvm.git] / docs / Makefile
index ea5620f1f9a45db1fa600e9f1f88acc2902f36a0..5bfa6c3cfb3f5ec99ec6b7515cdc50ab59422df8 100644 (file)
@@ -31,7 +31,7 @@ DOXYFILES  := doxygen.cfg.in doxygen.css doxygen.footer doxygen.header \
               doxygen.intro
 EXTRA_DIST := $(HTML) $(DOXYFILES) llvm.css CommandGuide img
 
-.PHONY: install-html install-doxygen doxygen install-ocamldoc ocamldoc
+.PHONY: install-html install-doxygen doxygen install-ocamldoc ocamldoc generated
 
 install_targets := install-html
 ifeq ($(ENABLE_DOXYGEN),1)
@@ -42,6 +42,10 @@ install_targets += install-ocamldoc
 endif
 install-local:: $(install_targets)
 
+# Live documentation is generated for the web site using this target:
+# 'make generated BUILD_FOR_WEBSITE=1'
+generated:: doxygen ocamldoc
+
 install-html: $(PROJ_OBJ_DIR)/html.tar.gz
        $(Echo) Installing HTML documentation
        $(Verb) $(MKDIR) $(PROJ_docsdir)/html
@@ -96,7 +100,12 @@ install-ocamldoc: ocamldoc
          $(FIND) . -type f -exec \
            $(DataInstall) {} $(PROJ_docsdir)/ocamldoc/html \;
 
-ocamldoc: regen-ocamldoc $(PROJ_OBJ_DIR)/ocamldoc.tar.gz
+ocamldoc: regen-ocamldoc
+       $(Echo) Packaging ocamldoc documentation
+       $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar*
+       $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc
+       $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/ocamldoc.tar
+       $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/
 
 regen-ocamldoc:
        $(Echo) Building ocamldoc documentation
@@ -109,13 +118,6 @@ regen-ocamldoc:
                $(OCAMLDOC) -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \
                `$(FIND) $(LEVEL)/bindings/ocaml -name "*.odoc" -exec echo -load '{}' ';'`
 
-$(PROJ_OBJ_DIR)/ocamldoc.tar.gz:
-       $(Echo) Packaging ocamldoc documentation
-       $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/ocamldoc.tar
-       $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc
-       $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/ocamldoc.tar
-       $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/
-
 uninstall-local::
        $(Echo) Uninstalling Documentation
        $(Verb) $(RM) -rf $(PROJ_docsdir)