From: Ben Pfaff Date: Sun, 17 Sep 2017 17:06:35 +0000 (-0700) Subject: Fixes for building spread-sheet-widget as part of the build. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de529ec0679df55184c2959eb5c50c4f86867871;p=pspp Fixes for building spread-sheet-widget as part of the build. --- diff --git a/build-pspp b/build-pspp index 811a39f33d..16c19cf0e8 100755 --- a/build-pspp +++ b/build-pspp @@ -15,10 +15,13 @@ my $build_binary = 1; my $batch = 0; my $builddir; my $build_number; +my $builder = `hostname`; +chomp $builder; GetOptions ("h|help" => \$help, "binary!" => \$build_binary, "batch!" => \$batch, "o|output=s" => \$builddir, + "builder=s" => \$builder, "build-number=i" => \$build_number); usage () if $help; @@ -61,9 +64,7 @@ VARS->autoflush (1); our $logfile = "$resultsdir/LOG"; open (LOG, '>', $logfile) or die "creating $logfile failed: $!\n"; -my $build_host = `hostname`; -chomp $build_host; -set_var ("build_host", $build_host); +set_var ("builder", $builder); set_var ("build_number", $build_number); our $GIT = "git --git-dir=$topdir/.git"; @@ -124,9 +125,23 @@ sub ref_to_commit { return $commit; } +my $ssw = "spread-sheet-widget-0.1"; if (@ARGV == 2) { my ($repo, $branch) = @ARGV; + my $ssw_tar = "$topdir/$ssw.tar.gz"; + start_step ("Extract spread-sheet-widget"); + run ("tar xzf $ssw_tar"); + + start_step ("Configure spread-sheet-widget"); + run ("cd $ssw && ./configure --prefix=''"); + + start_step ("Build spread-sheet-widget"); + run ("cd $ssw && make -j10"); + + start_step ("Install spread-sheet-widget"); + run ("cd $ssw && make -j10 install DESTDIR=\$PWD/inst"); + start_step ("Fetch branch from Git"); set_var ("git_repo", $repo); set_var ("git_branch", $branch); @@ -221,7 +236,7 @@ if (@ARGV == 2) { Changes from $repo_version to $version: * Built from PSPP commit $revision - in branch $branch on host $build_host. + in branch $branch on builder $builder. * Built from Gnulib commit $gnulib_commit. @@ -249,11 +264,11 @@ EOF # Bootstrap. start_step ("Bootstrap (make -f Smake)"); - run ("cd pspp && make -f Smake", "bootstrap"); + run ("cd pspp && make -f Smake -j10", "bootstrap"); # Configure. start_step ("Configure source"); - run ("cd pspp && mkdir _build && cd _build && ../configure", "configure"); + run ("cd pspp && mkdir _build && cd _build && ../configure PKG_CONFIG_PATH=\$PWD/../../../source/$ssw/inst/lib/pkgconfig", "configure"); # Distribute. start_step ("Make source tarball"); @@ -268,15 +283,15 @@ EOF # Build user manual start_step ("Build user manual"); - run ("cd pspp && GENDOCS_TEMPLATE_DIR=$topdir $topdir/gendocs.sh -s doc/pspp.texinfo -I doc -o $resultsdir/user-manual --email bug-gnu-pspp\@gnu.org pspp \"GNU PSPP User Manual\"", "user-manual"); + run ("cd pspp && GENDOCS_TEMPLATE_DIR=$topdir $topdir/gendocs.sh -s doc/pspp.texi -I doc -o $resultsdir/user-manual --email bug-gnu-pspp\@gnu.org pspp \"GNU PSPP User Manual\"", "user-manual"); saved_result ("User Manual", "user-manual"); # Build developer's guide start_step ("Build developers guide"); - run ("cd pspp && GENDOCS_TEMPLATE_DIR=$topdir $topdir/gendocs.sh -s doc/pspp-dev.texinfo -I doc -o $resultsdir/dev-guide --email bug-gnu-pspp\@gnu.org pspp-dev \"GNU PSPP Developers Guide\"", "dev-guide"); + run ("cd pspp && GENDOCS_TEMPLATE_DIR=$topdir $topdir/gendocs.sh -s doc/pspp-dev.texi -I doc -o $resultsdir/dev-guide --email bug-gnu-pspp\@gnu.org pspp-dev \"GNU PSPP Developers Guide\"", "dev-guide"); saved_result ("Developers Guide", "dev-guide"); } else { - $tarball = saved_result ("source distribution", $tarball); + start_step ("Starting from $tarball"); } if ($build_binary) { @@ -297,7 +312,7 @@ if ($build_binary) { my ($version) = `cd $builddir/$tarball_dir && ./configure --version | head -1` =~ /configure (\S+)$/; set_var ("dist_version", $version); - my ($binary_version) = "$version-$build_host-build$build_number"; + my ($binary_version) = "$version-$builder-build$build_number"; set_var ("binary_version", $binary_version); start_step ("Configuring"); @@ -305,7 +320,7 @@ if ($build_binary) { run ("chmod u+w $builddir/$tarball_dir"); run ("mkdir $builddir/$tarball_dir/_build"); run ("chmod a-w $builddir/$tarball_dir"); - my $ok = try_run ("cd $builddir/$tarball_dir/_build && ../configure --enable-relocatable --prefix=''", "bin-configure"); + my $ok = try_run ("cd $builddir/$tarball_dir/_build && ../configure --enable-relocatable --prefix='' PKG_CONFIG_PATH=\$PWD/../../../source/$ssw/inst/lib/pkgconfig CPPFLAGS=\"-I\$PWD/../../../source/$ssw/inst/include\" LDFLAGS=\"-L\$PWD/../../../source/$ssw/inst/lib\"", "bin-configure"); for my $basename ("config.h", "config.log") { save_result_if_exists ("build configuration", "$builddir/$tarball_dir/_build/$basename"); @@ -313,10 +328,11 @@ if ($build_binary) { fail () if !$ok; start_step ("Build"); - run ("cd $builddir/$tarball_dir/_build && make -j2", "build"); + run ("cd $builddir/$tarball_dir/_build && make -j10", "build"); start_step ("Install"); run ("cd $builddir/$tarball_dir/_build && make install DESTDIR=\$PWD/pspp-$binary_version", "install"); + run ("cd ../source/$ssw && make -j10 install DESTDIR=$builddir/$tarball_dir/_build/pspp-$binary_version"); start_step ("Make binary distribution"); run ("cd $builddir/$tarball_dir/_build && tar cfz pspp-$binary_version.tar.gz pspp-$binary_version"); @@ -330,6 +346,7 @@ if ($build_binary) { fail () if !$ok; start_step ("Uninstall"); + run ("cd ../source/$ssw && make -j10 uninstall DESTDIR=$builddir/$tarball_dir/_build/pspp-$binary_version"); run ("cd $builddir/$tarball_dir/_build && make uninstall DESTDIR=\$PWD/pspp-$binary_version", "uninstall"); start_step ("Check uninstall"); diff --git a/results2html b/results2html index 1e8ea80222..988b1e2672 100755 --- a/results2html +++ b/results2html @@ -80,7 +80,7 @@ while () { $p{HREF} = $href; $p{LN} = $ln; push (@products, \%p); - push (@{$steps[$#steps]{CHILDREN}}, \%p); + push (@{$steps[$#steps]{CHILDREN}}, \%p) if @steps; if (defined ($name) && $name eq 'source distribution') { open (DIST, '-|', "zcat $product | tar tf -");