Permalink
Browse files

Fix build on Cygwin; patch courtesy of not_gerd++.

  • Loading branch information...
1 parent 8d9c2fe commit 25967beec9dcb4e79523f529bfa5809a5b396508 @jnthn jnthn committed Jan 20, 2012
Showing with 14 additions and 6 deletions.
  1. +1 −0 .gitignore
  2. +6 −5 Configure.pl
  3. +7 −1 tools/build/Makefile.in
View
1 .gitignore
@@ -40,6 +40,7 @@ dynext/perl6_*.dll
perl6_group.?
perl6_group.obj
libparrot.dll
+cygparrot*.dll
src/binder/*.o
src/binder/*.obj
src/binder/*.bundle
View
11 Configure.pl
@@ -109,11 +109,12 @@
$config{'makefile-timing'} = $options{'makefile-timing'};
$config{'stagestats'} = '--stagestats' if $options{'makefile-timing'};
- $config{'shell'} = 'sh';
- if ($^O eq 'MSWin32') {
- $config{'shell'} = 'cmd';
- $config{'win32_libparrot_copy'} =
- 'copy $(PARROT_BIN_DIR)\libparrot.dll .';
+ $config{'shell'} = $^O eq 'MSWin32' ? 'cmd' : 'sh';
+ if ($^O eq 'MSWin32' or $^O eq 'cygwin') {
+ $config{'dll'} = '$(PARROT_BIN_DIR)/$(PARROT_LIB_SHARED)';
+ $config{'dllcopy'} = '$(PARROT_LIB_SHARED)';
+ $config{'make_dllcopy'} =
+ '$(PARROT_DLL_COPY): $(PARROT_DLL)'."\n\t".'$(CP) $(PARROT_DLL) .';
}
my $make = fill_template_text('@make@', %config);
View
8 tools/build/Makefile.in
@@ -6,6 +6,7 @@ PARROT_ARGS =
# values from parrot_config
PARROT_BIN_DIR = @bindir@
+PARROT_LIB_SHARED = @libparrot_shared@
PARROT_VERSION = @versiondir@
PARROT_INCLUDE_DIR = @includedir@$(PARROT_VERSION)
PARROT_LIB_DIR = @libdir@$(PARROT_VERSION)
@@ -31,6 +32,8 @@ POD2MAN = @pod2man@
# locations of parrot and nqp resources
PARROT = $(PARROT_BIN_DIR)/parrot$(EXE)
+PARROT_DLL = @dll@
+PARROT_DLL_COPY = @dllcopy@
NQP_EXE = $(PARROT_BIN_DIR)/nqp$(EXE)
NQP_LANG_DIR = $(PARROT_LIB_DIR)/languages/nqp
PBC_TO_EXE = $(PARROT_BIN_DIR)/pbc_to_exe$(EXE)
@@ -228,6 +231,7 @@ CLEANUPS = \
*.pdb \
$(PERL6_PBC) \
$(PERL6_EXE) \
+ $(PARROT_DLL_COPY) \
perl6.c \
perl6$(O) \
perl6_group.* \
@@ -301,9 +305,11 @@ install: all
xmas: $(PERL6_EXE) $(SETTING) $(S_SETTING)
## targets for building a standalone perl6 executable.
-$(PERL6_EXE): $(PERL6_PBC)
+$(PERL6_EXE): $(PERL6_PBC) $(PARROT_DLL_COPY)
$(PBC_TO_EXE) $(PERL6_PBC)
+@make_dllcopy@
+
# the complete compiler
$(PERL6_PBC): $(PERL6_G_PBC) $(PERL6_A_PBC) $(PERL6_C_PBC) $(PERL6_P_PBC) src/main.nqp
$(PERL) tools/build/gen-version.pl >src/gen/main-version.nqp

0 comments on commit 25967be

Please sign in to comment.