Skip to content

Commit

Permalink
Fix build with --all-static
Browse files Browse the repository at this point in the history
This fixes #11
  • Loading branch information
michaelforney committed Oct 30, 2014
1 parent 1708c5b commit f1d50a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ nonxs_tgt = $(patsubst %,%/pm_to_blib,$(nonxs_ext))
disabled_dynamic_tgt = $(patsubst %,%/pm_to_blib,$(disabled_dynamic_ext))
disabled_nonxs_tgt = $(patsubst %,%/pm_to_blib,$(disabled_nonxs_ext))
# perl module names for static mods
static_pmn = $(shell echo $(static_ext) | sed -e 's!\(cpan\|ext\|dist\)/!!g' -e 's/-/::/g')
static_pmn = $(shell for e in $(static_ext) ; do grep '^NAME =' $$e/Makefile | cut -d' ' -f3 ; done)

dynaloader_o = $(patsubst %,%$o,$(dynaloader))

Expand Down Expand Up @@ -143,14 +143,14 @@ perl$x: perlmain$o $(LIBPERL) $(static_tgt) static.list ext.libs

globals.o: uudmap.h

perlmain.c: ext/ExtUtils-Miniperl/pm_to_blib | miniperl$X
perlmain.c: ext/ExtUtils-Miniperl/pm_to_blib $(patsubst %,%/Makefile,$(static_ext)) | miniperl$X
./miniperl_top -MExtUtils::Miniperl -e 'writemain(\"$@", @ARGV)' $(dynaloader) $(static_pmn)

ext.libs: Makefile.config | $(static_tgt) miniperl$X
./miniperl_top extlibs $(static_ext) > $@
ext.libs: Makefile.config $(patsubst %,%/Makefile,$(static_ext)) | $(static_tgt) miniperl$X
./miniperl_top extlibs $(static_pmn) > $@

static.list: Makefile.config | $(static_tgt) miniperl$X
./miniperl_top statars $(static_ext) > $@
static.list: Makefile.config $(patsubst %,%/Makefile,$(static_ext)) | $(static_tgt) miniperl$X
./miniperl_top statars $(static_pmn) > $@

# ---[ site/library ]-----------------------------------------------------------

Expand Down
5 changes: 2 additions & 3 deletions extlibs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!./miniperl

foreach(@ARGV) {
s!^(dist|ext|cpan)/!lib/auto/!;
s!-!/!g;
$_ .= "/extralibs.ld";
s!::!/!g;
$_ = "lib/auto/" . $_ . "/extralibs.ld";
next unless -f $_;
open(EL, '<', $_) || next;
push(@libs, <EL>);
Expand Down
3 changes: 1 addition & 2 deletions statars
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
$lib = 'lib/auto/';
foreach(@ARGV) {
$m = $_;
s!^(dist|ext|cpan)/!!;
s!-!/!g;
s!::!/!g;
@f = split m!/!;
$f = pop @f;
undef $A;
Expand Down

0 comments on commit f1d50a0

Please sign in to comment.