[xml/sgml-commit] [linuxdoc-tools] 02/12: Makefile.in, doc/Makedoc.sh: try harder not to use installed tree for doc build.

Agustín Martín Domingo agmartin at moszumanska.debian.org
Thu Oct 8 17:28:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

agmartin pushed a commit to branch upstream
in repository linuxdoc-tools.

commit 42e9e72881079bbc243d43cd6023cdabb4b8f264
Author: Agustin Martin Domingo <agmartin at debian.org>
Date:   Wed Oct 7 13:10:05 2015 +0200

    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: Agustin Martin Domingo <agmartin at debian.org>
---
 Makefile.in    |  6 +++---
 doc/Makedoc.sh | 35 ++++++++++++++++++++++++++++-------
 2 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 359f14e..c34abfe 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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)
diff --git a/doc/Makedoc.sh b/doc/Makedoc.sh
index deea175..064cc0b 100644
--- a/doc/Makedoc.sh
+++ b/doc/Makedoc.sh
@@ -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' \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-xml-sgml/linuxdoc-tools.git



More information about the debian-xml-sgml-commit mailing list