Skip to content
Permalink
Browse files

First working implementation of Configure

Macro-based makefiles, OO-based configuration subsystem.
  • Loading branch information...
vrurg committed Mar 29, 2019
1 parent cdd2a7f commit 3627de6d68b3563196ec500881dc135ce97d9cc4

Large diffs are not rendered by default.

@@ -23,6 +23,6 @@ BOOTSTRAP_SOURCES = \
src/Perl6/Metamodel/EXPORTHOW.nqp \

COMMON_BOOTSTRAP_SOURCES = \
@common_bootstrap_sources@
@insert_filelist(common_bootstrap_sources)@

R_SETTING_SRC = src/RESTRICTED.setting
@@ -2,8 +2,8 @@

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
git clone @roast_pull_url@ t/spec
-cd t/spec/ && git config remote.origin.pushurl @roast_push_url@

spectest_update :
-cd t/spec && git pull --ff-only
@@ -0,0 +1,2 @@

@fixup(@include_capture(@js_nqp@ @nfp(tools/build/gen-cat.nqp)@)@)@
File renamed without changes.
@@ -40,6 +40,7 @@ PERL6_M_MOAR = blib/Perl6/Metamodel.moarvm
PERL6_B_MOAR = blib/Perl6/BOOTSTRAP.moarvm
SETTING_MOAR = CORE.setting.moarvm
SETTING_D_MOAR = CORE.d.setting.moarvm
SETTING_E_MOAR = CORE.e.setting.moarvm
R_SETTING_MOAR = RESTRICTED.setting.moarvm

M_PERL6_OPS_DIR = dynext
@@ -67,9 +68,9 @@ M_BOOTSTRAP_SOURCES = $(BOOTSTRAP_SOURCES) src/vm/moar/spesh-plugins.nqp
# the compiler will instantiate/call methods on while compiling the
# setting - basically anything that feels MOP-ish.
M_CORE_SOURCES = \
@moar_core_sources@
@insert_filelist(moar_core_sources)@
M_CORE_D_SOURCES = \
@moar_core_d_sources@
@insert_filelist(moar_core_d_sources)@

