This happens for all backends. AFAIU the reason is that we have a target
m-runner-default (in the case of Moar) in our Makefile. This target is a
dependency for target all and is therefore called when executing make. But
since there is no file m-runner-default this target is considered out of date
by make and the commands are executed always. The relevant lines from
Makefile:
all: m-all m-runner-default
[...]
m-runner-default: $(M_RUNNER)
$(RM_F) perl6
-$(CP) $(M_RUNNER) perl6
-$(CHMOD) 755 perl6
I think we could get around this with using the actual executable perl6 as
the target:
M_RUNNER_DEFAULT = perl6
all: m-all $(M_RUNNER_DEFAULT)
[...]
$(M_RUNNER_DEFAULT): $(M_RUNNER)
$(RM_F) perl6
-$(CP) $(M_RUNNER) perl6
-$(CHMOD) 755 perl6
But I don't know a) if there is a reason for curren behaviour and b) if it's
worth the trouble. Looks like the functionality was added by moritz about a
year ago (for Parrot and JVM):
https://github.com/rakudo/rakudo/commit/af43daed4746b2c5678e3de82ca2926d254e6906