Permalink
Browse files

- make tools/spectcl a generated file to track parrot location

- move all .in files to config/misc.



git-svn-id: http://partcl.googlecode.com/svn/trunk@441 6cb8db7d-f34b-0410-8f57-4f83c6281724
  • Loading branch information...
1 parent ba8e446 commit c741adc9e59e6ec83203be3114f5ce5753768129 wcoleda committed Jun 8, 2009
View
29 Configure.pl
@@ -39,8 +39,8 @@
my %makefiles = (
"config/makefiles/root.in" => "Makefile",
- "config/makefiles/pmc.in" => "src/pmc/Makefile",
- "config/makefiles/ops.in" => "src/ops/Makefile",
+ "config/makefiles/pmc.in" => "src/pmc/Makefile",
+ "config/makefiles/ops.in" => "src/ops/Makefile",
);
foreach my $template (keys %makefiles) {
@@ -63,9 +63,10 @@
print "Generating miscellaneous files\n";
my $parrot = "$bindir/parrot";
-add_shebang($parrot, "t/internals/select_switches.t", "t/internals/select_switches_t.in");
-add_shebang($parrot, "t/internals/select_option.t", "t/internals/select_option_t.in");
-
+add_shebang($parrot, 't/internals/select_switches.t', 'config/misc/select_switches_t.in');
+add_shebang($parrot, 't/internals/select_option.t', 'config/misc/select_option_t.in');
+replace_parrot($parrot, 'tools/spectcl', 'config/misc/spectcl.in');
+chmod 0755, 'tools/spectcl';
print <<"END";
@@ -98,3 +99,21 @@ sub add_shebang {
print {$ofh} $shebang, "\n";
print {$ofh} $contents;
}
+
+# This is like gen_makefiles, but that adds an inappropriate header.
+sub replace_parrot {
+ my $exe = shift;
+ my $target = shift;
+ my $source = shift;
+
+ my $contents;
+ {
+ local undef $/;
+ open my $fh, '<', $source;
+ $contents = <$fh>;
+ }
+ $contents =~ s/\@parrot\@/$exe/g;
+
+ open my $ofh, '>', $target;
+ print {$ofh} $contents;
+}
View
0 t/internals/select_option_t.in → config/misc/select_option_t.in
File renamed without changes.
View
0 t/internals/select_switches_t.in → config/misc/select_switches_t.in
File renamed without changes.
View
2 tools/spectcl → config/misc/spectcl.in
@@ -4,5 +4,5 @@
for spec in $@; do
echo $spec.test
- time ../../parrot tcl.pbc t_tcl/$spec.test 2>&1 | tee $spec.results
+ time @parrot@ tcl.pbc t_tcl/$spec.test 2>&1 | tee $spec.results
done

0 comments on commit c741adc

Please sign in to comment.