diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-20 14:25:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-20 14:25:34 +0000 |
commit | 70779bf224fdcd7b00373bbc64c30beae959c242 (patch) | |
tree | 5f891639c5f6a02c5018f8de48f97b4e4426c5bf | |
parent | a768498ffafdc343e595d6b80e674c4ac8eb45ce (diff) |
* 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/branches/ruby_1_8@8364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | bcc32/Makefile.sub | 3 | ||||
-rw-r--r-- | common.mk | 5 | ||||
-rw-r--r-- | cygwin/GNUmakefile.in | 2 | ||||
-rw-r--r-- | dln.c | 10 | ||||
-rw-r--r-- | win32/Makefile.sub | 3 |
7 files changed, 30 insertions, 4 deletions
@@ -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> * win32/ifchange.bat: delete testing files. diff --git a/Makefile.in b/Makefile.in index b677f8216b..d61df932c2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -97,7 +97,7 @@ all: miniruby$(EXEEXT): @$(RM) $@ - $(PURIFY) $(CC) $(MAINOBJ) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(MAINLIBS) + $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(MAINLIBS) $(PROGRAM): @$(RM) $@ diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index c00ad76772..96ba223570 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -171,6 +171,7 @@ DMYOBJS = dmyext.obj OBJEXT = obj WINMAINOBJ = winmain.$(OBJEXT) +MINIOBJS = dmydln.$(OBJEXT) .path.c = .;$(srcdir);$(srcdir)win32;$(srcdir)missing .path.h = .;$(srcdir);$(srcdir)win32;$(srcdir)missing @@ -394,7 +395,7 @@ s,@top_srcdir@,$(srcdir),;t t miniruby$(EXEEXT): @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 $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBY_INSTALL_NAME).res @@ -58,7 +58,7 @@ all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY) @$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) 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) @@ -207,6 +207,9 @@ dir.$(OBJEXT): {$(VPATH)}dir.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)}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 enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h config.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in index 03208df11c..b366b2096f 100644 --- a/cygwin/GNUmakefile.in +++ b/cygwin/GNUmakefile.in @@ -1,3 +1,5 @@ +MINIOBJS = dmydln.o + include Makefile ENABLE_SHARED=@ENABLE_SHARED@ @@ -91,6 +91,8 @@ char *getenv(); int eaccess(); +#ifndef NO_DLN_LOAD + #if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP) /* dynamic load with dlopen() */ # define USE_DLN_DLOPEN @@ -1274,10 +1276,16 @@ static int vms_fileact(char *filespec, int type); static long vms_fisexh(long *sigarr, long *mecarr); #endif +#endif /* NO_DLN_LOAD */ + void* dln_load(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) const char *error = 0; #define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error)) @@ -1633,6 +1641,8 @@ dln_load(file) failed: rb_loaderror("%s - %s", error, file); #endif + +#endif /* NO_DLN_LOAD */ return 0; /* dummy return */ } diff --git a/win32/Makefile.sub b/win32/Makefile.sub index bb99e88a08..2e4f7c6bd9 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -172,6 +172,7 @@ EXTOBJS = DLDOBJS = WINMAINOBJ = winmain.$(OBJEXT) +MINIOBJS = dmydln.$(OBJEXT) all: $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk @@ -396,7 +397,7 @@ s,@top_srcdir@,$(srcdir),;t t miniruby$(EXEEXT): @echo. $(LIBS) - $(PURIFY) $(CC) $(MAINOBJ) $(LIBRUBY_A) $(LIBS) -Fe$@ $(LDFLAGS) + $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) -Fe$@ $(LDFLAGS) $(PROGRAM): $(RUBY_INSTALL_NAME).res $(PURIFY) $(CC) $(MAINOBJ) $(RUBY_INSTALL_NAME).res \ |