2012-09-05 13:37:39 +04:00
##===- docs/Makefile ---------------------------------------*- Makefile -*-===##
#
2014-01-07 12:55:59 +04:00
# The Cling Interpreter
2012-09-05 13:37:39 +04:00
#
2014-01-07 12:55:59 +04:00
# This file is dual-licensed: you can choose to license it under the University
# of Illinois Open Source License or the GNU Lesser General Public License. See
# LICENSE.TXT for details.
2012-09-05 13:37:39 +04:00
#
##===----------------------------------------------------------------------===##
CLING_LEVEL := ..
PROJ_OBJ_DIR = .
2014-06-05 21:39:47 +04:00
DIRS := tools
2012-09-05 13:37:39 +04:00
i n c l u d e $( CLING_LEVEL ) / M a k e f i l e
DOXYGEN = doxygen
PROJ_docsdir := $( PROJ_docsdir) /cling
HTML := $( wildcard $( PROJ_SRC_DIR) /doxygen/html/*.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
.PHONY : install -html install -doxygen doxygen generated
install_targets :=
i f n d e f O N L Y _ M A N _ D O C S
install_targets += install-html
e n d i f
i f e q ( $( ENABLE_DOXYGEN ) , 1 )
install_targets += install-doxygen
e n d i f
install-local :: $( install_targets )
# Live documentation is generated for the web site using this target:
# 'make generated BUILD_FOR_WEBSITE=1'
generated :: doxygen
install-html : $( PROJ_OBJ_DIR ) /html .tar .gz
$( Verb) if test -d $( PROJ_OBJ_DIR) /doxygen ; then \
echo Installing HTML documentation ; \
$( MKDIR) $( DESTDIR) $( PROJ_docsdir) /html; \
$( MKDIR) $( DESTDIR) $( PROJ_docsdir) /html/img; \
$( DataInstall) $( HTML) $( DESTDIR) $( PROJ_docsdir) /html; \
$( DataInstall) $( PROJ_OBJ_DIR) /html.tar.gz $( DESTDIR) $( PROJ_docsdir) ; \
fi
$(PROJ_OBJ_DIR)/html.tar.gz : $( HTML )
$( Verb) if test -d $( PROJ_OBJ_DIR) /doxygen ; then \
echo Packaging HTML documentation; \
$( RM) -rf $@ $( PROJ_OBJ_DIR) /html.tar; \
cd $( PROJ_OBJ_DIR) && \
$( TAR) cf html.tar doxygen/html/; \
$( GZIPBIN) $( PROJ_OBJ_DIR) /html.tar; \
fi
install-doxygen : doxygen
$( Echo) Installing doxygen documentation
$( Verb) $( MKDIR) $( DESTDIR) $( PROJ_docsdir) /html/doxygen
$( Verb) $( DataInstall) $( PROJ_OBJ_DIR) /doxygen.tar.gz $( DESTDIR) $( PROJ_docsdir)
$( Verb) cd $( PROJ_OBJ_DIR) /doxygen && \
$( FIND) . -type f -exec \
$( DataInstall) { } $( DESTDIR) $( PROJ_docsdir) /html/doxygen \;
doxygen : regendoc $( PROJ_OBJ_DIR ) /doxygen .tar .gz
regendoc : gen -doxygen -cfg
$( Echo) Building doxygen documentation
$( Verb) if test -e $( PROJ_OBJ_DIR) /doxygen ; then \
$( RM) -rf $( PROJ_OBJ_DIR) /doxygen ; \
fi
$( Verb) $( DOXYGEN) $( PROJ_OBJ_DIR) /doxygen.cfg
2014-02-21 13:44:34 +04:00
$( Verb) sed -i " s/[ $$ ]LatestRev[ $$ ]/`git show -s --pretty=format:%h $( PROJ_SRC_DIR) `/g " \
2012-09-05 13:37:39 +04:00
$( PROJ_OBJ_DIR) /doxygen/html/*.html
$(PROJ_OBJ_DIR)/doxygen.tar.gz : $( DOXYFILES ) $( PROJ_OBJ_DIR ) /doxygen .cfg
$( Echo) Packaging doxygen documentation
$( Verb) $( RM) -rf $@ $( PROJ_OBJ_DIR) /doxygen.tar
$( Verb) $( TAR) cf $( PROJ_OBJ_DIR) /doxygen.tar doxygen
$( Verb) $( GZIPBIN) $( PROJ_OBJ_DIR) /doxygen.tar
$( Verb) $( CP) $( PROJ_OBJ_DIR) /doxygen.tar.gz $( PROJ_OBJ_DIR) /doxygen/html/
gen-doxygen-cfg :
2013-11-07 14:23:09 +04:00
$( Echo) Generating doxygen configuration file
2012-09-05 13:37:39 +04:00
$( Echo) $( PROJ_OBJ_DIR) /doxygen.cfg
cat $( PROJ_SRC_DIR) /doxygen.cfg.in | sed \
-e 's,@docs_srcdir@,' $( PROJ_SRC_DIR) ",g" \
-e 's,@cling_srcdir@,' $( call realpath, $( PROJ_SRC_DIR) /$( CLING_LEVEL) ) ",g" \
-e 's/@DOT@/dot/g' \
-e 's/@PACKAGE_VERSION@/mainline/' \
-e 's/@docs_builddir@/./g' > $( PROJ_OBJ_DIR) /doxygen.cfg
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
uninstall-local ::
$( Echo) Uninstalling Documentation
$( Verb) $( RM) -rf $( DESTDIR) $( PROJ_docsdir)