2000-06-24

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2000-06-24 14:06:35 +00:00
parent 552fb72159
commit e551412777
9 changed files with 137 additions and 90 deletions

View File

@ -1,3 +1,7 @@
Sat Jun 24 14:36:29 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
* config*.dj, configure.bat, top.sed: move to djgpp/.
Fri Jun 23 01:11:27 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* string.c (rb_str_substr): should return empty string (""),

View File

@ -13,10 +13,7 @@ bignum.c
class.c
compar.c
configure
configure.bat
configure.in
config_h.dj
config_s.dj
config.guess
config.sub
defines.h
@ -75,6 +72,11 @@ util.c
variable.c
version.c
version.h
djgpp/README.djgpp
djgpp/config.hin
djgpp/config.status
djgpp/configure.bat
djgpp/mkver.sed
cygwin/GNUmakefile.in
ext/Setup
ext/Setup.dj

View File

@ -1,58 +0,0 @@
s%@CFLAGS@%-O2%g
s%@CPPFLAGS@%%g
s%@CXXFLAGS@%%g
s%@DEFS@% -DUSE_THREAD=1 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DSIZEOF_VOIDP=4 -DHAVE_PROTOTYPES=1 -DHAVE_STDARG_PROTOTYPES=1 -DHAVE_ATTR_NORETURN=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_PWD_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_STRING_H=1 -DHAVE_UTIME_H=1 -DHAVE_MEMORY_H=1 -DHAVE_DIRECT_H=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_ST_RDEV=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_ALLOCA=1 -Dvfork=fork -DHAVE_DUP2=1 -DHAVE_SETENV=1 -DHAVE_MEMMOVE=1 -DHAVE_MKDIR=1 -DHAVE_STRCASECMP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_STRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOUL=1 -DHAVE_STRDUP=1 -DHAVE_FMOD=1 -DHAVE_RANDOM=1 -DHAVE_WAITPID=1 -DHAVE_GETCWD=1 -DHAVE_TRUNCATE=1 -DHAVE_CHSIZE=1 -DHAVE_TIMES=1 -DHAVE_UTIMES=1 -DHAVE_FCNTL=1 -DHAVE_SETITIMER=1 -DHAVE_GETGROUPS=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGACTION=1 -DHAVE_SETSID=1 -DPOSIX_SIGNAL=1 -DBSD_SETPGRP=setpgrp -DRSHIFT=\(x,y\)\ \(\(x\)\>\>y\) -DFILE_COUNT=_cnt -DDLEXT=\".so\" -DRUBY_LIB=\"/usr/local/lib/ruby\" -DRUBY_SITE_LIB=\"/usr/local/lib/ruby/site_ruby\" -DRUBY_ARCHLIB=\"/usr/local/lib/ruby/i386-djgpp\" -DRUBY_SITE_ARCHLIB=\"/usr/local/lib/ruby/site_ruby/i386-djgpp\" -DRUBY_PLATFORM=\"i386-djgpp\" %g
s%@LDFLAGS@%%g
s%@LIBS@%-lm %g
s%@exec_prefix@%${prefix}%g
s%@prefix@%/usr/local%g
s%@program_transform_name@%s,x,x,%g
s%@bindir@%${exec_prefix}/bin%g
s%@sbindir@%${exec_prefix}/sbin%g
s%@libexecdir@%${exec_prefix}/libexec%g
s%@datadir@%${prefix}/share%g
s%@sysconfdir@%${prefix}/etc%g
s%@sharedstatedir@%${prefix}/com%g
s%@localstatedir@%${prefix}/var%g
s%@libdir@%${exec_prefix}/lib%g
s%@includedir@%${prefix}/include%g
s%@oldincludedir@%/usr/include%g
s%@infodir@%${prefix}/info%g
s%@mandir@%${prefix}/man%g
s%@host@%i386-pc-djgpp%g
s%@host_alias@%i386-djgpp%g
s%@host_cpu@%i386%g
s%@host_vendor@%pc%g
s%@host_os@%djgpp%g
s%@CC@%gcc%g
s%@CPP@%gcc -E%g
s%@YACC@%bison -y%g
s%@RANLIB@%ranlib%g
s%@AR@%ar%g
s%@INSTALL_PROGRAM@%${INSTALL}%g
s%@INSTALL_DATA@%${INSTALL} -m 644%g
s%@SET_MAKE@%%g
s%@LIBOBJS@% crypt.o flock.o snprintf.o%g
s%@ALLOCA@%%g
s%@DEFAULT_KCODE@%%g
s%@EXEEXT@%.exe%g
s%@OBJEXT@%o%g
s%@DLDFLAGS@%%g
s%@STATIC@%%g
s%@CCDLFLAGS@%%g
s%@LDSHARED@%ld%g
s%@DLEXT@%o%g
s%@STRIP@%strip%g
s%@EXTSTATIC@%%g
s%@binsuffix@%.exe%g
s%@setup@%Setup%g
s%@LIBRUBY@%libruby.a%g
s%@LIBRUBY_A@%libruby.a%g
s%@LIBRUBYARG@%libruby.a%g
s%@LIBRUBY_SO@%%g
s%@SOLIBS@%%g
s%@DLDLIBS@%%g
s%@srcdir%.%g
s%@arch@%i386-djgpp%g
s%@sitedir@%${prefix}/lib/ruby/site_ruby%g
ac_given_srcdir=.

View File

@ -1,24 +0,0 @@
@echo off
grep -qs MAJOR top.sed
if errorlevel 1 goto seen
if errorlevel 0 goto not_seen
:seen
sed -n "/VERSION /s/[^0-9.]//gp" < version.h > version.out
cut -d. -f1 version.out > major.out
cut -d. -f2 version.out > minor.out
cut -d. -f3 version.out > teeny.out
sed "s/^/s,@MAJOR@,/;s/$/,/g" major.out >> top.sed
sed "s/^/s,@MINOR@,/;s/$/,/g" minor.out >> top.sed
sed "s/^/s,@TEENY@,/;s/$/,/g" teeny.out >> top.sed
rm version.out major.out minor.out teeny.out
:not_seen
sed -f top.sed < Makefile.in > Makefile
sed -f top.sed < ext\extmk.rb.in > ext\extmk.rb
copy config_h.dj config.h
if not (%OS%) == (Windows_NT) goto LFN
copy missing\vsnprintf.c missing\vsnprint.c
copy config_s.dj config.sta
goto end
:LFN
copy config_s.dj config.status
:end

21
djgpp/README.djgpp Normal file
View File

@ -0,0 +1,21 @@
* How to compile and install on djgpp
This is what you need to do to compile and install Ruby:
1. Run configure.bat, which will generate config.h and Makefile
and ext/extmk.rb(GNU sed required).
Message like this is normal:
sed.exe: can't read 123456789: No such file or directory (ENOENT)
2. Edit defines.h if you need. Probably this step will not need.
3. Remove comment mark(#) before the module names from ext/Setup.dj (or
add module names if not present).
4. Run make.
5. Optionally, run 'make test' to check whether the compiled Ruby
interpreter works well. If you see the message "test succeeded",
your ruby works as it should (hopefully).
6. Run 'make install'

View File

@ -64,9 +64,9 @@
#define RSHIFT(x,y) ((x)>>y)
#define FILE_COUNT _cnt
#define DLEXT ".o"
#define RUBY_LIB "/usr/local/lib/ruby/1.5"
#define RUBY_LIB "/usr/local/lib/ruby/@MAJOR@.@MINOR@"
#define RUBY_SITE_LIB "/usr/local/lib/ruby/site_ruby"
#define RUBY_SITE_LIB2 "/usr/local/lib/ruby/site_ruby/1.5"
#define RUBY_PLATFORM "i386-djgpp"
#define RUBY_ARCHLIB "/usr/local/lib/ruby/1.5/i386-djgpp"
#define RUBY_SITE_ARCHLIB "/usr/local/lib/ruby/site_ruby/1.5/i386-djgpp"
#define RUBY_SITE_LIB2 "/usr/local/lib/ruby/site_ruby/@MAJOR@.@MINOR@"
#define RUBY_PLATFORM "i386-msdosdjgpp"
#define RUBY_ARCHLIB "/usr/local/lib/ruby/@MAJOR@.@MINOR@/i386-msdosdjgpp"
#define RUBY_SITE_ARCHLIB "/usr/local/lib/ruby/site_ruby/@MAJOR@.@MINOR@/i386-msdosdjgpp"

76
djgpp/config.status Normal file
View File

