Skip to content
Permalink
Browse files

Fix for 'Missing or wrong version of dependency'

source_digest macro was incorrectly registered.

Improved moar/Makefile to rebuild main-version.nqp and main.nqp when
necessary.
  • Loading branch information...
vrurg committed May 17, 2019
1 parent 8d14502 commit caae6e33f60729e036eef5b63244d0f2801f5b2d
@@ -6,7 +6,6 @@ package NQP::Config::Rakudo;
use Cwd;
use POSIX qw<strftime>;
use Digest::SHA;
use File::Find;
use NQP::Config qw<slurp read_config cmp_rev system_or_die run_or_die>;
use IPC::Cmd qw<run>;
use NQP::Macros;
@@ -473,6 +472,7 @@ sub gen_nqp {
package NQP::Macros::Rakudo;
use strict;
use warnings;
use File::Find;

# --- Rakudo-specific macro methods.
sub _specs_iterate {
@@ -560,7 +560,7 @@ sub _m_source_digest {

NQP::Macros->register_macro( 'for_specs', \&_m_for_specs );
NQP::Macros->register_macro( 'for_specmods', \&_m_for_specmods );
NQP::Macros->register_macro( 'source_digest', \&_m_for_specmods );
NQP::Macros->register_macro( 'source_digest', \&_m_source_digest );

1;

@@ -16,7 +16,7 @@ PREFIX = @nfp(@prefix@)@
LIBDIR = @nfp(@libdir@)@
NQP_HOME = $(LIBDIR)@nfp(/nqp)@
PERL6_HOME = $(LIBDIR)@nfp(/perl6)@
BASE_DIR = @base_dir@
BASE_DIR = @@base_dir@@

BOOTSTRAP_SOURCES = \
@nfp(src/Perl6/Metamodel/BOOTSTRAP.nqp)@ \
@@ -25,4 +25,12 @@ BOOTSTRAP_SOURCES = \
COMMON_BOOTSTRAP_SOURCES = \
@insert_filelist(common_bootstrap_sources)@

NQP_CONF_DIR = @@nfp($(BASE_DIR)/3rdparty/nqp-configure/lib)@@

CONFIGURE_SOURCES = \
@nfp($(BASE_DIR)/Configure.pl)@ \
@nfp($(BASE_DIR)/tools/lib/NQP/Config/Rakudo.pm)@ \
@nfp($(NQP_CONF_DIR)/NQP/Config.pm)@ \
@nfp($(NQP_CONF_DIR)/NQP/Macros.pm)@

R_SETTING_SRC = @nfp(src/RESTRICTED.setting)@
@@ -166,9 +166,13 @@ $(PERL6_C_MOAR): @nfp(src/Perl6/Compiler.nqp)@ $(PERL6_O_MOAR)
$(M_NQP) --module-path=blib --target=mbc --output=$(PERL6_C_MOAR) \
@nfp(src/Perl6/Compiler.nqp)@

$(PERL6_MOAR): @nfp(src/main.nqp)@ $(PERL6_G_MOAR) $(PERL6_A_MOAR) $(PERL6_C_MOAR) $(PERL6_P_MOAR) $(M_METAMODEL_SOURCES) $(M_BOOTSTRAP_SOURCES) $(M_CORE_SOURCES)@for_specs( $(M_CORE_@ucspec@_SOURCES))@
@@nfp($(M_BUILD_DIR)/main-version.nqp)@@: @@template(main-version)@@ $(CONFIGURE_SOURCES) $(M_METAMODEL_SOURCES) $(M_BOOTSTRAP_SOURCES) $(M_CORE_SOURCES)@for_specs( $(M_CORE_@ucspec@_SOURCES))@
$(CONFIGURE) --expand main-version --out @nfpq($(M_BUILD_DIR)/main-version.nqp)@

@@nfp($(M_BUILD_DIR)/main.nqp)@@: @@nfp($(M_BUILD_DIR)/main-version.nqp)@@ @@nfp($(BASE_DIR)/src/main.nqp)@@
$(M_NQP) $(M_GEN_CAT) @nfpl(src/main.nqp $(M_BUILD_DIR)/main-version.nqp > $(M_BUILD_DIR)/main.nqp)@

$(PERL6_MOAR): @@nfp($(M_BUILD_DIR)/main.nqp)@@ $(PERL6_G_MOAR) $(PERL6_A_MOAR) $(PERL6_C_MOAR) $(PERL6_P_MOAR)
$(M_NQP) --module-path=blib --target=mbc --output=$(PERL6_MOAR) \
--vmlibs=$(M_PERL6_OPS_DLL)=Rakudo_ops_init @nfpq($(M_BUILD_DIR)/main.nqp)@

0 comments on commit caae6e3

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