PERL6_DEBUG_MOAR = perl6-debug.moarvm
M_BAT_DEBUG_RUNNER = perl6-debug-m@runner_suffix@
@@ -82,6 +83,7 @@ M_CLEANUPS = \
blib/Perl6/*.moarvm \
$(SETTING_MOAR) \
$(SETTING_D_MOAR) \
$(SETTING_E_MOAR) \
$(R_SETTING_MOAR) \
$(PERL6_MOAR) \
rakudo_test_run.tar.gz \
@@ -107,7 +109,7 @@ M_HARNESS6_WITH_FUDGE = $(M_HARNESS6) --fudge

M_RUN_CLEAN_TARGET_FILES = $(M_RUN_PERL6) -e "for @*ARGS.head(*-1) { given (@*ARGS[*-1] ~ '/' ~ .IO.basename.Str) { say 'rm -f ' ~ .Str; .IO.unlink if .IO.e } }"

m-all: check_nqp_version $(PERL6_MOAR) $(SETTING_MOAR) $(SETTING_D_MOAR) $(R_SETTING_MOAR) $(M_BAT_RUNNER) $(PERL6_DEBUG_MOAR) $(M_BAT_DEBUG_RUNNER) $(M_C_RUNNER) $(M_C_DEBUG_RUNNER) @m_all@
m-all: check_nqp_version $(PERL6_MOAR) $(SETTING_MOAR) $(SETTING_D_MOAR) $(SETTING_E_MOAR) $(R_SETTING_MOAR) $(M_BAT_RUNNER) $(PERL6_DEBUG_MOAR) $(M_BAT_DEBUG_RUNNER) $(M_C_RUNNER) $(M_C_DEBUG_RUNNER) @m_all@

check_nqp_version: tools/build/check-nqp-version.pl
$(PERL5) tools/build/check-nqp-version.pl $(M_NQP)
@@ -161,7 +163,7 @@ $(PERL6_C_MOAR): src/Perl6/Compiler.nqp $(PERL6_O_MOAR)
$(M_NQP) --module-path=blib --target=mbc --output=$(PERL6_C_MOAR) \
src/Perl6/Compiler.nqp

$(PERL6_MOAR): src/main.nqp $(PERL6_G_MOAR) $(PERL6_A_MOAR) $(PERL6_C_MOAR) $(PERL6_P_MOAR) $(M_METAMODEL_SOURCES) $(M_BOOTSTRAP_SOURCES) $(M_CORE_SOURCES) $(M_CORE_D_SOURCES)
$(PERL6_MOAR): src/main.nqp $(PERL6_G_MOAR) $(PERL6_A_MOAR) $(PERL6_C_MOAR) $(PERL6_P_MOAR) $(M_METAMODEL_SOURCES) $(M_BOOTSTRAP_SOURCES) $(M_CORE_SOURCES) $(M_CORE_D_SOURCES) $(M_CORE_E_SOURCES)
$(PERL5) tools/build/gen-version.pl $(PREFIX) $(LIBDIR) > $(M_BUILD_DIR)/main-version.nqp
$(M_NQP) $(M_GEN_CAT) src/main.nqp $(M_BUILD_DIR)/main-version.nqp > $(M_BUILD_DIR)/main.nqp
$(M_NQP) --module-path=blib --target=mbc --output=$(PERL6_MOAR) \
@@ -187,6 +189,11 @@ $(SETTING_D_MOAR): $(PERL6_MOAR) $(PERL6_B_MOAR) $(SETTING_MOAR) $(M_CORE_D_SOUR
@echo "The following step can take a long time, please be patient."
$(M_RUN_PERL6) --setting=NULL.d --ll-exception --optimize=3 --target=mbc --stagestats --output=$(SETTING_D_MOAR) $(M_BUILD_DIR)/CORE.d.setting

$(SETTING_E_MOAR): $(PERL6_MOAR) $(PERL6_B_MOAR) $(SETTING_MOAR) $(M_CORE_E_SOURCES)
$(M_NQP) $(M_GEN_CAT) -f tools/build/moar_core_d_sources > $(M_BUILD_DIR)/CORE.e.setting
@echo "The following step can take a long time, please be patient."
$(M_RUN_PERL6) --setting=NULL.e --ll-exception --optimize=3 --target=mbc --stagestats --output=$(SETTING_E_MOAR) $(M_BUILD_DIR)/CORE.e.setting

$(R_SETTING_MOAR): $(PERL6_MOAR) $(SETTING_MOAR) $(R_SETTING_SRC) $(SETTING_MOAR)
$(M_RUN_PERL6) --target=mbc --ll-exception --output=$(R_SETTING_MOAR) $(R_SETTING_SRC)

@@ -319,9 +326,9 @@ m-install: m-all tools/build/create-moar-runner.p6 tools/build/install-core-dist
$(CP) $(M_PERL6_LANG_OUTPUT) $(DESTDIR)$(M_LIBPATH)/Perl6
$(MKPATH) $(DESTDIR)$(PERL6_HOME)/lib
$(MKPATH) $(DESTDIR)$(PERL6_HOME)/runtime
$(M_RUN_CLEAN_TARGET_FILES) $(SETTING_MOAR) $(SETTING_D_MOAR) $(R_SETTING_MOAR) $(DESTDIR)$(PERL6_HOME)/runtime
$(M_RUN_CLEAN_TARGET_FILES) $(SETTING_MOAR) $(SETTING_D_MOAR) $(SETTING_E_MOAR) $(R_SETTING_MOAR) $(DESTDIR)$(PERL6_HOME)/runtime
$(M_RUN_CLEAN_TARGET_FILES) $(PERL6_MOAR) $(PERL6_DEBUG_MOAR) $(DESTDIR)$(PERL6_HOME)/runtime
$(CP) $(SETTING_MOAR) $(SETTING_D_MOAR) $(R_SETTING_MOAR) $(DESTDIR)$(PERL6_HOME)/runtime
$(CP) $(SETTING_MOAR) $(SETTING_D_MOAR) $(SETTING_E_MOAR) $(R_SETTING_MOAR) $(DESTDIR)$(PERL6_HOME)/runtime
$(CP) $(PERL6_MOAR) $(PERL6_DEBUG_MOAR) $(DESTDIR)$(PERL6_HOME)/runtime
$(MKPATH) $(DESTDIR)$(PERL6_HOME)/runtime/dynext
$(CP) $(M_PERL6_OPS_DLL) $(DESTDIR)$(PERL6_HOME)/runtime/dynext
@@ -0,0 +1,25 @@
# Template Makefile

@include(@@nfp(Makefile-common-macros)@@)@

LAUNCHER = @default_prefix@-runner-default

all: @bprefixes_with(-all)@ $(LAUNCHER)

install: @bprefixes_with(-install)@ $(LAUNCHER)-install

clean: @bprefixes_with(-clean)@ $(LAUNCHER)-clean
$(RM_F) perl6@runner_suffix@

test: @bprefixes_with(-test$(HARNESS_TYPE))@
spectest: @bprefixes_with(-spectest$(HARNESS_TYPE))@
coretest: @bprefixes_with(-coretest$(HARNESS_TYPE))@
localtest: @bprefixes_with(-localtest$(HARNESS_TYPE))@
stresstest: @bprefixes_with(-stresstest$(HARNESS_TYPE))@

@include(Makefile-common-rules)@

@include_with_backends(Makefile)@

t/*/*.t t/*.t t/*/*/*.t: all
$(@uc(@default_prefix@)@_HARNESS5_WITH_FUDGE) --verbosity=1 $@
@@ -0,0 +1,3 @@
src/core.d/core_prologue.pm6
src/core.d/await.pm6
src/core.d/operators.pm6

0 comments on commit 3627de6

Please sign in to comment.
You can’t perform that action at this time.