[mm-common] doc-reference.py: Fix the DevHelp base path



commit dbc362e4341988668d06e0d9f09482b5d5bf3bd6
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Mon Jul 20 15:50:50 2020 +0200

    doc-reference.py: Fix the DevHelp base path
    
    The DevHelp base path shall not include DESTDIR. Fixes #2

 util/build_scripts/doc-reference.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/util/build_scripts/doc-reference.py b/util/build_scripts/doc-reference.py
index c798d48..8edd6ba 100755
--- a/util/build_scripts/doc-reference.py
+++ b/util/build_scripts/doc-reference.py
@@ -91,13 +91,14 @@ def install_doc():
   # <devhelpfile> is a relative or absolute path in the build directory.
   # <htmlrefdir> and <devhelpdir> are installation directories, relative to {prefix}.
   devhelpfile = sys.argv[3]
-  devhelpdir = os.path.join(os.getenv('MESON_INSTALL_DESTDIR_PREFIX'), sys.argv[4])
-  htmlrefdir = os.path.join(os.getenv('MESON_INSTALL_DESTDIR_PREFIX'), sys.argv[5])
+  destdir_devhelpdir = os.path.join(os.getenv('MESON_INSTALL_DESTDIR_PREFIX'), sys.argv[4])
+  destdir_htmlrefdir = os.path.join(os.getenv('MESON_INSTALL_DESTDIR_PREFIX'), sys.argv[5])
+  prefix_htmlrefdir = os.path.join(os.getenv('MESON_INSTALL_PREFIX'), sys.argv[5])
   build_dir = os.path.dirname(devhelpfile)
 
   # Create the installation directories, if they do not exist.
-  os.makedirs(htmlrefdir, exist_ok=True)
-  os.makedirs(devhelpdir, exist_ok=True)
+  os.makedirs(destdir_htmlrefdir, exist_ok=True)
+  os.makedirs(destdir_devhelpdir, exist_ok=True)
 
   # Install html files.
   cmd = [
@@ -107,7 +108,7 @@ def install_doc():
     '--verbose',
     '--mode=0644',
   ] + sys.argv[6:] + [
-    '-t', htmlrefdir,
+    '-t', destdir_htmlrefdir,
     '--glob',
     '--',
     os.path.join(build_dir, 'html', '*'),
@@ -122,8 +123,8 @@ def install_doc():
     os.path.join(MMDOCTOOLDIR, 'doc-install.pl'),
     '--verbose',
     '--mode=0644',
-    '--book-base=' + htmlrefdir.rstrip('/'),
-    '-t', devhelpdir,
+    '--book-base=' + prefix_htmlrefdir.rstrip('/'),
+    '-t', destdir_devhelpdir,
     '--',
     devhelpfile,
   ]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]