* Don't dump builddir/$module when autorebuilding.

svn path=/trunk/kdenonbeta/kdecvs-build/; revision=320442
wilder
Michael Pyne 22 years ago
parent 52a52dde55
commit 7633281699
  1. 68
      doc.html.in
  2. 56
      kdecvs-build

@ -65,6 +65,27 @@ those who either can't or don't feel like installing it.</p>
<p>It is authored by Michael Pyne (mpyne (AT) grammarian (DOT) homelinux
(DOT) net), and is one of several build scripts for this purpose.</p>
<p><b>2004-Jun-14:</b> v0.73<br />
Bugfixes:
<ul>
<li>The <a href="#conf-no-rebuild-on-fail">no-rebuild-on-fail</a>
configuration file option didn't actually work in prior versions.</li>
<li>The log file for a build now has a number appended, since multiple build
attempts can occur during a single script run.</li>
</ul>
Features:
<ul>
<li>Based on a suggestion by mornfall, the autorebuilding process doesn't
clean out the build directory for a module when trying to rebuild. In
addition, on a failure, make will be run again since sometimes that's all it
takes to make it work. If the build process still fails, the build system
will be recreated, but the build directory won't be cleaned. This is a big
time saver, and should give the same results. Using the <a
href="#cmdline-refresh-build">--refresh-build</a> option will still cause the
build directory to be cleaned at this point.</li>
</ul>
<p><b>2004-Jun-13:</b> v0.72 -- <em>This Should Work Edition&trade;</em><br/>
Bugfixes:
<ul>
@ -131,51 +152,6 @@ ran in by browsing $(cvs-root)/log/latest.</li>
</ul>
<p><b>2004-Jun-12:</b> v0.70
<ul>
<li>The script now lets CVS handle the admin directory, fixing a problem where
adding the checkout-only option to a module that had already been checked out
would cause an error.
</li>
<li>The script now comes packages the way products in the rest of the FOSS
world do, in its own directory.
</li>
<li>Workaround a bug in the auto-rebuilding for qt-copy until I figure out
what's going on.
</li>
<li>The <a href="#cmdline-no-build">--no-build</a> command line option has
been fixed. It was broken in a recent release.
</li>
<li>A new configuration file option has been added, <a
href="#conf-stop-on-failure">stop-on-failure</a>. Setting this option to true
causes the script to stop whenever an error is detected during the build or
install processes.
</li>
</ul>
<p><b>2004-Jun-08:</b> v0.66, which is a bug-fix release.
<ul>
<li>Keep module changes in the build process for a module from affecting other
modules. This should fix a build error in kdepim due to qt-copy setting the
environment variable YACC.
</li>
<li>If unsermake isn't supposed to be used for a module, forcibly remove it
from the list of environment variables. I'm not sure why this seemed to work
for me in earlier versions, as the code was never correct. :-|
</li>
<li>Really fix the bug where "Script starts" would be displayed before
command line options were processed, resulting in sub-optimal program output.
</li>
</ul>
</p>
<p>I recommend that you set up a separate user account if you decide to run KDE
from CVS. I didn't at first, and I won't repeat that mistake for KDE 3.3 ;-).
I would also recommend that you add this script to your crontab so that you
@ -740,7 +716,7 @@ href="#options">.kdecvs-buildrc options</a>.
<div align="center" class="thankyou">
<font size="-1"><a href="http://www.cvsup.org/">CVSup</a> is a registered trademark of John D. Polstra.
<br/>
Last modified: Sun Jun 13 03:12:10 2004</font>
Last modified: Sun Jun 13 22:10:28 2004</font>
</div>
</body>
</html>

@ -251,13 +251,14 @@ sub log_command
}
}
# Subroutine to run the make command with the arguments given by the
# passed list. If make-output-file is set, the output of STDOUT and
# STDERR will be redirected to that file. The first argument of the
# list given must be the module that we're making.
# Subroutine to run the make command with the arguments given by the passed
# list. The first argument of the list given must be the module that we're
# making. The second argument is the "try number", used in creating the log
# file name.
sub safe_make (@)
{
my $module = shift;
my $trynumber = shift;
my $opts = get_option($module, 'make-options');
my $logdir = get_log_dir($module);
@ -267,14 +268,14 @@ sub safe_make (@)
if (pretending)
{
$opts = join(' ', @_);
print "\tWould have run make $opts > $logdir/$module-build\n";
print "\tWould have run make $opts > $logdir/$module-build-$trynumber\n";
return 0;
}
chdir (get_build_dir($module) . "/$module");
print "\tCompiling...\n";
return log_command ($module, "build", ['make', @_] );
print "\tCompiling, attempt $trynumber...\n";
return log_command ($module, "build-$trynumber", ['make', @_] );
}
# Subroutine to add a variable to the environment, but ONLY if it
@ -1304,7 +1305,10 @@ sub setup_build_system
# this module.
$package_opts{$module}->{'#was-rebuilt'} = 1;
if (not clean_build_system($module))
# Check to see if we're actually supposed to go through the cleaning
# process.
if (not $package_opts{$module}->{'#cancel-clean'} and
not clean_build_system($module))
{
print "\tUnable to clean $module!\n";
return 0;
@ -1452,6 +1456,7 @@ sub build_module
{
my $module = shift;
my $builddir = get_build_dir ($module);
my $trynumber = 1;
# Do some tests to make sure we're ready to build.
if (not exists $package_opts{$module})
@ -1470,21 +1475,38 @@ sub build_module
update_module_environment($module);
chdir ("$builddir/$module");
if (safe_make ($module))
if (safe_make ($module, $trynumber))
{
# Build failed
if (not defined $package_opts{$module}->{'#was-rebuilt'} and not
get_option ($module, 'no-rebuild-on-fail'))
{
# Force the module to rebuild and try again.
$package_opts{$module}->{'refresh-build'} = 1;
}
else
# There are several reasons why the build could fail. If we're
# using unsermake for this module, then perhaps we just need to
# run make again. After that, we can re-run make -f Makefile.cvs
# and etc and then try make again. If that STILL doesn't work, we
# can try rm -rf $builddir/$module and rebuild.
if ($trynumber > 3 or
(not defined $package_opts{$module}->{'#was-rebuilt'} and
get_option ($module, 'no-rebuild-on-fail')))
{
# Well we tried, but it isn't going to happen.
print "\tUnable to build $module!\n";
print "\n\tUnable to build $module!\n";
return 0;
}
if (++$trynumber == 2)
{
# Just try again
print "\n\tCouldn't build, going to try again just in case.\n";
next;
}
elsif ($trynumber == 3)
{
# Don't remove the old modules, but re-run make -f
# Makefile.cvs and configure.
print "\n\tStill couldn't build, recreating build system (builddir is safe).\n";
$package_opts{$module}->{'#cancel-clean'} = 1;
$package_opts{$module}->{'refresh-build'} = 1;
}
}
elsif (get_option($module, "install-after-build"))
{

Loading…
Cancel
Save