mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
392296c12d
commit
3db12e8b23
225 changed files with 75935 additions and 0 deletions
233
win32/Makefile
Normal file
233
win32/Makefile
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
SHELL = $(COMPSEC)
|
||||
|
||||
#### Start of system configuration section. ####
|
||||
|
||||
srcdir = .
|
||||
VPATH = .:./missing
|
||||
|
||||
CC = cl
|
||||
YACC = byacc
|
||||
RANLIB =
|
||||
AR =
|
||||
INSTALL = ginstall -c
|
||||
INSTALL_PROGRAM = $(INSTALL)
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
PURIFY =
|
||||
|
||||
|
||||
#CFLAGS = -nologo -DNT=1 -Ox
|
||||
#LDFLAGS = $(CFLAGS) -Fm
|
||||
CFLAGS = -nologo -DNT=1 -Zi -MD
|
||||
LDFLAGS = $(CFLAGS) -Fm -MD
|
||||
LIBS = $(EXTLIBS) advapi32.lib wsock32.lib
|
||||
MISSING = crypt.obj setenv.obj alloca.obj nt.obj
|
||||
|
||||
prefix =
|
||||
binprefix =
|
||||
exec_prefix =
|
||||
bindir =
|
||||
libdir =
|
||||
|
||||
STACK = 0x200000
|
||||
|
||||
#### End of system configuration section. ####
|
||||
|
||||
|
||||
LIBRUBY = libruby.lib
|
||||
|
||||
EXTOBJS = dmyext.obj
|
||||
|
||||
MAINOBJ = main.obj
|
||||
|
||||
OBJS = array.obj \
|
||||
bignum.obj \
|
||||
class.obj \
|
||||
compar.obj \
|
||||
dir.obj \
|
||||
dln.obj \
|
||||
enum.obj \
|
||||
error.obj \
|
||||
eval.obj \
|
||||
file.obj \
|
||||
fnmatch.obj \
|
||||
gc.obj \
|
||||
glob.obj \
|
||||
hash.obj \
|
||||
inits.obj \
|
||||
io.obj \
|
||||
math.obj \
|
||||
numeric.obj \
|
||||
object.obj \
|
||||
pack.obj \
|
||||
parse.obj \
|
||||
process.obj \
|
||||
random.obj \
|
||||
range.obj \
|
||||
re.obj \
|
||||
regex.obj \
|
||||
ruby.obj \
|
||||
signal.obj \
|
||||
sprintf.obj \
|
||||
st.obj \
|
||||
string.obj \
|
||||
struct.obj \
|
||||
time.obj \
|
||||
util.obj \
|
||||
variable.obj \
|
||||
version.obj \
|
||||
$(MISSING)
|
||||
|
||||
all: miniruby.exe ext/Setup
|
||||
cd ext
|
||||
..\miniruby .\extmk.rb static
|
||||
cd ..
|
||||
|
||||
miniruby.exe: $(OBJS) $(MAINOBJ) $(EXTOBJS)
|
||||
@echo $(EXTOBJS)
|
||||
@echo $(LIBS)
|
||||
@rm -f miniruby.exe
|
||||
# $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(LIBS) -o miniruby.exe
|
||||
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(LIBS) -o miniruby.exe -link /NOD:LIBC
|
||||
|
||||
ruby.exe: $(LIBRUBY) $(MAINOBJ) $(EXTOBJS) ruby.dll
|
||||
@echo $(EXTOBJS)
|
||||
@echo $(LIBS)
|
||||
@rm -f ruby.exe
|
||||
# $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY) $(LIBS) -o ruby.exe
|
||||
# $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY) $(LIBS) -o ruby.exe -link /DEF:rubyexe.def /NOD:LIBC
|
||||
$(CC) $(LDFLAGS) $(MAINOBJ) -o ruby.exe ruby.lib -link /NOD:LIBC /STACK:$(STACK)
|
||||
|
||||
ruby.dll: $(LIBRUBY) $(EXTOBJS)
|
||||
@echo $(EXTOBJS)
|
||||
@echo $(LIBS)
|
||||
@rm -f ruby.dll
|
||||
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY) $(LIBS) -o ruby.dll -link /DLL /DEF:ruby.def /NOD:LIBC
|
||||
|
||||
$(LIBRUBY): $(OBJS)
|
||||
lib /OUT:$(LIBRUBY) $(OBJS)
|
||||
|
||||
install:; $(INSTALL_PROGRAM) ruby.exe $(bindir)/ruby.exe
|
||||
@-strip $(bindir)/ruby
|
||||
@test -d $(libdir) || mkdir $(libdir)
|
||||
cd ext; ../miniruby ./extmk.rb install
|
||||
@for rb in `grep '^lib/' MANIFEST`; do \
|
||||
$(INSTALL_DATA) $$rb $(libdir); \
|
||||
done
|
||||
|
||||
clean:; @rm -f $(OBJS) $(LIBRUBY) main.obj dmyext.obj *.pdb *.map *.exp
|
||||
@rm -f ext/extinit.c ext/extinit.obj
|
||||
cd ext
|
||||
..\miniruby .\extmk.rb clean
|
||||
cd ..
|
||||
|
||||
realclean: clean
|
||||
@rm -f Makefile ext/extmk.rb
|
||||
@rm -f config.cache config.h config.log config.status
|
||||
@rm -f core ruby miniruby *~
|
||||
|
||||
test:; @-./ruby sample/test.rb > ./ruby_test 2>&1; \
|
||||
if grep '^end of test' ./ruby_test > /dev/null; then \
|
||||
echo "test succeeded"; \
|
||||
else \
|
||||
grep '^sample/test.rb' ./ruby_test; \
|
||||
grep '^not' ./ruby_test; \
|
||||
echo "test failed";\
|
||||
fi;\
|
||||
rm -f ./ruby_test
|
||||
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
alloca.obj: missing/alloca.c
|
||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/alloca.c
|
||||
|
||||
crypt.obj: missing/crypt.c
|
||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/crypt.c
|
||||
|
||||
dup2.obj: missing/dup2.c
|
||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/dup2.c
|
||||
|
||||
flock.obj: missing/flock.c
|
||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/flock.c
|
||||
|
||||
memmove.obj: missing/memmove.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/memmove.c
|
||||
|
||||
mkdir.obj: missing/mkdir.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/mkdir.c
|
||||
|
||||
setenv.obj: missing/setenv.c
|
||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/setenv.c
|
||||
|
||||
strerror.obj: missing/strerror.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strerror.c
|
||||
|
||||
strdup.obj: missing/strdup.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strdup.c
|
||||
|
||||
strftime.obj: missing/strftime.c
|
||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/strftime.c
|
||||
|
||||
strstr.obj: missing/strstr.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strstr.c
|
||||
|
||||
strtol.obj: missing/strtol.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtol.c
|
||||
|
||||
strtoul.obj: missing/strtoul.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtoul.c
|
||||
|
||||
# when I use -I., there is confliction at "OpenFile"
|
||||
# so, set . into environment varible "include"
|
||||
nt.obj: missing/nt.c
|
||||
@set include=$(INCLUDE);.
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/nt.c
|
||||
|
||||
parse.c: parse.y
|
||||
$(YACC) $(YFLAGS) parse.y
|
||||
sed -e "s!^extern char \*getenv();!/* & */!" y.tab.c > parse.c
|
||||
@rm y.tab.c
|
||||
|
||||
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
||||
.NOEXPORT:
|
||||
###
|
||||
parse.obj : parse.y ruby.h defines.h config.h env.h node.h st.h regex.h
|
||||
###
|
||||
array.obj: array.c ruby.h config.h defines.h
|
||||
bignum.obj: bignum.c ruby.h config.h defines.h
|
||||
class.obj: class.c ruby.h config.h defines.h node.h st.h
|
||||
compar.obj: compar.c ruby.h config.h defines.h
|
||||
dir.obj: dir.c ruby.h config.h defines.h
|
||||
dln.obj: dln.c config.h defines.h dln.h st.h
|
||||
dmyext.obj: dmyext.c
|
||||
enum.obj: enum.c ruby.h config.h defines.h
|
||||
error.obj: error.c ruby.h config.h defines.h env.h
|
||||
eval.obj: eval.c ruby.h config.h defines.h env.h node.h sig.h st.h dln.h
|
||||
file.obj: file.c ruby.h config.h defines.h io.h sig.h
|
||||
fnmatch.obj: fnmatch.c config.h fnmatch.h
|
||||
gc.obj: gc.c ruby.h config.h defines.h env.h sig.h st.h node.h re.h regex.h
|
||||
glob.obj: glob.c config.h fnmatch.h
|
||||
hash.obj: hash.c ruby.h config.h defines.h st.h
|
||||
inits.obj: inits.c ruby.h config.h defines.h
|
||||
io.obj: io.c ruby.h config.h defines.h io.h sig.h
|
||||
main.obj: main.c
|
||||
math.obj: math.c ruby.h config.h defines.h
|
||||
numeric.obj: numeric.c ruby.h config.h defines.h
|
||||
object.obj: object.c ruby.h config.h defines.h st.h
|
||||
pack.obj: pack.c ruby.h config.h defines.h
|
||||
process.obj: process.c ruby.h config.h defines.h sig.h st.h
|
||||
random.obj: random.c ruby.h config.h defines.h
|
||||
range.obj: range.c ruby.h config.h defines.h
|
||||
re.obj: re.c ruby.h config.h defines.h re.h regex.h
|
||||
regex.obj: regex.c config.h defines.h regex.h util.h
|
||||
ruby.obj: ruby.c ruby.h config.h defines.h re.h regex.h dln.h
|
||||
signal.obj: signal.c ruby.h config.h defines.h sig.h
|
||||
sprintf.obj: sprintf.c ruby.h config.h defines.h
|
||||
st.obj: st.c config.h st.h
|
||||
string.obj: string.c ruby.h config.h defines.h re.h regex.h
|
||||
struct.obj: struct.c ruby.h config.h defines.h
|
||||
time.obj: time.c ruby.h config.h defines.h
|
||||
util.obj: util.c defines.h config.h util.h
|
||||
variable.obj: variable.c ruby.h config.h defines.h env.h st.h
|
||||
version.obj: version.c ruby.h config.h defines.h version.h
|
||||
director.obj : director.c dir.h
|
||||
60
win32/config.h
Normal file
60
win32/config.h
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#define THREAD 1
|
||||
/* #define HAVE_DIRENT_H 1 */
|
||||
/* #define HAVE_UNISTD_H 1 */
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_SYS_FILE_H 1
|
||||
/* #define HAVE_PWD_H 1 */
|
||||
/* #define HAVE_SYS_TIME_H 1 */
|
||||
/* #define HAVE_SYS_TIMES_H 1 */
|
||||
/* #define HAVE_SYS_PARAM_H 1 */
|
||||
/* #define HAVE_SYS_WAIT_H 1 */
|
||||
#define HAVE_STRING_H 1
|
||||
/* #define HAVE_UTIME_H 1 */
|
||||
#define HAVE_MEMORY_H 1
|
||||
/* #define HAVE_ST_BLKSIZE 1 */
|
||||
#define HAVE_ST_RDEV 1
|
||||
/* #define GETGROUPS_T gid_t */
|
||||
#define GETGROUPS_T int
|
||||
#define RETSIGTYPE void
|
||||
#define HAVE_ALLOCA 1
|
||||
#define vfork fork
|
||||
#define HAVE_FMOD 1
|
||||
/* #define HAVE_RANDOM 1 */
|
||||
/* #define HAVE_WAITPID 1 */
|
||||
#define HAVE_GETCWD 1
|
||||
/* #define HAVE_TRUNCATE 1 */
|
||||
#define HAVE_CHSIZE 1
|
||||
/* #define HAVE_TIMES 1 */
|
||||
/* #define HAVE_UTIMES 1 */
|
||||
/* #define HAVE_FCNTL 1 */
|
||||
/* #define HAVE_SETITIMER 1 */
|
||||
#define HAVE_GETGROUPS 1
|
||||
/* #define HAVE_SIGPROCMASK 1 */
|
||||
#define FILE_COUNT _cnt
|
||||
#define DLEXT ".dll"
|
||||
#define RUBY_LIB ";/usr/local/lib/ruby;."
|
||||
#define RUBY_ARCHLIB "/usr/local/lib/ruby/i386-mswin32"
|
||||
#define RUBY_PLATFORM "i386-mswin32"
|
||||
|
||||
/* NNN */
|
||||
#define strcasecmp _strcmpi
|
||||
#define popen _popen
|
||||
#define pclose _pclose
|
||||
#define pipe _pipe
|
||||
#define bzero(x, y) memset(x, 0, y)
|
||||
|
||||
#define S_IFMT _S_IFMT
|
||||
#define S_IFDIR _S_IFDIR
|
||||
#define S_IFCHR _S_IFCHR
|
||||
#define S_IFREG _S_IFREG
|
||||
#define S_IREAD _S_IREAD
|
||||
#define S_IWRITE _S_IWRITE
|
||||
#define S_IEXEC _S_IEXEC
|
||||
#define S_IFIFO _S_IFIFO
|
||||
|
||||
#define UIDTYPE int
|
||||
#define GIDTYPE int
|
||||
#define pid_t int
|
||||
#define WNOHANG -1
|
||||
//#define NT
|
||||
10
win32/ntsetup.bat
Executable file
10
win32/ntsetup.bat
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
@echo off
|
||||
copy config.h ..
|
||||
copy Makefile ..
|
||||
copy ruby.def ..
|
||||
cd ..\ext
|
||||
copy Setup.nt Setup
|
||||
copy extmk.rb.nt extmk.rb
|
||||
|
||||
cd ..
|
||||
echo type `nmake' to make ruby for mswin32.
|
||||
55
win32/ruby.def
Normal file
55
win32/ruby.def
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
LIBRARY ruby.dll
|
||||
CODE LOADONCALL
|
||||
DATA LOADONCALL
|
||||
DESCRIPTION 'win32 ruby.dll'
|
||||
EXPORTS
|
||||
|
||||
;missing/nt.c
|
||||
NtInitialize
|
||||
;eval.c
|
||||
ruby_init
|
||||
ruby_options
|
||||
ruby_run
|
||||
;class.c
|
||||
;;rb_define_module_function
|
||||
;;rb_define_const
|
||||
;;rb_define_singleton_method
|
||||
;;rb_define_alias
|
||||
rb_define_alias
|
||||
rb_define_attr
|
||||
rb_define_class
|
||||
rb_define_class_id
|
||||
rb_define_class_under
|
||||
rb_define_global_function
|
||||
rb_define_method
|
||||
rb_define_method_id
|
||||
rb_define_module
|
||||
rb_define_module_function
|
||||
rb_define_module_id
|
||||
rb_define_module_under
|
||||
rb_define_private_method
|
||||
rb_define_singleton_method
|
||||
rb_scan_args
|
||||
;variable.c
|
||||
rb_define_const
|
||||
rb_define_hooked_variable
|
||||
rb_define_global_const
|
||||
rb_define_readonly_variable
|
||||
rb_define_variable
|
||||
rb_define_virtual_variable
|
||||
;string.c
|
||||
str_new
|
||||
str_new2
|
||||
str_new3
|
||||
str_new4
|
||||
;numeric.c
|
||||
num2int
|
||||
|
||||
;error.c
|
||||
rb_check_type
|
||||
Fatal
|
||||
|
||||
;gc.c
|
||||
xmalloc
|
||||
xcalloc
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue