Skip to content

Commit 978c680

Browse files
committed
simplfy toqast rebuild
1 parent 9906490 commit 978c680

File tree

2 files changed

+13
-25
lines changed

2 files changed

+13
-25
lines changed

build-scripts/rebuild-toqast.pl

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,19 @@
66
use autodie;
77
use Data::Dumper;
88

9-
chdir glob '~';
9+
my $home = glob('~');
10+
my $qhome = "$home/toqast";
1011

11-
my $home = glob('~') . '/';
12-
my @dirs = qw(toqast-inst1 toqast-inst2);
13-
my %swap = (@dirs, reverse(@dirs));
1412

15-
my $link = 'toqast-inst';
16-
17-
my $now = readlink $link;
18-
my $other = $swap{$now};
19-
20-
say "Other: '$other'";
21-
chdir "${home}toqast/parrot";
13+
chdir "$qhome/parrot";
2214
system('git', 'pull');
23-
chdir "${home}toqast/nqp";
15+
chdir "$qhome/nqp";
16+
system('git', 'checkout', 'toqast');
2417
system('git', 'pull');
25-
chdir "${home}toqast";
18+
chdir $qhome;
2619
system('git', 'pull');
2720

28-
my $revision_file = "$home$other/rakudo-revision";
21+
my $revision_file = "$qhome/rakudo-revision";
2922
eval {
3023
open my $fh, '<', $revision_file or break;
3124
my $r = <$fh>;
@@ -40,20 +33,15 @@
4033
}
4134
};
4235

43-
chdir "${home}toqast/parrot";
44-
system($^X, 'Configure.pl', "--prefix=$home$other", '--optimize');
36+
chdir "$qhome/parrot";
37+
system($^X, 'Configure.pl', "--prefix=$qhome/install", '--optimize');
4538
system('make', 'install')
4639
and die $?;
47-
chdir "${home}toqast/nqp";
48-
system($^X, 'Configure.pl', '--with-parrot=../parrot/parrot');
40+
chdir "$qhome/nqp";
41+
system($^X, 'Configure.pl', '--with-parrot=$home/install/bin/parrot');
4942
system('make', 'install') and die $?;
5043
chdir "${home}toqast";
51-
system($^X, 'Configure.pl', "--gen-parrot");
44+
system($^X, 'Configure.pl');
5245
system('make', 'install') and die $?;
53-
system('cp', '-r', <install/*>, "$home$other");
5446
system("git rev-parse HEAD | cut -b 1,2,3,4,5,6 > $revision_file") and warn $?;
5547

56-
chdir $home;
57-
unlink $link;
58-
symlink $other, $link;
59-

sync.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
my %dirs = (
77
rakudo => [qw/p1 p2 p/, ''],
88
nom => [qw/nom-inst1 nom-inst2 nom-inst/, ''],
9-
toqast => [qw/toqast-inst1 toqast-inst2 toqast-inst/, ''],
9+
toqast => [qw/toqast/, ''],
1010
niecza => [qw/niecza/, ''],
1111
pugs => [qw!Pugs.hs/Pugs/ Pugs.hs/Pugs/!],
1212
std => [qw!std/snap/ std/snap/!],

0 commit comments

Comments
 (0)