Commit c2f09a33 authored by Karl Wette's avatar Karl Wette

Doxygen: simplify install directories and fix installation bug

- Install directly to $(htmldir) instead of $(docdir)/doxygen
- Regenerate install regex for every installed directory, so
  that replaced paths are relative to each installed file as
  opposed to the base directory; fixes search box not working
Original: 1a65d64ca505957fd7fa04a08972bb90c7dc48bc
parent 00ef4fb5
......@@ -43,8 +43,8 @@ AC_DEFUN([lalsuite_config_subdir],[
uppercase[]_DATA_PATH="${lalsuite_top_srcdir}/lowercase/test"
uppercase[]_OCTAVE_PATH="${lalsuite_abs_top_builddir}/lowercase/octave"
uppercase[]_PYTHON_PATH="${lalsuite_abs_top_builddir}/lowercase/python"
uppercase[]_DOCDIR="${datarootdir}/doc/lowercase"
export uppercase[]_LIBS uppercase[]_CFLAGS uppercase[]_DOCDIR
uppercase[]_HTMLDIR="${htmldir}/../lowercase"
export uppercase[]_LIBS uppercase[]_CFLAGS uppercase[]_HTMLDIR
export uppercase[]_DATA_PATH uppercase[]_OCTAVE_PATH uppercase[]_PYTHON_PATH
# configure $1
......@@ -68,17 +68,17 @@ LAL_CFLAGS="-I${lalsuite_abs_top_builddir}/lal/include"
LAL_DATA_PATH="${lalsuite_top_srcdir}/lal/test"
LAL_OCTAVE_PATH="${lalsuite_abs_top_builddir}/lal/octave"
LAL_PYTHON_PATH="${lalsuite_abs_top_builddir}/lal/python"
LAL_DOCDIR="${datarootdir}/doc/lal"
LAL_HTMLDIR="${htmldir}/../lal"
LALSUPPORT_LIBS="${lalsuite_abs_top_builddir}/lal/lib/lalsupport/src/liblalsupport.la"
LALSUPPORT_CFLAGS="-I${lalsuite_abs_top_builddir}/lal/include"
LALSUPPORT_DATA_PATH="${LAL_DATA_PATH}"
LALSUPPORT_OCTAVE_PATH="${LAL_OCTAVE_PATH}"
LALSUPPORT_PYTHON_PATH="${LAL_PYTHON_PATH}"
LALSUPPORT_DOCDIR="${datarootdir}/doc/lal"
LALSUPPORT_HTMLDIR="${htmldir}/../lal"
LALSUITE_BUILD="true"
export LALSUITE_BUILD
export LAL_LIBS LAL_CFLAGS LAL_DATA_PATH LAL_OCTAVE_PATH LAL_PYTHON_PATH LAL_DOCDIR
export LALSUPPORT_LIBS LALSUPPORT_CFLAGS LALSUPPORT_DATA_PATH LALSUPPORT_OCTAVE_PATH LALSUPPORT_PYTHON_PATH LALSUPPORT_DOCDIR
export LAL_LIBS LAL_CFLAGS LAL_DATA_PATH LAL_OCTAVE_PATH LAL_PYTHON_PATH LAL_HTMLDIR
export LALSUPPORT_LIBS LALSUPPORT_CFLAGS LALSUPPORT_DATA_PATH LALSUPPORT_OCTAVE_PATH LALSUPPORT_PYTHON_PATH LALSUPPORT_HTMLDIR
# configure optional packages
lalsuite_config_subdir([lalframe])
......
# -*- mode: autoconf; -*-
# lalsuite_build.m4 - top level build macros
#
# serial 101
# serial 102
# not present in older versions of pkg.m4
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
......@@ -473,12 +473,12 @@ AC_DEFUN([LALSUITE_CHECK_LIB],[
AS_UNSET([PKG_CONFIG_ALLOW_SYSTEM_CFLAGS])
AS_UNSET([PKG_CONFIG_ALLOW_SYSTEM_LIBS])
# prepend to CFLAGS, CPPFLAGS, LDFLAGS, LIBS, LAL_DATA_PATH, LAL_OCTAVE_PATH, LAL_PYTHON_PATH, LAL_DOCDIR
# prepend to CFLAGS, CPPFLAGS, LDFLAGS, LIBS, LAL_DATA_PATH, LAL_OCTAVE_PATH, LAL_PYTHON_PATH, LAL_HTMLDIR
PKG_CHECK_MODULES(uppercase, [lowercase >= $2], [lowercase="true"], [lowercase="false"])
PKG_CHECK_VAR(uppercase[]_DATA_PATH, [lowercase >= $2], uppercase[]_DATA_PATH,,)
PKG_CHECK_VAR(uppercase[]_OCTAVE_PATH, [lowercase >= $2], uppercase[]_OCTAVE_PATH,,)
PKG_CHECK_VAR(uppercase[]_PYTHON_PATH, [lowercase >= $2], uppercase[]_PYTHON_PATH,,)
PKG_CHECK_VAR(uppercase[]_DOCDIR, [lowercase >= $2], docdir,,)
PKG_CHECK_VAR(uppercase[]_HTMLDIR, [lowercase >= $2], htmldir,,)
if test "$lowercase" = "true"; then
LALSUITE_ADD_FLAGS([C],$[]uppercase[]_CFLAGS,$[]uppercase[]_LIBS)
LALSUITE_ADD_PATH(LAL_DATA_PATH,"$[]uppercase[]_DATA_PATH")
......@@ -662,15 +662,15 @@ AC_DEFUN([LALSUITE_ENABLE_DOXYGEN],[
[lalsupport],[:],[
ucarg=[`echo ${arg} | tr '[a-z]' '[A-Z]'`]
DOXYGEN_ENABLED_SECTIONS="${DOXYGEN_ENABLED_SECTIONS} ${ucarg}"
arg_docdir_name="${ucarg}_DOCDIR"
AS_VAR_COPY([arg_docdir],[${arg_docdir_name}])
arg_htmldir_name="${ucarg}_HTMLDIR"
AS_VAR_COPY([arg_htmldir],[${arg_htmldir_name}])
AS_IF([test "x${LALSUITE_BUILD}" = xtrue],[
tagpath="\$(abs_top_builddir)/../${arg}/doxygen/out"
],[
tagpath="${arg_docdir}/doxygen"
tagpath="${arg_htmldir}"
])
DOXYGEN_TAGFILES="${DOXYGEN_TAGFILES} ${tagpath}/${arg}.tag=${tagpath}"
DOXYGEN_INSTALL_DIRMAP="${DOXYGEN_INSTALL_DIRMAP} ${tagpath}:${arg_docdir}/doxygen"
DOXYGEN_INSTALL_DIRMAP="${DOXYGEN_INSTALL_DIRMAP} ${tagpath}:${arg_htmldir}"
]
)
done
......
......@@ -36,24 +36,26 @@ html-local: Makefile $(CONFIG_CLEAN_FILES)
test `cat errors.log | wc -l` -eq 0 || exit 1; \
rm -f errors.log || exit 1; \
echo "=== Doxygen documentation build was successful!"; \
echo "=== Main page is at file://$(abs_builddir)/out/index.html"
echo "=== $(PACKAGE_NAME) main page is at file://$(abs_builddir)/out/index.html"
install-data-local: install-html-local
install-html-local: html-local
$(AM_V_at)for dir in `cd out/ && find . -type d`; do \
echo " $(MKDIR_P) '$(DESTDIR)$(docdir)/doxygen/$${dir}'"; \
$(MKDIR_P) "$(DESTDIR)$(docdir)/doxygen/$${dir}" || exit 1; \
done; \
$(PYTHON) $(abs_srcdir)/install_regex.py "$(DESTDIR)$(docdir)/doxygen" "$(DOXYGEN_INSTALL_DIRMAP)" > $@.regex || exit 1; \
for file in `cd out/ && find . -type f`; do \
echo " $(INSTALL_DATA) out/$${file} '$(DESTDIR)$(docdir)/doxygen/$${file}'"; \
$(SED) -n -f $@.regex out/$${file} > $@.tmp || exit 1; \
$(INSTALL_DATA) $@.tmp "$(DESTDIR)$(docdir)/doxygen/$${file}" || exit 1; \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$${dir}'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$${dir}" || exit 1; \
$(PYTHON) $(abs_srcdir)/install_regex.py "$(DESTDIR)$(htmldir)/$${dir}" "$(DOXYGEN_INSTALL_DIRMAP)" > $@.regex || exit 1; \
for file in `cd out/ && echo $${dir}/*`; do \
if test -f "out/$${file}"; then \
echo " $(INSTALL_DATA) out/$${file} '$(DESTDIR)$(htmldir)/$${file}'"; \
$(SED) -n -f $@.regex "out/$${file}" > $@.tmp || exit 1; \
$(INSTALL_DATA) $@.tmp "$(DESTDIR)$(htmldir)/$${file}" || exit 1; \
fi; \
done; \
done; \
rm -f $@.regex $@.tmp
uninstall-local:
-rm -rf "$(DESTDIR)$(docdir)/doxygen/"
-rm -rf "$(DESTDIR)$(htmldir)/"
clean-local:
-rm -rf out/
......
......@@ -6,6 +6,11 @@ __copyright__ = 'Copyright (C) 2015 Karl Wette'
import sys, os
from xml.etree.cElementTree import ElementTree
# print error message and exit
def fail(msg):
sys.stderr.write('%s: %s\n' % (sys.argv[0], msg))
sys.exit(1)
# get input arguments
install_dir, install_dirmap = sys.argv[1:]
......@@ -15,5 +20,9 @@ install_dir, install_dirmap = sys.argv[1:]
# and hence is relocatable
for elem in install_dirmap.split():
(from_dir, to_dir) = elem.split(':')
if len(from_dir) == 0:
fail('from-directory in install directory map is empty')
if len(to_dir) == 0:
fail('to-directory in install directory map is empty')
print 's|%s|%s|g' % (from_dir, os.path.relpath(to_dir, install_dir))
print "p"
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LAL_OCTAVE_PATH=@octexecdir@
LAL_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALSUPPORT_OCTAVE_PATH=@octexecdir@
LALSUPPORT_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALBURST_OCTAVE_PATH=@octexecdir@
LALBURST_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALDETCHAR_OCTAVE_PATH=@octexecdir@
LADETCHARL_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALFRAME_OCTAVE_PATH=@octexecdir@
LALFRAME_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALINFERENCE_OCTAVE_PATH=@octexecdir@
LALINFERENCE_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALINSPIRAL_OCTAVE_PATH=@octexecdir@
LALINSPIRAL_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALMETAIO_OCTAVE_PATH=@octexecdir@
LALMETAIO_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALPULSAR_OCTAVE_PATH=@octexecdir@
LALPULSAR_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALSIMULATION_OCTAVE_PATH=@octexecdir@
LALSIMULATION_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALSTOCHASTIC_OCTAVE_PATH=@octexecdir@
LALSTOCHASTIC_PYTHON_PATH=@pyexecdir@
......
......@@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
htmldir=@htmldir@
docdir=@docdir@
LALXML_OCTAVE_PATH=@octexecdir@
LALXML_PYTHON_PATH=@pyexecdir@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment