Mercurial > hg > octave-lyh
diff scripts/pkg/private/configure_make.m @ 16824:51bcaa55f120
pkg: display output of shell commands on real time if verbose.
* pkg/private/shell.m: display output of commands in real time and return
empty string when verbose. Also small refactor: create the 'special'
command for windows on its condition block rather than calling system()
there to reduce code duplication.
* pkg/private/configure_make.m: adjust call to shell() in order to display
output of `configure' and `make' on real time if verbose.
author | Carnë Draug <carandraug+dev@gmail.com> |
---|---|
date | Sun, 23 Jun 2013 13:25:26 +0100 |
parents | b7667fcb9fbc |
children | 333243133364 |
line wrap: on
line diff
--- a/scripts/pkg/private/configure_make.m +++ b/scripts/pkg/private/configure_make.m @@ -36,6 +36,7 @@ "OCTAVE"; octave_binary; "INSTALLDIR"; desc.dir}; scenv = sprintf ("%s=\"%s\" ", cenv{:}); + ## Configure. if (exist (fullfile (src, "configure"), "file")) flags = ""; @@ -53,24 +54,23 @@ endif [status, output] = shell (cstrcat ("cd '", src, "'; ", scenv, "./configure --prefix=\"", - desc.dir, "\"", flags)); + desc.dir, "\"", flags), + verbose); if (status != 0) rmdir (desc.dir, "s"); - error ("the configure script returned the following error: %s", output); - elseif (verbose) - printf ("%s", output); + disp (output); + error ("pkg: error running the configure script for %s.", desc.name); endif - endif ## Make. if (exist (fullfile (src, "Makefile"), "file")) - [status, output] = shell (cstrcat (scenv, "make -C '", src, "'")); + [status, output] = shell (cstrcat (scenv, "make -C '", src, "'"), + verbose); if (status != 0) rmdir (desc.dir, "s"); - error ("'make' returned the following error: %s", output); - elseif (verbose) - printf ("%s", output); + disp (output); + error ("pkg: error running `make' for the %s package.", desc.name); endif endif