@ -0,0 +1,76 @@
/^SHELL/s,/bin/sh,$(COMPSEC),
s%@srcdir@%.%g
s%@top_srcdir@%..%
s%@CFLAGS@%-O2%g
s%@CPPFLAGS@%%g
s%@CXXFLAGS@%%g
s%@LDFLAGS@%%g
s%@LIBS@%-lm %g
s%@exec_prefix@%${prefix}%g
s%@prefix@%/usr/local%g
s%@program_transform_name@%s,x,x,%g
s%@bindir@%${exec_prefix}/bin%g
s%@sbindir@%${exec_prefix}/sbin%g
s%@libexecdir@%${exec_prefix}/libexec%g
s%@datadir@%${prefix}/share%g
s%@sysconfdir@%${prefix}/etc%g
s%@sharedstatedir@%${prefix}/com%g
s%@localstatedir@%${prefix}/var%g
s%@libdir@%${exec_prefix}/lib%g
s%@includedir@%${prefix}/include%g
s%@oldincludedir@%/usr/include%g
s%@infodir@%${prefix}/info%g
s%@mandir@%${prefix}/man%g
s%@host@%i386-pc-msdosdjgpp%g
s%@host_alias@%i386-msdosdjgpp%g
s%@host_cpu@%i386%g
s%@host_vendor@%pc%g
s%@host_os@%msdosdjgpp%g
s%@CC@%gcc%g
s%@CPP@%gcc -E%g
s%@YACC@%bison -y%g
s%@RANLIB@%ranlib%g
s%@AR@%ar%g
s%@INSTALL_PROGRAM@%${INSTALL}%g
s%@INSTALL_DATA@%${INSTALL} -m 644%g
s%@SET_MAKE@%%g
s%@LIBOBJS@% crypt.o flock.o vsnprintf.o%g
s%@ALLOCA@%%g
s%@DEFAULT_KCODE@%%g
s%@EXEEXT@%.exe%g
s%@OBJEXT@%o%g
s%@XLDFLAGS@%%g
s%@DLDFLAGS@%%g
s%@STATIC@%%g
s%@CCDLFLAGS@%%g
s%@LDSHARED@%ld%g
s%@DLEXT@%o%g
s%@STRIP@%strip%g
s%@EXTSTATIC@%%g
s%@binsuffix@%.exe%g
s%@setup@%Setup.dj%g
s%@LIBRUBY@%libruby.a%g
s%@LIBRUBY_A@%libruby.a%g
s%@LIBRUBYARG@%libruby.a%g
s%@LIBRUBY_SO@%%g
s%@SOLIBS@%%g
s%@arch@%i386-msdosdjgpp%g
;s%/bin/rm%rm%
s%@DLDLIBS@%-lc%g
s%@PREP@%%
s%@RUBY_INSTALL_NAME@%ruby%g
s%@arch@%i386-msdosdjgpp%g
s%@sitedir@%${prefix}/lib/ruby/site_ruby%g
s%@MINIRUBY@%./miniruby%
s%@archlib@%/usr/local/lib/ruby/i386-msdosdjgpp%
;s%|| true%%
;/\/dev\/null/ {
;s,/dev/null 2>&1, nul,
;s,2> /dev/null,,
;}
;/^config.status/ {
; N;N;N;N;N;d
;}
;s%y\.tab\.c%y_tab.c%
/^,THIS_IS_DUMMY_PATTERN_/i\
ac_given_srcdir=.

25
djgpp/configure.bat Normal file
View File

@ -0,0 +1,25 @@
@echo off
set _dj_=djgpp
if exist djgpp\nul goto top
cd ..
:top
if exist %_dj_%\version.sed goto exist
sed -n -f %_dj_%\mkver.sed < version.h > %_dj_%\version.sed
:exist
set _convert_=-f %_dj_%\config.status -f %_dj_%\version.sed
sed %_convert_% < Makefile.in > Makefile
sed %_convert_% < ext\extmk.rb.in > ext\extmk.rb
sed %_convert_% < %_dj_%\config.hin > config.h
echo LFN check > 12345678
sed -n /LFN/d 123456789 > nul
if errorlevel 2 goto LFN
copy missing\vsnprintf.c missing\vsnprint.c > nul
copy %_dj_%\config.status config.sta > nul
goto end
:LFN
copy %_dj_%\config.status config.status > nul
:end
set _dj_=
set _convert_=
del 12345678
echo Now you must run a make.

1
djgpp/mkver.sed Normal file
View File

@ -0,0 +1 @@
/RUBY_VERSION /s/^.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/s,@MAJOR@,\1,;s,@MINOR@,\2,;s,@TEENY@,\3,/p