Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
baby steps towards tri-module-install.
  • Loading branch information
timo committed Mar 16, 2014
1 parent 3488b6c commit ae70436
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Configure.pl
Expand Up @@ -110,6 +110,9 @@
$config{backend_exes} = join ' ', map
{ '$(RAKUDO_DIR)/$(PERL6_' . uc(substr $_, 0, 1) . '_EXE)' }
keys %backends;
$config{backend_module_install} = join ' ', map
{ 'module-install-' . uc(substr $_, 0, 1) }

This comment has been minimized.

Copy link
@Mouq

Mouq Mar 16, 2014

Contributor

Shouldn't this be { 'module-install-' . lc(substr $_, 0, 1) }?

keys %backends;
$config{default_backend_exe} = '$(PERL6_' .
uc(substr $default_backend, 0, 1) .
'_INSTALL)';
Expand Down
24 changes: 19 additions & 5 deletions tools/build/Makefile.in
Expand Up @@ -65,11 +65,25 @@ rakudo-install: rakudo
$(CHMOD) 755 $(PERL6_EXE)
@win32_libparrot_copy@

modules-install: rakudo-install
@echo "== Installing modules"
$(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_INSTALL) $(DESTDIR)$(PERL6_LANG_DIR)/lib $(MODULES)
@echo "== Installing binaries"
$(PERL) tools/build/bin-install.pl $(PERL6_INSTALL) $(DESTDIR)$(PARROT_BIN_DIR) modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc
modules-install: @backend_modules_install@

modules-install-p:
@echo "== Installing modules for Parrot"
$(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_P_INSTALL) $(DESTDIR)$(PERL6_P_LANG_DIR)/lib pir pir $(MODULES)
@echo "== Installing binaries for Parrot"
$(PERL) tools/build/bin-install.pl $(PERL6_P_INSTALL) $(DESTDIR)$(PARROT_BIN_DIR) modules/ufo/bin/ufo-p modules/panda/bin/panda-p modules/doc/bin/p6doc-p

modules-install-j:
@echo "== Installing modules for JVM"
$(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_J_INSTALL) $(DESTDIR)$(PERL6_J_LANG_DIR)/lib jar jar $(MODULES)
@echo "== Installing binaries for JVM"
$(PERL) tools/build/bin-install.pl $(PERL6_J_INSTALL) $(DESTDIR)$(JVM_BIN_DIR) modules/ufo/bin/ufo-j modules/panda/bin/panda-j modules/doc/bin/p6doc-j

modules-install-m:
@echo "== Installing modules for MoarVM"
$(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_M_INSTALL) $(DESTDIR)$(PERL6_M_LANG_DIR)/lib moarvm mbc $(MODULES)
@echo "== Installing binaries for MoarVM"
$(PERL) tools/build/bin-install.pl $(PERL6_M_INSTALL) $(DESTDIR)$(MOAR_BIN_DIR) modules/ufo/bin/ufo-m modules/panda/bin/panda-m modules/doc/bin/p6doc-m

modules-test:
$(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_INSTALL) modules/MODULES.txt
Expand Down
5 changes: 3 additions & 2 deletions tools/build/module-install.pl
Expand Up @@ -9,6 +9,7 @@

my $perl6bin = shift @ARGV;
my $perl6lib = shift @ARGV;
my $comptarget = shift @ARGV;

my @pmfiles;
my @mod_pms;
Expand Down Expand Up @@ -76,8 +77,8 @@ sub path_to_module_name {
chdir 'rakudo';
foreach my $pm (@pmfiles) {
my $out = $pm;
$out =~ s/\.pm6?$/.pir/;
my @cmd = ($perl6bin, '--target=pir', "--output=$out", $pm);
$out =~ s/\.pm6?$/.$comptarget/;
my @cmd = ($perl6bin, "--target=$comptarget", "--output=$out", $pm);
print join(' ', @cmd), "\n";
system(@cmd);
}
Expand Down

0 comments on commit ae70436

Please sign in to comment.