On Sun Jun 15 09:52:51 2008, toddolson wrote:
> In parrot 0.6.2 make realclean fails to remove the generate
> ./src/asmfun.s
> Repeat by
> perl ./Configure.pl # generates ./src/asmfun.s
> make realclean # fails to remove ./src/asmfun.s
>
> It is not clear how to modify config/gen/makefiles/root.in to fix
> this.
Feature, not bug.
Or, at the very least, intentional.
There exist *as source code* the following two files:
[parrot] 507 $ fnsa src/jit '*\.s' | xargs ls -ltr
-rw-r--r-- 1 jimk jimk 544 Jun 16 18:10 src/jit/ppc/ppc-linux.s
-rw-r--r-- 1 jimk jimk 582 Jun 16 18:10 src/jit/ppc/asm.s
So we're only talking about PPC machines, but we're talking about either
Darwin or Linux on PPC. In the case of your Mac and mine, the relevant
file is: src/jit/ppc/asm.s.
Here's the code in config/auto/jit.pm which creates this file:
my $jitarchname = "$cpuarch-$osname";
my $sjit = "$jitbase/$cpuarch/$jitarchname.s";
my $asm = "$jitbase/$cpuarch/asm.s";
if ( -e $sjit ) {
copy_if_diff( $sjit, "src/asmfun.s" );
$conf->data->set( asmfun_o => 'src/asmfun$(O)' );
}
elsif ( -e $asm ) {
copy_if_diff( $asm, "src/asmfun.s" );
$conf->data->set( asmfun_o => 'src/asmfun$(O)' );
}
else {
$conf->data->set( asmfun_o => '' );
}
In the case of your machine, $sjit does not exist but $asm does exist.
To avoid unnecessary rebuilds, we copy $asm to src/asmfun.s only if it
has changed. Hence, we specifically do *not* want it to be removed by
'make realclean'.
(Note: This code was written by Leo between r7591 and 7597 in March
2005 -- a long time ago in Parrot years. I have no reason to believe
it's no longer valid, but it might benefit from a review by someone who
understands JIT.)
Thank you very much.
kid51