build-pspp: Update for more parallelism and updated user manual.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 9 Sep 2020 06:39:04 +0000 (23:39 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 25 Oct 2020 06:59:37 +0000 (23:59 -0700)
build-pspp

index d7ea908479564fa8c1b73b7dd0aae139df2c06bd..7cc875656ba299ecc98c4bd3cb5d434ab2a78ad1 100755 (executable)
@@ -422,7 +422,7 @@ Changes from %(repo_version)s to %(version)s:
 
     # Distribute.
     start_step("Make source tarball")
-    run("cd pspp/_build && make dist", "dist")
+    run("cd pspp/_build && make -j$(nproc) dist", "dist")
     tarname = "pspp-%s.tar.gz" % version
     tarball = save_result("source distribution", "pspp/_build/%s" % tarname, 1)
 
@@ -432,10 +432,15 @@ Changes from %(repo_version)s to %(version)s:
         potfile = "pspp/po/pspp.pot"
     save_result("translation templates", potfile)
 
+    # Build examples for user manual.
+    start_step("Build examples for user manual")
+    run("cd pspp/_build && make -j$(nproc) example-outputs example-html")
+
     # Build user manual
     start_step("Build user manual")
     run("cd pspp && "
         "GENDOCS_TEMPLATE_DIR=%s %s/gendocs.sh -s doc/pspp.texi -I doc "
+        "-I _build/doc/examples -I doc/examples "
         "-o %s/user-manual --email bug-gnu-pspp@gnu.org "
         "pspp \"GNU PSPP User Manual\"" % (topdir, topdir, resultsdir),
         "user-manual")
@@ -504,15 +509,16 @@ if build_binary:
         % (builddir, tarball_dir), "build Perl module")
 
     start_step("Install")
-    run("cd %s/%s/_build && make install DESTDIR=$PWD/pspp-%s"
+    run("cd %s/%s/_build && make -j$(nproc) install DESTDIR=$PWD/pspp-%s"
         % (builddir, tarball_dir, binary_version), "install")
     run("cd ../source/%s && make -j$(nproc) install DESTDIR=%s/%s/_build/pspp-%s"
         % (ssw_dir, builddir, tarball_dir, binary_version))
     run("cd %s/%s/_build/perl-module && "
-        "make install DESTDIR=%s/%s/_build/pspp-%s"
+        "make -j$(nproc)  install DESTDIR=%s/%s/_build/pspp-%s"
         % (builddir, tarball_dir, builddir, tarball_dir, binary_version),
         "install Perl module")
-    run("cd %s/%s/_build/perl-module && make install DESTDIR=$PWD/inst"
+    run("cd %s/%s/_build/perl-module && "
+        "make -j$(nproc) install DESTDIR=$PWD/inst"
         % (builddir, tarball_dir))
 
     start_step("Make binary distribution")
@@ -533,7 +539,7 @@ if build_binary:
     start_step("Uninstall")
     run("cd ../source/%s && make -j$(nproc) uninstall DESTDIR=%s/%s/_build/pspp-%s"
         % (ssw_dir, builddir, tarball_dir, binary_version))
-    run("cd %s/%s/_build && make uninstall DESTDIR=$PWD/pspp-%s"
+    run("cd %s/%s/_build && make -j$(nproc) uninstall DESTDIR=$PWD/pspp-%s"
         % (builddir, tarball_dir, binary_version), "uninstall")
 
     start_step("Check uninstall")
@@ -542,7 +548,7 @@ if build_binary:
         % (builddir, tarball_dir,
            builddir, tarball_dir, binary_version), "uninstall Perl module")
     run("cd %s/%s/_build && "
-        "make distuninstallcheck distuninstallcheck_dir=$PWD/pspp-%s"
+        "make -j$(nproc) distuninstallcheck distuninstallcheck_dir=$PWD/pspp-%s"
         % (builddir, tarball_dir, binary_version),
         "distuninstallcheck")