Makefile.in, doc/Makedoc.sh: try harder not to use installed tree for doc build.

 Use original uninstalled trees when possible. Still need to install
 entity-map and iso-entities in doc build dir.
Signed-off-by: default avatarAgustin Martin Domingo <agmartin@debian.org>
parent 7e0fcffb
......@@ -164,11 +164,11 @@ endif
# -- Build and install documentation
@echo "Installing documentation in $(doc_ddir) ..."
(cd doc; \
PATH=${PATH}:$(bin_ddir) \
PREFIX=$(DESTDIR)$(prefix) \
AUXBINDIR=$(auxbin_ddir) \
PKGPERL5LIB=$(perl5lib_ddir) \
PKGDATADIR=$(pkgdata_ddir) \
PKGPERL5LIB=$(CURDIR)/perl5lib \
PKGDATADIR=$(CURDIR)/lib \
PKGENTITYMAPDIR=$(CURDIR)/entity-map \
bash Makedoc.sh)
mkdir -m 755 -p $(doc_ddir)
......
......@@ -15,23 +15,44 @@ function abort()
trap 'abort' 1 2 3 6 9 15
export PERL5LIB=${TMPDIR}:../perl5lib
# Set ${TMPDIR} first in perl load path (Will put Text dir there for
# modified EntityMap.pm), then our perl5lib
export PERL5LIB=${TMPDIR}:${PKGPERL5LIB}
PERL=`which perl`
TMPDATADIR=${TMPDIR}/linuxdoc-tools
mkdir -p ${TMPDATADIR}
cp -r ${PKGDATADIR} $TMPDIR
( cd ${PKGDATADIR} && cp -r . ${TMPDATADIR} )
cp ../tex/*.sty ${TMPDATADIR}
cp ../VERSION ${TMPDATADIR}
# Create a modified EntityMap.pm with entity-map location in doc build
# temporary dir. We need to properly install entity-map there.
mkdir $TMPDIR/Text
make -C ../entity-map install DESTDIR="$TMPDIR"
sed < ../entity-map/EntityMap.pm.in > $TMPDIR/Text/EntityMap.pm \
-e 's|\@localentitymapdir\@|'${PKGDATADIR}'/../entity-map|g' \
-e 's|\@entitymapdir\@|'${PKGDATADIR}'/../entity-map/0.1.0|g'
-e 's|\@localentitymapdir\@|'${TMPDIR}'/usr/share/entity-map|g' \
-e 's|\@entitymapdir\@|'${TMPDIR}'/usr/share/entity-map/0.1.0|g'
# Same for iso-entities, need it installed in "$TMPDIR"
make -C ../iso-entities install DESTDIR="$TMPDIR"
# Make sure our binaries are available in doc build environment
TMP_BINDIR=${TMPDIR}/bin
mkdir -p ${TMP_BINDIR}
install -m 0755 ../sgmlpre/sgmlpre ${TMP_BINDIR}
install -m 0755 ../rtf-fix/rtf2rtf ${TMP_BINDIR}
if [ -x "../sgmls-1.1/sgmlsasp" ]; then
install -m 0755 ../sgmls-1.1/sgmlsasp ${TMP_BINDIR}
fi
export PATH=${PATH}:${TMP_BINDIR}
# Create a linuxdoc copy using our temporary locations.
sed < ../bin/linuxdoc.in > $TMPDIR/linuxdoc \
-e 's!\@prefix\@!'${PREFIX}'!g' \
-e 's!\@auxbindir\@!'${AUXBINDIR}'!g' \
-e 's!\@prefix\@!'${TMPDIR}/usr'!g' \
-e 's!\@auxbindir\@!'${TMP_BINDIR}'!g' \
-e 's!\@pkgdatadir\@!'${TMPDATADIR}'!g' \
-e 's!\@perl5libdir\@!'${TMPDIR}'!g' \
-e 's!\@GROFFMACRO\@!-ms!g' \
......
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