From 196c5edb94dc00e4c4c4dff57fef7c746ba25520 Mon Sep 17 00:00:00 2001 From: Tomasz Konojacki Date: Thu, 12 Nov 2015 00:46:24 +0100 Subject: [PATCH] fix nmake clean --- Configure.pl | 14 ++++++++------ ...ile-common.in => Makefile-common-macros.in} | 18 +----------------- tools/build/Makefile-common-rules.in | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 23 deletions(-) rename tools/build/{Makefile-common.in => Makefile-common-macros.in} (58%) create mode 100644 tools/build/Makefile-common-rules.in diff --git a/Configure.pl b/Configure.pl index 59eb0985ac8..cb1edba9ba8 100644 --- a/Configure.pl +++ b/Configure.pl @@ -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); @@ -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"; @@ -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')); @@ -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' diff --git a/tools/build/Makefile-common.in b/tools/build/Makefile-common-macros.in similarity index 58% rename from tools/build/Makefile-common.in rename to tools/build/Makefile-common-macros.in index cab8c8ad5db..8bb2a97f554 100644 --- a/tools/build/Makefile-common.in +++ b/tools/build/Makefile-common-macros.in @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2013, The Perl Foundation. +# Copyright (C) 2015 The Perl Foundation PERL = @perl@ PROVE = prove @@ -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 diff --git a/tools/build/Makefile-common-rules.in b/tools/build/Makefile-common-rules.in new file mode 100644 index 00000000000..a59365bcf1a --- /dev/null +++ b/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