summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorThomas Collerton <tom.coll91@gmail.com>2012-03-02 20:21:59 +0100
committerTor Lillqvist <tml@iki.fi>2012-03-05 10:41:25 +0200
commit0847fd63d773732ff3e441ef868957c55760d69a (patch)
treebe54398df0f08842ba269d0bf3662944fb74bdb1 /autogen.sh
parentab6273ecece70432f3da35807b5484d9bfe91fdd (diff)
Improvement to fdo#46565
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index 2133d075800e..2935619b3f80 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -146,7 +146,12 @@ if (defined $ENV{NOCONFIGURE}) {
if (scalar(@cmdline_args) > 0) {
# if there's already an autogen.lastrun, make a backup first
if (-e "autogen.lastrun") {
- system("cp autogen.lastrun autogen.lastrun.bak");
+ open (my $fh, "autogen.lastrun") || warn "can't open autogen.lastrun. \n";
+ open (BAK, ">autogen.lastrun.bak") || warn "can't create backup file. \n";
+ while (<$fh>) {
+ print BAK;
+ }
+ close (BAK) && close ($fh);
}
# print "writing args to autogen.lastrun\n";
my $fh;
@@ -159,7 +164,8 @@ if (defined $ENV{NOCONFIGURE}) {
}
elsif ( ! -e "autogen.lastrun")
{
- system("touch autogen.lastrun");
+ open (my $fh, ">autogen.lastrun") || die "can't create autogen.lastrun";
+ close ($fh);
}
print "running ./configure with '" . join ("' '", @args), "'\n";
system ("./configure", @args) && die "Error running configure";