LEVEL := ..
DIRS := CommandGuide
+ifdef BUILD_FOR_WEBSITE
+PROJ_OBJ_DIR = .
+DOXYGEN = doxygen
+# Extract version number from the AC_INT line in configure.ac
+# AC_INIT([[llvm]],[[2.1svn]],[llvmbugs@cs.uiuc.edu])
+PACKAGE_VERSION = $(shell grep AC_INIT ../autoconf/configure.ac | sed -e 's/^[^0-9]*\([0-9_.a-zA-Z-]*\).*/\1/' )
+
+$(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in
+ cat $< | sed \
+ -e 's/@abs_top_srcdir@/../g' \
+ -e 's/@DOT@/dot/g' \
+ -e 's/@PACKAGE_VERSION@/$(PACKAGE_VERSION)/' \
+ -e 's/@abs_top_builddir@/../g' > $@
+endif
+
include $(LEVEL)/Makefile.common
-HTML := $(wildcard $(BUILD_SRC_DIR)/*.html) \
- $(wildcard $(BUILD_SRC_DIR)/*.css)
-IMAGES := $(wildcard $(BUILD_SRC_DIR)/img/*.*)
+HTML := $(wildcard $(PROJ_SRC_DIR)/*.html) \
+ $(wildcard $(PROJ_SRC_DIR)/*.css)
+IMAGES := $(wildcard $(PROJ_SRC_DIR)/img/*.*)
DOXYFILES := doxygen.cfg.in doxygen.css doxygen.footer doxygen.header \
doxygen.intro
EXTRA_DIST := $(HTML) $(DOXYFILES) llvm.css CommandGuide img
install-local:: install-html
endif
-install-html: $(BUILD_OBJ_DIR)/html.tar.gz
+install-html: $(PROJ_OBJ_DIR)/html.tar.gz
$(Echo) Installing HTML documentation
- $(Verb) $(INSTALL) -d $(LLVM_DOCSDIR)/html
- $(Verb) $(INSTALL) -d $(LLVM_DOCSDIR)/html/img
- $(Verb) $(INSTALL) -C $(HTML) $(LLVM_DOCSDIR)/html
- $(Verb) $(INSTALL) -C $(IMAGES) $(LLVM_DOCSDIR)/html/img
- $(Verb) $(INSTALL) -C $(BUILD_OBJ_DIR)/html.tar.gz $(LLVM_DOCSDIR)
+ $(Verb) $(MKDIR) $(PROJ_docsdir)/html
+ $(Verb) $(MKDIR) $(PROJ_docsdir)/html/img
+ $(Verb) $(DataInstall) $(HTML) $(PROJ_docsdir)/html
+ $(Verb) $(DataInstall) $(IMAGES) $(PROJ_docsdir)/html/img
+ $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(PROJ_docsdir)
-$(BUILD_OBJ_DIR)/html.tar.gz: $(HTML)
+$(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
$(Echo) Packaging HTML documentation
- $(Verb) $(RM) -rf $@ $(BUILD_OBJ_DIR)/html.tar
- $(Verb) cd $(BUILD_SRC_DIR) && \
- $(TAR) cf $(BUILD_OBJ_DIR)/html.tar *.html
- $(Verb) $(GZIP) $(BUILD_OBJ_DIR)/html.tar
+ $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/html.tar
+ $(Verb) cd $(PROJ_SRC_DIR) && \
+ $(TAR) cf $(PROJ_OBJ_DIR)/html.tar *.html
+ $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/html.tar
install-doxygen: doxygen
$(Echo) Installing doxygen documentation
$(Echo) Installing doxygen documentation
- $(Verb) $(INSTALL) -d $(LLVM_DOCSDIR)/html/doxygen
- $(Verb) $(INSTALL) $(BUILD_OBJ_DIR)/doxygen.tar.gz $(LLVM_DOCSDIR)
- $(Verb) cd $(BUILD_OBJ_DIR)/doxygen && \
+ $(Verb) $(MKDIR) $(PROJ_docsdir)/html/doxygen
+ $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_docsdir)
+ $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \
$(FIND) . -type f -exec \
- $(INSTALL) -C {} $(LLVM_DOCSDIR)/html/doxygen \;
+ $(DataInstall) {} $(PROJ_docsdir)/html/doxygen \;
-doxygen: $(BUILD_OBJ_DIR)/doxygen.tar.gz
+doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz
-$(BUILD_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(BUILD_OBJ_DIR)/doxygen.cfg
+regendoc:
$(Echo) Building doxygen documentation
- $(Verb) if test -e $(BUILD_OBJ_DIR)/doxygen ; then \
- $(RM) -rf $(BUILD_OBJ_DIR)/doxygen ; \
+ $(Verb) if test -e $(PROJ_OBJ_DIR)/doxygen ; then \
+ $(RM) -rf $(PROJ_OBJ_DIR)/doxygen ; \
fi
- $(Verb) $(DOXYGEN) $(BUILD_OBJ_DIR)/doxygen.cfg
+ $(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg
+
+$(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg
$(Echo) Packaging doxygen documentation
- $(Verb) $(RM) -rf $@ $(BUILD_OBJ_DIR)/doxygen.tar
- $(Verb) $(TAR) cf $(BUILD_OBJ_DIR)/doxygen.tar doxygen
- $(Verb) $(GZIP) $(BUILD_OBJ_DIR)/doxygen.tar
+ $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar
+ $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen
+ $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/doxygen.tar
+ $(Verb) $(CP) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_OBJ_DIR)/doxygen/html/
+
+userloc: $(LLVM_SRC_ROOT)/docs/userloc.html
+$(LLVM_SRC_ROOT)/docs/userloc.html:
+ $(Echo) Making User LOC Table
+ $(Verb) cd $(LLVM_SRC_ROOT) ; ./utils/userloc.pl -details -recurse \
+ -html lib include tools runtime utils examples autoconf test > docs/userloc.html
+