Skip to content

Instantly share code, notes, and snippets.

@mattn
Created September 14, 2011 01:47
Show Gist options
  • Save mattn/1215667 to your computer and use it in GitHub Desktop.
Save mattn/1215667 to your computer and use it in GitHub Desktop.
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)
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
@@ -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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment