[svn:parrot] r36210 - in trunk/config/gen: . config_pm
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Sat Jan 31 19:09:58 UTC 2009
Author: fperrad
Date: Sat Jan 31 19:09:57 2009
New Revision: 36210
URL: https://trac.parrot.org/parrot/changeset/36210
Log:
[configure] update the generation of config_lib.pasm
- detabify
- rename template
- more standard header
Added:
trunk/config/gen/config_pm/config_lib_pasm.in
- copied, changed from r36201, trunk/config/gen/config_pm/config_lib.in
Deleted:
trunk/config/gen/config_pm/config_lib.in
Modified:
trunk/config/gen/config_pm.pm
Modified: trunk/config/gen/config_pm.pm
==============================================================================
--- trunk/config/gen/config_pm.pm Sat Jan 31 18:39:56 2009 (r36209)
+++ trunk/config/gen/config_pm.pm Sat Jan 31 19:09:57 2009 (r36210)
@@ -32,7 +32,7 @@
$data{templates} = {
myconfig => 'config/gen/config_pm/myconfig.in',
Config_pm => 'config/gen/config_pm/Config_pm.in',
- config_lib => 'config/gen/config_pm/config_lib.in',
+ config_lib => 'config/gen/config_pm/config_lib_pasm.in',
};
return \%data;
}
@@ -83,28 +83,30 @@
open( $OUT, ">", $c_l_pasm ) or die "Can't open $c_l_pasm: $!";
print {$OUT} <<"END";
-# Generated by config/gen/config_pm.pm from the template
-# '$template' and \%PConfig
+# ex: set ro:
+# DO NOT EDIT THIS FILE
+# Generated by $pkg from $template and \%PConfig
# This file should be the last thing run during
# the make process, after Parrot is built.
+
END
while (<$IN>) {
- if (/<<PCONFIG>>/) {
+ if (/\@PCONFIG\@/) {
my $k;
for $k ( sort { lc $a cmp lc $b || $a cmp $b } $conf->data->keys ) {
my $v = $conf->data->get($k);
if ( defined $v ) {
$v =~ s/(["\\])/\\$1/g;
$v =~ s/\n/\\n/g;
- print {$OUT} qq(\tset P0["$k"], "$v"\n);
+ print {$OUT} qq( set P0["$k"], "$v"\n);
}
else {
- print {$OUT} qq(\tset P0["$k"], P1\n);
+ print {$OUT} qq( set P0["$k"], P1\n);
}
}
}
- elsif (s/<<PWD>>/cwd/e) {
+ elsif (s/\@PWD\@/cwd/e) {
print {$OUT} $_;
}
else {
Deleted: trunk/config/gen/config_pm/config_lib.in
==============================================================================
--- trunk/config/gen/config_pm/config_lib.in Sat Jan 31 19:09:57 2009 (r36209)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,21 +0,0 @@
-.pcc_sub main:
- get_params "(0)", P5
- set I10, P5 # argv
- set I11, 0 # flag
- le I10, 1, no_arg
- set S10, P5[1]
- ne S10, "--install", no_arg
- set I11, 1 # install flag
-no_arg:
- new P0, 'Hash'
- new P1, 'Undef'
-
- <<PCONFIG>>
-
- if I11, is_install
- set S1, "<<PWD>>"
- set P0["prefix"], S1
-is_install:
- freeze S0, P0
- print S0
- end
Copied and modified: trunk/config/gen/config_pm/config_lib_pasm.in (from r36201, trunk/config/gen/config_pm/config_lib.in)
==============================================================================
--- trunk/config/gen/config_pm/config_lib.in Sat Jan 31 15:27:58 2009 (r36201, copy source)
+++ trunk/config/gen/config_pm/config_lib_pasm.in Sat Jan 31 19:09:57 2009 (r36210)
@@ -1,21 +1,21 @@
.pcc_sub main:
- get_params "(0)", P5
- set I10, P5 # argv
- set I11, 0 # flag
- le I10, 1, no_arg
- set S10, P5[1]
- ne S10, "--install", no_arg
- set I11, 1 # install flag
+ get_params "(0)", P5
+ set I10, P5 # argv
+ set I11, 0 # flag
+ le I10, 1, no_arg
+ set S10, P5[1]
+ ne S10, "--install", no_arg
+ set I11, 1 # install flag
no_arg:
- new P0, 'Hash'
- new P1, 'Undef'
+ new P0, 'Hash'
+ new P1, 'Undef'
- <<PCONFIG>>
+ @PCONFIG@
- if I11, is_install
- set S1, "<<PWD>>"
- set P0["prefix"], S1
+ if I11, is_install
+ set S1, "@PWD@"
+ set P0["prefix"], S1
is_install:
- freeze S0, P0
- print S0
- end
+ freeze S0, P0
+ print S0
+ end
More information about the parrot-commits
mailing list