Skip to content

Commit

Permalink
Merge pull request #581 from xenu/nom
Browse files Browse the repository at this point in the history
Fix "nmake clean"
  • Loading branch information
jnthn committed Nov 12, 2015
2 parents 3d7f846 + 196c5ed commit 92f9039
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 23 deletions.
14 changes: 8 additions & 6 deletions Configure.pl
Expand Up @@ -9,7 +9,7 @@
use File::Spec;
use Cwd;
use lib 'tools/lib';
use NQP::Configure qw(sorry slurp cmp_rev gen_nqp read_config
use NQP::Configure qw(sorry slurp cmp_rev gen_nqp read_config
fill_template_text fill_template_file
system_or_die verify_install);

Expand Down Expand Up @@ -154,16 +154,18 @@
open my $MAKEFILE, '>', 'Makefile'
or die "Cannot open 'Makefile' for writing: $!";

my @prefixes = map substr($_, 0, 1), @backends;

print $MAKEFILE "\n# Makefile code generated by Configure.pl:\n";

fill_template_file('tools/build/Makefile-common-macros.in', $MAKEFILE, %config);

my @prefixes = map substr($_, 0, 1), @backends;

my $launcher = substr($default_backend, 0, 1) . '-runner-default';
print $MAKEFILE "all: ", join(' ', map("$_-all", @prefixes), $launcher), "\n";
print $MAKEFILE "install: ", join(' ', map("$_-install", @prefixes), $launcher . '-install'), "\n";

print $MAKEFILE "clean: ", join(' ', map "$_-clean", @prefixes), "\n";
print $MAKEFILE "\t\$(RM_F) perl6\$(EXE) perl6\$(BAT)\n\n";
print $MAKEFILE "\t\$(RM_F) perl6", $config{'runner_suffix'},"\n\n";

for my $t (qw/test spectest coretest localtest stresstest/) {
print $MAKEFILE "$t: ", join(' ', map "$_-$t", @prefixes), "\n";
Expand All @@ -181,7 +183,7 @@
$config{$target} = join '', @lines;
}

fill_template_file('tools/build/Makefile-common.in', $MAKEFILE, %config);
fill_template_file('tools/build/Makefile-common-rules.in', $MAKEFILE, %config);

# determine the version of NQP we want
my ($nqp_want) = split(' ', slurp('tools/build/NQP_REVISION'));
Expand Down Expand Up @@ -259,7 +261,7 @@
print "Using $config{m_nqp} (version $nqp_config{'nqp::version'} / MoarVM $nqp_config{'moar::version'}).\n";

$config{'perl6_ops_dll'} = sprintf($nqp_config{'moar::dll'}, 'perl6_ops_moar');

# Add moar library to link command
# TODO: Get this from Moar somehow
$config{'moarimplib'} = $win || $^O eq 'darwin'
Expand Down
@@ -1,4 +1,4 @@
# Copyright (C) 2006-2013, The Perl Foundation.
# Copyright (C) 2015 The Perl Foundation

PERL = @perl@
PROVE = prove
Expand All @@ -21,19 +21,3 @@ COMMON_BOOTSTRAP_SOURCES = \
@common_bootstrap_sources@

R_SETTING_SRC = src/RESTRICTED.setting

spectest_checkout : t/spec
t/spec :
git clone git://github.com/perl6/roast.git t/spec
-cd t/spec/ && git config remote.origin.pushurl git@github.com:perl6/roast.git

spectest_update :
-cd t/spec && git pull

t/localtest.data:
$(PERL) -MExtUtils::Command -e test_f $@

realclean: clean
$(RM_F) Makefile config.status MANIFEST

distclean: realclean
17 changes: 17 additions & 0 deletions tools/build/Makefile-common-rules.in
@@ -0,0 +1,17 @@
# Copyright (C) 2015 The Perl Foundation

spectest_checkout : t/spec
t/spec :
git clone git://github.com/perl6/roast.git t/spec
-cd t/spec/ && git config remote.origin.pushurl git@github.com:perl6/roast.git

spectest_update :
-cd t/spec && git pull

t/localtest.data:
$(PERL) -MExtUtils::Command -e test_f $@

realclean: clean
$(RM_F) Makefile config.status MANIFEST

distclean: realclean

0 comments on commit 92f9039

Please sign in to comment.