зеркало из https://github.com/github/ruby.git
* Makefile.in, common.mk: miniruby depens on MINIOBJS.
* dmydln.c (dln_load): dummy function to raise LoadError. * cygwin/GNUmakefile.in, {bcc32,win32,wince}/Makefile.sub: miniruby can't load extensions on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9031084686
Коммит
5c6e644196
|
@ -1,3 +1,12 @@
|
||||||
|
Wed Apr 20 23:22:39 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* Makefile.in, common.mk: miniruby depens on MINIOBJS.
|
||||||
|
|
||||||
|
* dmydln.c (dln_load): dummy function to raise LoadError.
|
||||||
|
|
||||||
|
* cygwin/GNUmakefile.in, {bcc32,win32,wince}/Makefile.sub: miniruby
|
||||||
|
can't load extensions on Windows.
|
||||||
|
|
||||||
Wed Apr 20 23:01:35 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Apr 20 23:01:35 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* win32/ifchange.bat: delete testing files.
|
* win32/ifchange.bat: delete testing files.
|
||||||
|
|
|
@ -97,7 +97,7 @@ all:
|
||||||
|
|
||||||
miniruby$(EXEEXT):
|
miniruby$(EXEEXT):
|
||||||
@$(RM) $@
|
@$(RM) $@
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(MAINLIBS)
|
$(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(MAINLIBS)
|
||||||
|
|
||||||
$(PROGRAM):
|
$(PROGRAM):
|
||||||
@$(RM) $@
|
@$(RM) $@
|
||||||
|
|
|
@ -172,6 +172,7 @@ DMYOBJS = dmyext.obj
|
||||||
OBJEXT = obj
|
OBJEXT = obj
|
||||||
|
|
||||||
WINMAINOBJ = winmain.$(OBJEXT)
|
WINMAINOBJ = winmain.$(OBJEXT)
|
||||||
|
MINIOBJS = dmydln.$(OBJEXT)
|
||||||
|
|
||||||
.path.c = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
|
.path.c = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
|
||||||
.path.h = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
|
.path.h = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
|
||||||
|
@ -395,7 +396,7 @@ s,@top_srcdir@,$(srcdir),;t t
|
||||||
|
|
||||||
miniruby$(EXEEXT):
|
miniruby$(EXEEXT):
|
||||||
@echo $(LIBS)
|
@echo $(LIBS)
|
||||||
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBY_A) $(LIBS)
|
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(MINIOBJS),$@,nul,$(LIBRUBY_A) $(LIBS)
|
||||||
|
|
||||||
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
|
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
|
||||||
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBY_INSTALL_NAME).res
|
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBY_INSTALL_NAME).res
|
||||||
|
|
|
@ -66,7 +66,7 @@ all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
|
||||||
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
|
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
|
||||||
prog: $(PROGRAM) $(WPROGRAM)
|
prog: $(PROGRAM) $(WPROGRAM)
|
||||||
|
|
||||||
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(OBJS) $(DMYEXT)
|
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(MINIOBJS) $(OBJS) $(DMYEXT)
|
||||||
|
|
||||||
$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
|
$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
|
||||||
|
|
||||||
|
@ -217,6 +217,9 @@ dir.$(OBJEXT): {$(VPATH)}dir.c {$(VPATH)}ruby.h config.h \
|
||||||
dln.$(OBJEXT): {$(VPATH)}dln.c {$(VPATH)}ruby.h config.h \
|
dln.$(OBJEXT): {$(VPATH)}dln.c {$(VPATH)}ruby.h config.h \
|
||||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
||||||
{$(VPATH)}dln.h
|
{$(VPATH)}dln.h
|
||||||
|
dmydln.$(OBJEXT): {$(VPATH)}dmydln.c {$(VPATH)}dln.c {$(VPATH)}ruby.h \
|
||||||
|
config.h {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
||||||
|
{$(VPATH)}dln.h
|
||||||
dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
|
dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
|
||||||
enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h config.h \
|
enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h config.h \
|
||||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
MINIOBJS = dmydln.o
|
||||||
|
|
||||||
include Makefile
|
include Makefile
|
||||||
|
|
||||||
ENABLE_SHARED=@ENABLE_SHARED@
|
ENABLE_SHARED=@ENABLE_SHARED@
|
||||||
|
|
10
dln.c
10
dln.c
|
@ -91,6 +91,8 @@ char *getenv();
|
||||||
|
|
||||||
int eaccess();
|
int eaccess();
|
||||||
|
|
||||||
|
#ifndef NO_DLN_LOAD
|
||||||
|
|
||||||
#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
|
#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
|
||||||
/* dynamic load with dlopen() */
|
/* dynamic load with dlopen() */
|
||||||
# define USE_DLN_DLOPEN
|
# define USE_DLN_DLOPEN
|
||||||
|
@ -1256,10 +1258,16 @@ aix_loaderror(const char *pathname)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* NO_DLN_LOAD */
|
||||||
|
|
||||||
void*
|
void*
|
||||||
dln_load(file)
|
dln_load(file)
|
||||||
const char *file;
|
const char *file;
|
||||||
{
|
{
|
||||||
|
#ifdef NO_DLN_LOAD
|
||||||
|
rb_raise(rb_eLoadError, "this executable file can't load extension libraries");
|
||||||
|
#else
|
||||||
|
|
||||||
#if !defined(_AIX) && !defined(NeXT)
|
#if !defined(_AIX) && !defined(NeXT)
|
||||||
const char *error = 0;
|
const char *error = 0;
|
||||||
#define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
|
#define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
|
||||||
|
@ -1592,6 +1600,8 @@ dln_load(file)
|
||||||
failed:
|
failed:
|
||||||
rb_loaderror("%s - %s", error, file);
|
rb_loaderror("%s - %s", error, file);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* NO_DLN_LOAD */
|
||||||
return 0; /* dummy return */
|
return 0; /* dummy return */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#define NO_DLN_LOAD 1
|
||||||
|
#include "dln.c"
|
|
@ -173,6 +173,7 @@ EXTOBJS =
|
||||||
DLDOBJS =
|
DLDOBJS =
|
||||||
|
|
||||||
WINMAINOBJ = winmain.$(OBJEXT)
|
WINMAINOBJ = winmain.$(OBJEXT)
|
||||||
|
MINIOBJS = dmydln.$(OBJEXT)
|
||||||
|
|
||||||
all: $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk
|
all: $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk
|
||||||
|
|
||||||
|
@ -411,7 +412,7 @@ s,@top_srcdir@,$(srcdir),;t t
|
||||||
|
|
||||||
miniruby$(EXEEXT):
|
miniruby$(EXEEXT):
|
||||||
@echo. $(LIBS)
|
@echo. $(LIBS)
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) $(LIBRUBY_A) $(LIBS) -Fe$@ $(LDFLAGS)
|
$(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) -Fe$@ $(LDFLAGS)
|
||||||
|
|
||||||
$(PROGRAM): $(RUBY_INSTALL_NAME).res
|
$(PROGRAM): $(RUBY_INSTALL_NAME).res
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) $(RUBY_INSTALL_NAME).res \
|
$(PURIFY) $(CC) $(MAINOBJ) $(RUBY_INSTALL_NAME).res \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче