can't build with strawberry perl

24 views
Skip to first unread message

mattn

unread,
Sep 13, 2011, 9:49:33 PM9/13/11
to vim...@googlegroups.com
Hi

it seems can't build with starawberry perl.

strawberry perl don' have ExtUtils/xsubpp

Below is a patch. Please check it.

https://gist.github.com/1215667

diff -r 1d5e7413d728 src/Make_ming.mak
--- a/src/Make_ming.mak Thu Sep 08 23:24:14 2011 +0200
+++ b/src/Make_ming.mak Wed Sep 14 10:47:48 2011 +0900
@@ -110,6 +110,14 @@
 PERLLIBS=$(PERLLIB)/Core
 endif
 
+XSUBPP=$(PERLLIB)/ExtUtils/xsubpp
+XSUBPP_EXISTS=$(shell perl -e "print 1 unless -e '$(XSUBPP)'")
+ifeq "$(XSUBPP_EXISTS)" ""
+XSUBPP=perl $(XSUBPP)
+else
+XSUBPP=xsubpp
+endif
+
 # uncomment 'LUA' if you want a Lua-enabled version
 #LUA=/usr/local
 ifdef LUA
@@ -696,7 +704,7 @@
 endif
 
 if_perl.c: if_perl.xs typemap
- perl $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \
+ $(XSUBPP) -prototypes -typemap \
      $(PERLLIB)/ExtUtils/typemap if_perl.xs > $@
 
 $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
diff -r 1d5e7413d728 src/Make_mvc.mak
--- a/src/Make_mvc.mak Thu Sep 08 23:24:14 2011 +0200
+++ b/src/Make_mvc.mak Wed Sep 14 10:47:48 2011 +0900
@@ -785,6 +785,11 @@
 PERL_INC = /I $(PERL_INCDIR)
 PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
 XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
+!if exist($(XSUBPP)
+XSUBPP = $(PERL_EXE) $(XSUBPP)
+!else
+XSUBPP = xsubpp
+!endif
 XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
 
 !endif
@@ -1041,7 +1046,7 @@
  $(CC) $(CFLAGS) $(LUA_INC) if_lua.c
 
 if_perl.c : if_perl.xs typemap
- $(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
+ $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
  -typemap typemap if_perl.xs > if_perl.c
 
 $(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c  $(INCL)

Benjamin R. Haskell

unread,
Sep 13, 2011, 11:24:36 PM9/13/11
to vim...@googlegroups.com
On Tue, 13 Sep 2011, mattn wrote:

> Hi
>
> it seems can't build with starawberry perl.
>
> strawberry perl don' have ExtUtils/xsubpp
>
> Below is a patch. Please check it.
>
> https://gist.github.com/1215667
>
> diff -r 1d5e7413d728 src/Make_ming.mak
> --- a/src/Make_ming.mak Thu Sep 08 23:24:14 2011 +0200
> +++ b/src/Make_ming.mak Wed Sep 14 10:47:48 2011 +0900
> @@ -110,6 +110,14 @@
>  PERLLIBS=$(PERLLIB)/Core
>  endif
>  
> +XSUBPP=$(PERLLIB)/ExtUtils/xsubpp
> +XSUBPP_EXISTS=$(shell perl -e "print 1 unless -e '$(XSUBPP)'")
> +ifeq "$(XSUBPP_EXISTS)" ""
> +XSUBPP=perl $(XSUBPP)
> +else
> +XSUBPP=xsubpp
> +endif
> +

Unless I'm missing something, I think this hunk should move up 2 lines
so that the XSUBPP definitions are within the almost-out-of-context:

ifdef PERL
...
endif

--
Best,
Ben

mattn

unread,
Sep 13, 2011, 11:45:36 PM9/13/11
to vim...@googlegroups.com
Thanks your notice! updated it.
diff -r 1d5e7413d728 src/Make_ming.mak
--- a/src/Make_ming.mak Thu Sep 08 23:24:14 2011 +0200
+++ b/src/Make_ming.mak Wed Sep 14 12:44:30 2011 +0900
@@ -108,6 +108,13 @@
 # on NT, it's here:
 PERLLIB=$(PERL)/lib
 PERLLIBS=$(PERLLIB)/Core
+XSUBPP=$(PERLLIB)/ExtUtils/xsubpp
+XSUBPP_EXISTS=$(shell perl -e "print 1 unless -e '$(XSUBPP)'")
+ifeq "$(XSUBPP_EXISTS)" ""
+XSUBPP=perl $(XSUBPP)
+else
+XSUBPP=xsubpp
+endif
 endif
 
 # uncomment 'LUA' if you want a Lua-enabled version
@@ -696,7 +703,7 @@
 endif
 
 if_perl.c: if_perl.xs typemap
- perl $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \
+ $(XSUBPP) -prototypes -typemap \
      $(PERLLIB)/ExtUtils/typemap if_perl.xs > $@
 
 $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
diff -r 1d5e7413d728 src/Make_mvc.mak
--- a/src/Make_mvc.mak Thu Sep 08 23:24:14 2011 +0200
+++ b/src/Make_mvc.mak Wed Sep 14 12:44:30 2011 +0900

Benjamin R. Haskell

unread,
Sep 14, 2011, 12:43:50 AM9/14/11
to vim...@googlegroups.com
On Tue, 13 Sep 2011, mattn wrote:

> Thanks your notice! updated it.
> https://gist.github.com/1215667

I love github, but I've never used gists. So I figured I'd try it. I
updated gistfile11 in this forked gist:

https://gist.github.com/1215848#file_gistfile11

to add a missing parenthesis on line 34. Not sure if there's a nice way
for you to pull the change. Otherwise, just add the parenthesis, I
s'pose.

--
Best,
Ben

Reply all
Reply to author
Forward
0 new messages