summaryrefslogtreecommitdiff
path: root/infrastructure/makedistribution.pl.in
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2008-02-02 08:31:52 +0100
committerReinhard Tartler <siretart@tauware.de>2008-02-02 08:31:52 +0100
commit2787035d98661881477d696403ca2a78b49322d5 (patch)
tree0a018e13726a0232332ac23565e1a7df32cdcc06 /infrastructure/makedistribution.pl.in
parent2733267954e91e394fbb512ea3abb4c497c0752f (diff)
import version 0.11rc2
This commit has been made by 'bzr import'. I used the upstream tarball of Version 0.11rc2 for creating it. It has the md5sum: 68052f963a944c717a50bd65a54375ff
Diffstat (limited to 'infrastructure/makedistribution.pl.in')
-rwxr-xr-xinfrastructure/makedistribution.pl.in29
1 files changed, 20 insertions, 9 deletions
diff --git a/infrastructure/makedistribution.pl.in b/infrastructure/makedistribution.pl.in
index 314259f6..2ef8b960 100755
--- a/infrastructure/makedistribution.pl.in
+++ b/infrastructure/makedistribution.pl.in
@@ -1,5 +1,5 @@
-#!/usr/bin/perl
#!@PERL@
+
use strict;
use Symbol;
@@ -82,11 +82,11 @@ sub copy_from_list
my $list = $_[0];
open LIST,$list or die "Can't open $list";
- while(<LIST>)
+ while(my $line = <LIST>)
{
- next unless m/\S/;
- chomp;
- my ($src,$dst) = split /\s+/;
+ next unless $line =~ m/\S/;
+ chomp $line;
+ my ($src,$dst,$other) = split /\s+/, $line;
$dst = $src if $dst eq '';
if($src eq 'MKDIR')
{
@@ -95,8 +95,16 @@ sub copy_from_list
}
elsif($src eq 'NO-LICENSE-IN-DIR')
{
+ my ($junk,$spec) = split /\s+/, $line;
# record that this directory shouldn't have the license added
$no_license_dir{$dst} = 1;
+
+ # actually copy it, to remove redundancy in manifests
+ $src = $dst;
+ $dst = $other;
+ $dst = $src if $dst eq '';
+ $modules_included{$spec} = 1;
+ copy_dir($src,$dst);
}
elsif($src eq 'REPLACE-VERSION-IN')
{
@@ -108,16 +116,17 @@ sub copy_from_list
}
elsif($src eq 'RUN')
{
- print "Running $dst...\n";
- if(system($dst) != 0)
+ my ($junk,$cmd) = split /\s+/, $line, 2;
+ print "Running $cmd...\n";
+ if(system($cmd) != 0)
{
- print "Error running $dst. Aborting.\n";
+ print "Error running $cmd. Aborting.\n";
exit(1);
}
}
elsif(-d $src)
{
- $modules_included{$_} = 1;
+ $modules_included{$line} = 1;
copy_dir($src,$dst);
}
else
@@ -322,6 +331,8 @@ sub copy_dir
next if m/\A_/;
next if m/\AMakefile\Z/;
next if m/\Aautogen/;
+ next if m/-smf-method\Z/; # copy only the .in versions
+ next if m/-manifest.xml\Z/; # copy onlt the .in versions
next if !-f "$dir/$_";
copy_file("$dir/$_","$dst_dir/$_");