Skip to content

Commit

Permalink
revert using --bindir when installing panda
Browse files Browse the repository at this point in the history
We can install panda and the binaries of the Star dist into install/bin,
though when the user later installs binaries or updates panda, these would
go into install/share/perl6/site/bin by default.
Since there is currently no sane way to prevent that, we just install
non-core stuff info [...]/site/bin, and the user will have to add two paths
to PATH.
  • Loading branch information
FROGGS committed Jan 27, 2016
1 parent 8d69d3c commit 7fbfba7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
24 changes: 8 additions & 16 deletions tools/build/Makefile.in
Expand Up @@ -10,11 +10,8 @@ PREFIX_DIR = @prefix@
SDKROOT_DIR = @sdkroot@
SYSROOT_DIR = @sysroot@

# JVM install location
JVM_BIN_DIR = $(PREFIX_DIR)/bin

# MoarVM install location
MOAR_BIN_DIR = $(PREFIX_DIR)/bin
STAR_BIN_DIR = $(PREFIX_DIR)/bin
SITE_BIN_DIR = $(PREFIX_DIR)/share/perl6/site/bin

EXE = @exe@
BAT = @bat@
Expand All @@ -26,11 +23,11 @@ CHMOD = $(PERL) -MExtUtils::Command -e chmod

PERL6_J_EXE = perl6-j$(BAT)
PERL6_J_LANG_DIR = $(PREFIX_DIR)/share/perl6
PERL6_J_INSTALL = $(JVM_BIN_DIR)/$(PERL6_J_EXE)
PERL6_J_INSTALL = $(STAR_BIN_DIR)/$(PERL6_J_EXE)

PERL6_M_EXE = perl6-m$(BAT)
PERL6_M_LANG_DIR = $(PREFIX_DIR)/share/perl6
PERL6_M_INSTALL = $(MOAR_BIN_DIR)/$(PERL6_M_EXE)
PERL6_M_INSTALL = $(STAR_BIN_DIR)/$(PERL6_M_EXE)

PERL6_EXE = perl6$(EXE)

Expand Down Expand Up @@ -59,18 +56,13 @@ modules-install: @backend_modules_install@

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) j modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc
$(PERL) tools/build/bin-install.pl $(PERL6_J_INSTALL) $(DESTDIR)$(JVM_BIN_DIR) j modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc-index
$(MKPATH) $(DESTDIR)$(PERL6_J_LANG_DIR)/site/panda/
$(CP) install/share/perl6/site/panda/projects.json $(DESTDIR)$(PERL6_J_LANG_DIR)/site/panda/
$(CP) install/share/perl6/site/panda/state $(DESTDIR)$(PERL6_J_LANG_DIR)/site/panda/
cd modules/panda && $(DESTDIR)$(PERL6_J_INSTALL) bootstrap.pl
$(PERL) tools/build/module-install.pl $(PERL6_J_INSTALL) $(DESTDIR)$(SITE_BIN_DIR)/panda-m $(MODULES)

modules-install-m:
@echo "== Installing modules for MoarVM"
cd modules/panda && $(DESTDIR)$(PERL6_M_INSTALL) bootstrap.pl --bin-prefix=$(DESTDIR)$(MOAR_BIN_DIR)
$(PERL) tools/build/module-install.pl $(PERL6_M_INSTALL) $(DESTDIR)$(MOAR_BIN_DIR)/panda-m $(DESTDIR)$(MOAR_BIN_DIR) $(MODULES)
cd modules/panda && $(DESTDIR)$(PERL6_M_INSTALL) bootstrap.pl
$(PERL) tools/build/module-install.pl $(PERL6_M_INSTALL) $(DESTDIR)$(SITE_BIN_DIR)/panda-m $(MODULES)

modules-test: @backend_modules_test@
verbose-modules-test: @backend_modules_test@
Expand Down
3 changes: 1 addition & 2 deletions tools/build/module-install.pl
Expand Up @@ -4,14 +4,13 @@
use strict;
my $perl6bin = shift @ARGV;
my $pandabin = shift @ARGV;
my $bindir = shift @ARGV;

my $exit = 0;

while (<>) {
next if /^\s*(#|$)/;
my ($module) = /(\S+)/;
$exit ||= system $perl6bin, $pandabin, '--force', "--bin-prefix=$bindir", "install", "modules/$module";
$exit ||= system $perl6bin, $pandabin, '--force', "install", "modules/$module";
}

exit $exit;

0 comments on commit 7fbfba7

Please sign in to comment.