mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* Makefile.in, */Makefile.sub, */configure.bat, cygwin/GNUmakefile.in,
common.mk, configure.in, ext/extmk.rb, lib/mkmf.rb, instruby.rb, runruby.rb: backport extout. [ruby-dev:25963] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d6024d6055
commit
162b040611
14 changed files with 1059 additions and 1377 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Wed Mar 30 23:44:50 2005 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* Makefile.in, */Makefile.sub, */configure.bat,
|
||||||
|
cygwin/GNUmakefile.in, common.mk, configure.in, ext/extmk.rb,
|
||||||
|
lib/mkmf.rb, instruby.rb, runruby.rb: backport extout.
|
||||||
|
[ruby-dev:25963]
|
||||||
|
|
||||||
Wed Mar 30 17:41:48 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
Wed Mar 30 17:41:48 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tcltklib/tcltklib.c: add TclTkIp#_create_console() method to
|
* ext/tcltklib/tcltklib.c: add TclTkIp#_create_console() method to
|
||||||
|
|
310
Makefile.in
310
Makefile.in
|
@ -10,6 +10,7 @@ YACC = @YACC@
|
||||||
PURIFY =
|
PURIFY =
|
||||||
AUTOCONF = autoconf
|
AUTOCONF = autoconf
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
MKFILES = @MAKEFILES@
|
||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
|
@ -17,10 +18,19 @@ bindir = @bindir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
libexecdir = @libexecdir@
|
libexecdir = @libexecdir@
|
||||||
|
datadir = @datadir@
|
||||||
arch = @arch@
|
arch = @arch@
|
||||||
sitearch = @sitearch@
|
sitearch = @sitearch@
|
||||||
sitedir = @sitedir@
|
sitedir = @sitedir@
|
||||||
|
|
||||||
|
TESTUI = console
|
||||||
|
TESTS =
|
||||||
|
RDOCTARGET = @RDOCTARGET@
|
||||||
|
|
||||||
|
EXTOUT = @EXTOUT@
|
||||||
|
RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system
|
||||||
|
|
||||||
|
OUTFLAG = -o
|
||||||
CFLAGS = @CFLAGS@ @XCFLAGS@ @ARCH_FLAG@
|
CFLAGS = @CFLAGS@ @XCFLAGS@ @ARCH_FLAG@
|
||||||
CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@
|
CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@
|
||||||
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
|
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
|
||||||
|
@ -39,7 +49,9 @@ RUBY_SO_NAME=@RUBY_SO_NAME@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
|
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
|
||||||
RUBY = $(RUBY_INSTALL_NAME)
|
RUBY = $(RUBY_INSTALL_NAME)
|
||||||
|
RUBYOPT =
|
||||||
MINIRUBY = @MINIRUBY@
|
MINIRUBY = @MINIRUBY@
|
||||||
|
RUNRUBY = @RUNRUBY@
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
|
|
||||||
|
@ -55,135 +67,58 @@ LIBRUBYARG = @LIBRUBYARG@
|
||||||
LIBRUBYARG_STATIC = @LIBRUBYARG_STATIC@
|
LIBRUBYARG_STATIC = @LIBRUBYARG_STATIC@
|
||||||
LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
|
LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
|
||||||
|
|
||||||
PREP = @PREP@ @ARCHFILE@
|
PREP = @PREP@
|
||||||
|
ARCHFILE = @ARCHFILE@
|
||||||
SETUP =
|
SETUP =
|
||||||
EXTSTATIC = @EXTSTATIC@
|
EXTSTATIC = @EXTSTATIC@
|
||||||
|
|
||||||
|
RM = rm -f
|
||||||
|
NM = @NM@
|
||||||
|
AR = @AR@
|
||||||
|
ARFLAGS = rcu
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
|
||||||
EXTOBJS =
|
EXTOBJS =
|
||||||
DLDOBJS = $(DMYEXT)
|
DLDOBJS = $(DMYEXT)
|
||||||
DMYEXT = dmyext.@OBJEXT@
|
|
||||||
|
|
||||||
MAINOBJ = main.@OBJEXT@
|
MAINOBJ = main.$(OBJEXT)
|
||||||
|
|
||||||
OBJS = array.@OBJEXT@ \
|
|
||||||
bignum.@OBJEXT@ \
|
|
||||||
class.@OBJEXT@ \
|
|
||||||
compar.@OBJEXT@ \
|
|
||||||
dir.@OBJEXT@ \
|
|
||||||
dln.@OBJEXT@ \
|
|
||||||
enum.@OBJEXT@ \
|
|
||||||
error.@OBJEXT@ \
|
|
||||||
eval.@OBJEXT@ \
|
|
||||||
file.@OBJEXT@ \
|
|
||||||
gc.@OBJEXT@ \
|
|
||||||
hash.@OBJEXT@ \
|
|
||||||
inits.@OBJEXT@ \
|
|
||||||
io.@OBJEXT@ \
|
|
||||||
marshal.@OBJEXT@ \
|
|
||||||
math.@OBJEXT@ \
|
|
||||||
numeric.@OBJEXT@ \
|
|
||||||
object.@OBJEXT@ \
|
|
||||||
pack.@OBJEXT@ \
|
|
||||||
parse.@OBJEXT@ \
|
|
||||||
process.@OBJEXT@ \
|
|
||||||
prec.@OBJEXT@ \
|
|
||||||
random.@OBJEXT@ \
|
|
||||||
range.@OBJEXT@ \
|
|
||||||
re.@OBJEXT@ \
|
|
||||||
regex.@OBJEXT@ \
|
|
||||||
ruby.@OBJEXT@ \
|
|
||||||
signal.@OBJEXT@ \
|
|
||||||
sprintf.@OBJEXT@ \
|
|
||||||
st.@OBJEXT@ \
|
|
||||||
string.@OBJEXT@ \
|
|
||||||
struct.@OBJEXT@ \
|
|
||||||
time.@OBJEXT@ \
|
|
||||||
util.@OBJEXT@ \
|
|
||||||
variable.@OBJEXT@ \
|
|
||||||
version.@OBJEXT@ \
|
|
||||||
$(MISSING)
|
|
||||||
|
|
||||||
MANTYPE = @MANTYPE@
|
MANTYPE = @MANTYPE@
|
||||||
|
|
||||||
SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
|
#### End of variables
|
||||||
--make="$(MAKE)" \
|
|
||||||
--mflags="$(MFLAGS)" \
|
|
||||||
--make-flags="$(MAKEFLAGS)"
|
|
||||||
|
|
||||||
all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY)
|
all:
|
||||||
@$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic="$(EXTSTATIC)" $(SCRIPT_ARGS)
|
|
||||||
|
|
||||||
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(DMYEXT)
|
.DEFAULT: all
|
||||||
@rm -f $@
|
|
||||||
$(PURIFY) $(CC) $(LDFLAGS) $(MAINLIBS) $(MAINOBJ) $(DMYEXT) $(LIBRUBY_A) $(LIBS) -o $@
|
|
||||||
|
|
||||||
$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS) $(SETUP) miniruby$(EXEEXT)
|
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
||||||
@rm -f $@
|
.NOEXPORT:
|
||||||
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
|
|
||||||
|
miniruby$(EXEEXT):
|
||||||
|
@$(RM) $@
|
||||||
|
$(PURIFY) $(CC) $(MAINOBJ) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(MAINLIBS)
|
||||||
|
|
||||||
|
$(PROGRAM):
|
||||||
|
@$(RM) $@
|
||||||
|
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) $(OUTFLAG)$@
|
||||||
|
|
||||||
# We must `rm' the library each time this rule is invoked because "updating" a
|
# We must `rm' the library each time this rule is invoked because "updating" a
|
||||||
# MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not
|
# MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not
|
||||||
# supported.
|
# supported.
|
||||||
$(LIBRUBY_A): $(OBJS) $(DMYEXT)
|
$(LIBRUBY_A):
|
||||||
@rm -f $@
|
@$(RM) $@
|
||||||
@AR@ rcu $@ $(OBJS) $(DMYEXT)
|
$(AR) $(ARFLAGS) $@ $(OBJS) $(DMYEXT)
|
||||||
@-@RANLIB@ $@ 2> /dev/null || true
|
@-$(RANLIB) $@ 2> /dev/null || true
|
||||||
|
|
||||||
$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) miniruby$(EXEEXT) $(PREP)
|
$(LIBRUBY_SO):
|
||||||
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) -o $@
|
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@
|
||||||
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
|
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
|
||||||
File.symlink "$(LIBRUBY_SO)", link}' \
|
File.symlink "$(LIBRUBY_SO)", link}' \
|
||||||
$(LIBRUBY_ALIASES) || true
|
$(LIBRUBY_ALIASES) || true
|
||||||
|
|
||||||
ruby.imp: $(LIBRUBY_A)
|
fake.rb: Makefile
|
||||||
@@NM@ -Pgp $(LIBRUBY_A) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
|
|
||||||
# $(MINIRUBY) $< $@
|
|
||||||
|
|
||||||
install: install-nodoc @RDOCTARGET@
|
|
||||||
|
|
||||||
install-nodoc: rbconfig.rb
|
|
||||||
$(MINIRUBY) $(srcdir)/instruby.rb $(SCRIPT_ARGS) --mantype="$(MANTYPE)"
|
|
||||||
$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) install
|
|
||||||
|
|
||||||
what-where no-install: rbconfig.rb
|
|
||||||
$(MINIRUBY) $(srcdir)/instruby.rb -n $(SCRIPT_ARGS) --mantype="$(MANTYPE)"
|
|
||||||
$(MINIRUBY) $(srcdir)/ext/extmk.rb -n $(SCRIPT_ARGS) install
|
|
||||||
|
|
||||||
install-doc:
|
|
||||||
@echo Generating RDoc documentation
|
|
||||||
$(bindir)/$(PROGRAM) $(srcdir)/bin/rdoc --all --ri-system $(srcdir)
|
|
||||||
|
|
||||||
clean-ext:
|
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) clean 2> /dev/null || true
|
|
||||||
|
|
||||||
clean-local:
|
|
||||||
@rm -f $(OBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY_ALIASES)
|
|
||||||
@rm -f ext/extinit.c ext/extinit.@OBJEXT@ dmyext.@OBJEXT@
|
|
||||||
@rm -f $(PROGRAM) miniruby$(EXEEXT)
|
|
||||||
|
|
||||||
clean: clean-ext clean-local
|
|
||||||
|
|
||||||
distclean-ext:
|
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) distclean 2> /dev/null || true
|
|
||||||
|
|
||||||
distclean-local: clean-local
|
|
||||||
@rm -f @MAKEFILES@ config.h rbconfig.rb
|
|
||||||
@rm -f ext/config.cache config.cache config.log config.status
|
|
||||||
@rm -f *~ core *.core gmon.out y.tab.c y.output ruby.imp
|
|
||||||
|
|
||||||
distclean: distclean-ext distclean-local
|
|
||||||
|
|
||||||
realclean: distclean
|
|
||||||
@rm -f parse.c
|
|
||||||
@rm -f lex.c
|
|
||||||
|
|
||||||
test: miniruby$(EXEEXT) rbconfig.rb $(PROGRAM) PHONY
|
|
||||||
@./miniruby$(EXEEXT) $(srcdir)/rubytest.rb
|
|
||||||
|
|
||||||
rbconfig.rb: miniruby$(EXEEXT) $(srcdir)/mkconfig.rb config.status $(PREP)
|
|
||||||
@$(MINIRUBY) $(srcdir)/mkconfig.rb rbconfig.rb
|
|
||||||
|
|
||||||
fake.rb: miniruby$(EXEEXT) Makefile
|
|
||||||
@echo ' \
|
@echo ' \
|
||||||
class Object; \
|
class Object; \
|
||||||
CROSS_COMPILING = RUBY_PLATFORM; \
|
CROSS_COMPILING = RUBY_PLATFORM; \
|
||||||
|
@ -202,13 +137,7 @@ fake.rb: miniruby$(EXEEXT) Makefile
|
||||||
|
|
||||||
Makefile: $(srcdir)/Makefile.in
|
Makefile: $(srcdir)/Makefile.in
|
||||||
|
|
||||||
.PRECIOUS: @MAKEFILES@
|
$(MKFILES): config.status $(srcdir)/common.mk
|
||||||
|
|
||||||
.PHONY: test install install-nodoc install-doc
|
|
||||||
|
|
||||||
PHONY:
|
|
||||||
|
|
||||||
@MAKEFILES@: config.status
|
|
||||||
MAKE=$(MAKE) $(SHELL) ./config.status
|
MAKE=$(MAKE) $(SHELL) ./config.status
|
||||||
@{ \
|
@{ \
|
||||||
echo "all:; -@rm -f conftest.mk"; \
|
echo "all:; -@rm -f conftest.mk"; \
|
||||||
|
@ -224,11 +153,8 @@ config.status: $(srcdir)/configure
|
||||||
$(srcdir)/configure: $(srcdir)/configure.in
|
$(srcdir)/configure: $(srcdir)/configure.in
|
||||||
cd $(srcdir) && $(AUTOCONF)
|
cd $(srcdir) && $(AUTOCONF)
|
||||||
|
|
||||||
.c.@OBJEXT@:
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
|
||||||
|
|
||||||
lex.c: keywords
|
lex.c: keywords
|
||||||
@-rm -f $@
|
@-$(RM) $@
|
||||||
gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@ || \
|
gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@ || \
|
||||||
cp "$(srcdir)/$@" .
|
cp "$(srcdir)/$@" .
|
||||||
|
|
||||||
|
@ -237,144 +163,14 @@ lex.c: keywords
|
||||||
sed '/^#/s|y\.tab\.c|$@|' y.tab.c > $@
|
sed '/^#/s|y\.tab\.c|$@|' y.tab.c > $@
|
||||||
rm -f y.tab.c
|
rm -f y.tab.c
|
||||||
|
|
||||||
ext/extinit.@OBJEXT@: ext/extinit.c $(SETUP)
|
.c.@OBJEXT@:
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) @OUTFLAG@$@ -c ext/extinit.c
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||||
|
|
||||||
acosh.@OBJEXT@: $(srcdir)/missing/acosh.c
|
clean-local::
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/acosh.c
|
@$(RM) ext/extinit.c ext/extinit.$(OBJEXT)
|
||||||
|
|
||||||
alloca.@OBJEXT@: $(srcdir)/missing/alloca.c
|
distclean-local::
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/alloca.c
|
@$(RM) ext/config.cache $(RBCONFIG)
|
||||||
|
|
||||||
crypt.@OBJEXT@: $(srcdir)/missing/crypt.c
|
ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/crypt.c
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -o$@ -c ext/extinit.c
|
||||||
|
|
||||||
dup2.@OBJEXT@: $(srcdir)/missing/dup2.c
|
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/dup2.c
|
|
||||||
|
|
||||||
fileblocks.@OBJEXT@: $(srcdir)/missing/fileblocks.c
|
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/fileblocks.c
|
|
||||||
|
|
||||||
finite.@OBJEXT@: $(srcdir)/missing/finite.c
|
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/finite.c
|
|
||||||
|
|
||||||
flock.@OBJEXT@: $(srcdir)/missing/flock.c
|
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/flock.c
|
|
||||||
|
|
||||||
isinf.@OBJEXT@: $(srcdir)/missing/isinf.c
|
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/isinf.c
|
|
||||||
|
|
||||||
isnan.@OBJEXT@: $(srcdir)/missing/isnan.c
|
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/isnan.c
|
|
||||||
|
|
||||||
fnmatch.@OBJEXT@: $(srcdir)/missing/fnmatch.c
|
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/fnmatch.c
|
|
||||||
|
|
||||||
memcmp.@OBJEXT@: $(srcdir)/missing/memcmp.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/memcmp.c
|
|
||||||
|
|
||||||
memmove.@OBJEXT@: $(srcdir)/missing/memmove.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/memmove.c
|
|
||||||
|
|
||||||
mkdir.@OBJEXT@: $(srcdir)/missing/mkdir.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/mkdir.c
|
|
||||||
|
|
||||||
vsnprintf.@OBJEXT@: $(srcdir)/missing/vsnprintf.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/vsnprintf.c
|
|
||||||
|
|
||||||
strcasecmp.@OBJEXT@: $(srcdir)/missing/strcasecmp.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strcasecmp.c
|
|
||||||
|
|
||||||
strncasecmp.@OBJEXT@: $(srcdir)/missing/strncasecmp.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strncasecmp.c
|
|
||||||
|
|
||||||
strchr.@OBJEXT@: $(srcdir)/missing/strchr.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strchr.c
|
|
||||||
|
|
||||||
strerror.@OBJEXT@: $(srcdir)/missing/strerror.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strerror.c
|
|
||||||
|
|
||||||
strftime.@OBJEXT@: $(srcdir)/missing/strftime.c
|
|
||||||
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strftime.c
|
|
||||||
|
|
||||||
strstr.@OBJEXT@: $(srcdir)/missing/strstr.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strstr.c
|
|
||||||
|
|
||||||
strtol.@OBJEXT@: $(srcdir)/missing/strtol.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strtol.c
|
|
||||||
|
|
||||||
strtoul.@OBJEXT@: $(srcdir)/missing/strtoul.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strtoul.c
|
|
||||||
|
|
||||||
x68.@OBJEXT@: $(srcdir)/missing/x68.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/x68.c
|
|
||||||
|
|
||||||
os2.@OBJEXT@: $(srcdir)/missing/os2.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/os2.c
|
|
||||||
|
|
||||||
dl_os2.@OBJEXT@: $(srcdir)/missing/dl_os2.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/dl_os2.c
|
|
||||||
|
|
||||||
win32.@OBJEXT@: $(srcdir)/win32/win32.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -I$(srcdir)/win32 -c $(srcdir)/win32/win32.c
|
|
||||||
|
|
||||||
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
|
||||||
.NOEXPORT:
|
|
||||||
###
|
|
||||||
array.@OBJEXT@: array.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
util.h st.h
|
|
||||||
bignum.@OBJEXT@: bignum.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
class.@OBJEXT@: class.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
rubysig.h node.h st.h
|
|
||||||
compar.@OBJEXT@: compar.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
dir.@OBJEXT@: dir.c ruby.h config.h defines.h intern.h missing.h util.h
|
|
||||||
dln.@OBJEXT@: dln.c ruby.h config.h defines.h intern.h missing.h dln.h
|
|
||||||
dmyext.@OBJEXT@: dmyext.c
|
|
||||||
enum.@OBJEXT@: enum.c ruby.h config.h defines.h intern.h missing.h node.h \
|
|
||||||
util.h
|
|
||||||
error.@OBJEXT@: error.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
env.h st.h
|
|
||||||
eval.@OBJEXT@: eval.c ruby.h config.h defines.h intern.h missing.h node.h \
|
|
||||||
env.h util.h rubysig.h st.h dln.h
|
|
||||||
file.@OBJEXT@: file.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
rubyio.h rubysig.h util.h dln.h
|
|
||||||
gc.@OBJEXT@: gc.c ruby.h config.h defines.h intern.h missing.h rubysig.h \
|
|
||||||
st.h node.h env.h re.h regex.h
|
|
||||||
hash.@OBJEXT@: hash.c ruby.h config.h defines.h intern.h missing.h st.h \
|
|
||||||
util.h rubysig.h
|
|
||||||
inits.@OBJEXT@: inits.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
io.@OBJEXT@: io.c ruby.h config.h defines.h intern.h missing.h rubyio.h \
|
|
||||||
rubysig.h env.h util.h
|
|
||||||
main.@OBJEXT@: main.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
marshal.@OBJEXT@: marshal.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
rubyio.h st.h util.h
|
|
||||||
math.@OBJEXT@: math.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
numeric.@OBJEXT@: numeric.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
object.@OBJEXT@: object.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
st.h util.h
|
|
||||||
pack.@OBJEXT@: pack.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
parse.@OBJEXT@: parse.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
env.h node.h st.h regex.h util.h lex.c
|
|
||||||
prec.@OBJEXT@: prec.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
process.@OBJEXT@: process.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
rubysig.h st.h
|
|
||||||
random.@OBJEXT@: random.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
range.@OBJEXT@: range.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
re.@OBJEXT@: re.c ruby.h config.h defines.h intern.h missing.h re.h \
|
|
||||||
regex.h
|
|
||||||
regex.@OBJEXT@: regex.c config.h regex.h
|
|
||||||
ruby.@OBJEXT@: ruby.c ruby.h config.h defines.h intern.h missing.h dln.h \
|
|
||||||
node.h util.h
|
|
||||||
signal.@OBJEXT@: signal.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
rubysig.h
|
|
||||||
sprintf.@OBJEXT@: sprintf.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
st.@OBJEXT@: st.c config.h st.h
|
|
||||||
string.@OBJEXT@: string.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
re.h regex.h
|
|
||||||
struct.@OBJEXT@: struct.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
time.@OBJEXT@: time.c ruby.h config.h defines.h intern.h missing.h
|
|
||||||
util.@OBJEXT@: util.c ruby.h config.h defines.h intern.h missing.h util.h
|
|
||||||
variable.@OBJEXT@: variable.c ruby.h config.h defines.h intern.h \
|
|
||||||
missing.h env.h node.h st.h util.h
|
|
||||||
version.@OBJEXT@: version.c ruby.h config.h defines.h intern.h missing.h \
|
|
||||||
version.h
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
SHELL = $(COMSPEC)
|
SHELL = $(COMSPEC)
|
||||||
|
MKFILES = Makefile
|
||||||
|
|
||||||
#### Start of system configuration section. ####
|
#### Start of system configuration section. ####
|
||||||
OS = bccwin32
|
OS = bccwin32
|
||||||
|
@ -56,6 +57,7 @@ AR = tlib
|
||||||
|
|
||||||
PURIFY =
|
PURIFY =
|
||||||
AUTOCONF = autoconf
|
AUTOCONF = autoconf
|
||||||
|
RM = $(srcdir:/=\)\win32\rm.bat
|
||||||
|
|
||||||
!if !defined(PROCESSOR_ARCHITECTURE)
|
!if !defined(PROCESSOR_ARCHITECTURE)
|
||||||
PROCESSOR_ARCHITECTURE = x86
|
PROCESSOR_ARCHITECTURE = x86
|
||||||
|
@ -91,9 +93,26 @@ exec_prefix = $(prefix)
|
||||||
!ifndef libdir
|
!ifndef libdir
|
||||||
libdir = $(exec_prefix)/lib
|
libdir = $(exec_prefix)/lib
|
||||||
!endif
|
!endif
|
||||||
!ifndef DESTDIR
|
!if !defined(datadir)
|
||||||
DESTDIR = $(prefix)
|
datadir = $(prefix)/share
|
||||||
!endif
|
!endif
|
||||||
|
!ifndef EXTOUT
|
||||||
|
EXTOUT = .ext
|
||||||
|
!endif
|
||||||
|
!ifndef RIDATADIR
|
||||||
|
RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system
|
||||||
|
!endif
|
||||||
|
!ifndef TESTUI
|
||||||
|
TESTUI = console
|
||||||
|
!endif
|
||||||
|
!ifndef TESTS
|
||||||
|
TESTS =
|
||||||
|
!endif
|
||||||
|
!ifndef RDOCTARGET
|
||||||
|
RDOCTARGET = install-doc
|
||||||
|
!endif
|
||||||
|
|
||||||
|
OUTFLAG = -o
|
||||||
!ifndef CFLAGS
|
!ifndef CFLAGS
|
||||||
CFLAGS = -q -tWR -tWC $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
|
CFLAGS = -q -tWR -tWC $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
|
||||||
!endif
|
!endif
|
||||||
|
@ -135,6 +154,7 @@ PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
|
||||||
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
|
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
|
||||||
RUBYDEF = $(RUBY_SO_NAME).def
|
RUBYDEF = $(RUBY_SO_NAME).def
|
||||||
MINIRUBY = .\miniruby$(EXEEXT)
|
MINIRUBY = .\miniruby$(EXEEXT)
|
||||||
|
RUNRUBY = .\ruby$(EXEEXT) "$(srcdir)runruby.rb" --extout="$(EXTOUT)" --
|
||||||
|
|
||||||
ORGLIBPATH = $(LIB)
|
ORGLIBPATH = $(LIB)
|
||||||
|
|
||||||
|
@ -145,70 +165,46 @@ LIBRUBY_SO = $(RUBY_SO_NAME).dll
|
||||||
LIBRUBY = $(RUBY_SO_NAME).lib
|
LIBRUBY = $(RUBY_SO_NAME).lib
|
||||||
LIBRUBYARG = $(LIBRUBY)
|
LIBRUBYARG = $(LIBRUBY)
|
||||||
|
|
||||||
!ifndef EXTOBJS
|
PREP = miniruby$(EXEEXT)
|
||||||
EXTOBJS = dmyext.obj
|
|
||||||
!endif
|
|
||||||
|
|
||||||
MAINOBJ = main.obj
|
DMYOBJS = dmyext.obj
|
||||||
WINMAINOBJ = winmain.obj
|
OBJEXT = obj
|
||||||
|
|
||||||
OBJS = array.obj \
|
WINMAINOBJ = winmain.$(OBJEXT)
|
||||||
bignum.obj \
|
|
||||||
class.obj \
|
|
||||||
compar.obj \
|
|
||||||
dir.obj \
|
|
||||||
dln.obj \
|
|
||||||
enum.obj \
|
|
||||||
error.obj \
|
|
||||||
eval.obj \
|
|
||||||
file.obj \
|
|
||||||
gc.obj \
|
|
||||||
hash.obj \
|
|
||||||
inits.obj \
|
|
||||||
io.obj \
|
|
||||||
marshal.obj \
|
|
||||||
math.obj \
|
|
||||||
numeric.obj \
|
|
||||||
object.obj \
|
|
||||||
pack.obj \
|
|
||||||
parse.obj \
|
|
||||||
prec.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)
|
|
||||||
|
|
||||||
SCRIPT_ARGS = "--dest-dir=$(DESTDIR)" \
|
.path.c = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
|
||||||
"--make=$(MAKE)" \
|
.path.h = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
|
||||||
"--mflags=$(MFLAGS)" \
|
.path.y = $(srcdir)
|
||||||
"--make-flags=$(MAKEFLAGS)"
|
.path. = $(srcdir)
|
||||||
|
|
||||||
all: miniruby$(EXEEXT) rbconfig.rb \
|
.c.obj:
|
||||||
$(LIBRUBY) $(MISCLIBS)
|
$(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -c $(<:/=\)
|
||||||
.\miniruby$(EXEEXT) $(srcdir)ext/extmk.rb --extstatic=$(EXTSTATIC) $(SCRIPT_ARGS)
|
|
||||||
|
.rc.res:
|
||||||
|
$(RC) $(RFLAGS) -I. -I$(<D). $(iconinc) -I$(srcdir)win32 $(RFLAGS) -fo$@ $(<:/=\)
|
||||||
|
|
||||||
|
.y.c:
|
||||||
|
$(YACC) $(YFLAGS) $(<:\=/)
|
||||||
|
sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $(@F)
|
||||||
|
@del y.tab.c
|
||||||
|
|
||||||
|
all: $(srcdir)bcc32/Makefile.sub $(srcdir)common.mk
|
||||||
|
|
||||||
ruby: $(PROGRAM)
|
ruby: $(PROGRAM)
|
||||||
rubyw: $(WPROGRAM)
|
rubyw: $(WPROGRAM)
|
||||||
lib: $(LIBRUBY)
|
|
||||||
dll: $(LIBRUBY_SO)
|
|
||||||
|
|
||||||
config: config.h config.status
|
!include $(srcdir)/common.mk
|
||||||
|
|
||||||
config.h:
|
PHONY: Makefile
|
||||||
@echo Creating $(@:.\=)
|
|
||||||
@type > $@ &&|
|
CONFIG_H = ./.config.h.time
|
||||||
|
|
||||||
|
config: config.status
|
||||||
|
|
||||||
|
config.status: $(CONFIG_H)
|
||||||
|
|
||||||
|
$(CONFIG_H): $(MKFILES) $(srcdir)bcc32/Makefile.sub
|
||||||
|
@$(srcdir:/=\)win32\ifchange.bat config.h &&|
|
||||||
\#define HAVE_SYS_TYPES_H 1
|
\#define HAVE_SYS_TYPES_H 1
|
||||||
\#define HAVE_SYS_STAT_H 1
|
\#define HAVE_SYS_STAT_H 1
|
||||||
\#define HAVE_STDLIB_H 1
|
\#define HAVE_STDLIB_H 1
|
||||||
|
@ -274,7 +270,6 @@ config.h:
|
||||||
\#define STACK_GROW_DIRECTION -1
|
\#define STACK_GROW_DIRECTION -1
|
||||||
\#define DEFAULT_KCODE KCODE_NONE
|
\#define DEFAULT_KCODE KCODE_NONE
|
||||||
\#define DLEXT ".so"
|
\#define DLEXT ".so"
|
||||||
\#define DLEXT2 ".dll"
|
|
||||||
\#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR)"
|
\#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR)"
|
||||||
\#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
|
\#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
|
||||||
\#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)"
|
\#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)"
|
||||||
|
@ -282,12 +277,14 @@ config.h:
|
||||||
\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
||||||
\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
||||||
|
|
|
|
||||||
|
@exit > $@
|
||||||
|
|
||||||
config.status: Makefile $(srcdir)bcc32/Makefile.sub
|
config.status: $(MKFILES) $(srcdir)bcc32/Makefile.sub $(srcdir)common.mk
|
||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
@type > $@ &&|
|
@type > $@ &&|
|
||||||
# Generated automatically by Makefile.sub.
|
# Generated automatically by Makefile.sub.
|
||||||
s,@SHELL@,$$(COMSPEC),;t t
|
s,@SHELL@,$$(COMSPEC),;t t
|
||||||
|
s,@PATH_SEPARATOR@,;,;t t
|
||||||
s,@CFLAGS@,$(CFLAGS),;t t
|
s,@CFLAGS@,$(CFLAGS),;t t
|
||||||
s,@CPPFLAGS@,$(CPPFLAGS),;t t
|
s,@CPPFLAGS@,$(CPPFLAGS),;t t
|
||||||
s,@CXXFLAGS@,$(CXXFLAGS),;t t
|
s,@CXXFLAGS@,$(CXXFLAGS),;t t
|
||||||
|
@ -295,7 +292,7 @@ s,@FFLAGS@,$(FFLAGS),;t t
|
||||||
s,@LDFLAGS@,,;t t
|
s,@LDFLAGS@,,;t t
|
||||||
s,@LIBS@,$(LIBS),;t t
|
s,@LIBS@,$(LIBS),;t t
|
||||||
s,@exec_prefix@,$${prefix},;t t
|
s,@exec_prefix@,$${prefix},;t t
|
||||||
s,@prefix@,,;t t
|
s,@prefix@,$(prefix),;t t
|
||||||
s,@program_transform_name@,s,,,,;t t
|
s,@program_transform_name@,s,,,,;t t
|
||||||
s,@bindir@,$${exec_prefix}/bin,;t t
|
s,@bindir@,$${exec_prefix}/bin,;t t
|
||||||
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
||||||
|
@ -345,12 +342,16 @@ s,@STATIC@,$(STATIC),;t t
|
||||||
s,@CCDLFLAGS@,,;t t
|
s,@CCDLFLAGS@,,;t t
|
||||||
s,@LDSHARED@,$(LDSHARED),;t t
|
s,@LDSHARED@,$(LDSHARED),;t t
|
||||||
s,@DLEXT@,so,;t t
|
s,@DLEXT@,so,;t t
|
||||||
s,@DLEXT2@,dll,;t t
|
|
||||||
s,@LIBEXT@,lib,;t t
|
s,@LIBEXT@,lib,;t t
|
||||||
s,@STRIP@,$(STRIP),;t t
|
s,@STRIP@,$(STRIP),;t t
|
||||||
s,@EXTSTATIC@,$(EXTSTATIC),;t t
|
s,@EXTSTATIC@,$(EXTSTATIC),;t t
|
||||||
s,@setup@,Setup,;t t
|
s,@setup@,Setup,;t t
|
||||||
s,@MINIRUBY@,$(MINIRUBY),;t t
|
s,@MINIRUBY@,$(MINIRUBY),;t t
|
||||||
|
s,@PREP@,miniruby$(EXEEXT),;t t
|
||||||
|
s,@RUNRUBY@,$(RUNRUBY),;t t
|
||||||
|
s,@EXTOUT@,$(EXTOUT),;t t
|
||||||
|
s,@ARCHFILE@,,;t t
|
||||||
|
s,@RDOCTARGET@,,;t t
|
||||||
s,@LIBRUBY_LDSHARED@,$$(LDSHARED),;t t
|
s,@LIBRUBY_LDSHARED@,$$(LDSHARED),;t t
|
||||||
s,@LIBRUBY_DLDFLAGS@,-Gi $$(DLDFLAGS),;t t
|
s,@LIBRUBY_DLDFLAGS@,-Gi $$(DLDFLAGS),;t t
|
||||||
s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
|
s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
|
||||||
|
@ -367,7 +368,7 @@ s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
|
||||||
s,@SOLIBS@,$(SOLIBS),;t t
|
s,@SOLIBS@,$(SOLIBS),;t t
|
||||||
s,@DLDLIBS@,$(DLDLIBS),;t t
|
s,@DLDLIBS@,$(DLDLIBS),;t t
|
||||||
s,@ENABLE_SHARED@,yes,;t t
|
s,@ENABLE_SHARED@,yes,;t t
|
||||||
s,@OUTFLAG@,-o,;t t
|
s,@OUTFLAG@,$(OUTFLAG),;t t
|
||||||
s,@CPPOUTFILE@,,;t t
|
s,@CPPOUTFILE@,,;t t
|
||||||
s,@LIBPATHFLAG@, -L"%s",;t t
|
s,@LIBPATHFLAG@, -L"%s",;t t
|
||||||
s,@RPATHFLAG@,,;t t
|
s,@RPATHFLAG@,,;t t
|
||||||
|
@ -375,8 +376,9 @@ s,@LIBARG@,%s.lib,;t t
|
||||||
s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS), $$(@:/=\), nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE), $$(RESFILE),;t t
|
s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS), $$(@:/=\), nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE), $$(RESFILE),;t t
|
||||||
s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c $$(<:/=\),;t t
|
s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c $$(<:/=\),;t t
|
||||||
s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -P -c $$(<:/=\),;t t
|
s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -P -c $$(<:/=\),;t t
|
||||||
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: .%s.%s:,;t t
|
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
|
||||||
s,@COMMON_LIBS@,m,;t t
|
s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
|
||||||
|
s,@COMMON_LIBS@,m advapi32 avicap32 avifil32 cap comctl32 comdlg32 dlcapi gdi32 glu32 imagehlp imm32 inetmib1 kernel32 loadperf lsapi32 lz32 mapi32 mgmtapi mpr msacm32 msvfw32 nddeapi netapi32 ole32 oleaut32 oledlg olepro32 opengl32 pdh pkpd32 rasapi32 rasdlg rassapi rpcrt4 setupapi shell32 shfolder snmpapi sporder tapi32 url user32 vdmdbg version win32spl winmm wintrust wsock32,;t t
|
||||||
s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
|
s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
|
||||||
s,@COMMON_HEADERS@,winsock2.h windows.h,;t t
|
s,@COMMON_HEADERS@,winsock2.h windows.h,;t t
|
||||||
s,@TRY_LINK@,$$(CC) -oconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(LIBPATH) $$(LDFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS),;t t
|
s,@TRY_LINK@,$$(CC) -oconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(LIBPATH) $$(LDFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS),;t t
|
||||||
|
@ -390,9 +392,9 @@ s,@srcdir@,$(srcdir),;t t
|
||||||
s,@top_srcdir@,$(srcdir),;t t
|
s,@top_srcdir@,$(srcdir),;t t
|
||||||
|
|
|
|
||||||
|
|
||||||
miniruby$(EXEEXT): $(LIBRUBY_A) $(MAINOBJ) dmyext.obj
|
miniruby$(EXEEXT):
|
||||||
@echo $(LIBS)
|
@echo $(LIBS)
|
||||||
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) dmyext.obj,$@,nul,$(LIBRUBY_A) $(LIBS)
|
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,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
|
||||||
|
@ -407,83 +409,14 @@ $(LIBRUBY_A): $(OBJS) dmyext.obj
|
||||||
# $(LIBRUBY): $(LIBRUBY_SO)
|
# $(LIBRUBY): $(LIBRUBY_SO)
|
||||||
# implib $@ $(LIBRUBY_SO)
|
# implib $@ $(LIBRUBY_SO)
|
||||||
|
|
||||||
$(LIBRUBY_SO) $(LIBRUBY): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
|
$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
|
||||||
@echo $(EXTOBJS)
|
@echo $(EXTOBJS)
|
||||||
$(LIBRUBY_LDSHARED) $(LIBRUBY_DLDFLAGS) $(EXTOBJS:/=\),$(LIBRUBY_SO),nul,$(LIBRUBY_A) $(LIBS),$(RUBYDEF),$(RUBY_SO_NAME).res
|
$(LIBRUBY_LDSHARED) $(LIBRUBY_DLDFLAGS) $(EXTOBJS:/=\),$(LIBRUBY_SO),nul,$(LIBRUBY_A) $(LIBS),$(RUBYDEF),$(RUBY_SO_NAME).res
|
||||||
|
|
||||||
$(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)
|
$(LIBRUBY): $(LIBRUBY_SO)
|
||||||
$(MINIRUBY) $(srcdir)bcc32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
|
||||||
|
|
||||||
install: rbconfig.rb
|
$(RUBYDEF): $(LIBRUBY_A) $(PREP)
|
||||||
$(MINIRUBY) $(srcdir)instruby.rb $(SCRIPT_ARGS)
|
$(MINIRUBY) $(srcdir)bcc32/mkexports.rb -output=$@ -base=$(RUBY_SO_NAME) $(LIBRUBY_A)
|
||||||
$(MINIRUBY) $(srcdir)ext/extmk.rb $(SCRIPT_ARGS) install
|
|
||||||
|
|
||||||
what-where no-install: rbconfig.rb
|
|
||||||
$(MINIRUBY) $(srcdir)instruby.rb -n $(SCRIPT_ARGS)
|
|
||||||
$(MINIRUBY) $(srcdir)ext/extmk.rb -n $(SCRIPT_ARGS) install
|
|
||||||
|
|
||||||
clean: clean-ext clean-local
|
|
||||||
|
|
||||||
clean-local:
|
|
||||||
@if exist $(LIBRUBY_A) del $(LIBRUBY_A)
|
|
||||||
@if exist $(MAINOBJ) del $(MAINOBJ)
|
|
||||||
@if exist rbconfig.rb del rbconfig.rb
|
|
||||||
@if exist ext\extinit.c del ext\extinit.c
|
|
||||||
@if exist ext\extinit.obj del ext\extinit.obj
|
|
||||||
@if exist ext\vc*.pdb del ext\vc*.pdb
|
|
||||||
@if exist *.obj del *.obj
|
|
||||||
@if exist *.res del *.res
|
|
||||||
@if exist *.tds del *.tds
|
|
||||||
@if exist *.il? del *.il?
|
|
||||||
|
|
||||||
clean-ext:
|
|
||||||
@-$(MINIRUBY) $(srcdir)ext/extmk.rb $(SCRIPT_ARGS) clean
|
|
||||||
|
|
||||||
distclean: distclean-ext distclean-local
|
|
||||||
|
|
||||||
distclean-local: clean-local
|
|
||||||
@if exist Makefile del Makefile
|
|
||||||
@if exist config.h del config.h
|
|
||||||
@if exist ext\config.cache del ext\config.cache
|
|
||||||
@if exist config.cache del config.cache
|
|
||||||
@if exist config.log del config.log
|
|
||||||
@if exist config.status del config.status
|
|
||||||
@if exist *~ del *~
|
|
||||||
@if exist *.bak del *.bak
|
|
||||||
@if exist *.stackdump del *.stackdump
|
|
||||||
@if exist *.core del *.core
|
|
||||||
@if exist gmon.out del gmon.out
|
|
||||||
@if exist y.tab.c del y.tab.c
|
|
||||||
@if exist y.output del y.output
|
|
||||||
@if exist *.map del *.map
|
|
||||||
@if exist *.pdb del *.pdb
|
|
||||||
@if exist *.ilk del *.ilk
|
|
||||||
@if exist *.exp del *.exp
|
|
||||||
@if exist $(RUBYDEF) del $(RUBYDEF)
|
|
||||||
@if exist $(RUBY_INSTALL_NAME).rc del $(RUBY_INSTALL_NAME).rc
|
|
||||||
@if exist $(RUBYW_INSTALL_NAME).rc del $(RUBYW_INSTALL_NAME).rc
|
|
||||||
@if exist $(RUBY_SO_NAME).rc del $(RUBY_SO_NAME).rc
|
|
||||||
@if exist $(PROGRAM) del $(PROGRAM)
|
|
||||||
@if exist $(WPROGRAM) del $(WPROGRAM)
|
|
||||||
@if exist $(LIBRUBY_SO) del $(LIBRUBY_SO)
|
|
||||||
@if exist $(LIBRUBY) del $(LIBRUBY)
|
|
||||||
@if exist ext\nul if not exist ext\* rmdir ext
|
|
||||||
@if exist miniruby$(EXEEXT) del miniruby$(EXEEXT)
|
|
||||||
|
|
||||||
distclean-ext:
|
|
||||||
@-$(MINIRUBY) $(srcdir)ext/extmk.rb $(SCRIPT_ARGS) distclean
|
|
||||||
|
|
||||||
realclean: distclean
|
|
||||||
@if exist parse.c del parse.c
|
|
||||||
@if exist lex.c del lex.c
|
|
||||||
|
|
||||||
test: miniruby$(EXEEXT) rbconfig.rb $(PROGRAM) NUL
|
|
||||||
@$(MINIRUBY) $(srcdir)rubytest.rb
|
|
||||||
|
|
||||||
rbconfig.rb: miniruby$(EXEEXT) config.status
|
|
||||||
@$(MINIRUBY) $(srcdir)mkconfig.rb -srcdir=$(srcdir) \
|
|
||||||
-install_name=$(RUBY_INSTALL_NAME) \
|
|
||||||
-so_name=$(RUBY_SO_NAME) rbconfig.rb
|
|
||||||
|
|
||||||
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
||||||
@$(MINIRUBY) $(srcdir)win32/resource.rb \
|
@$(MINIRUBY) $(srcdir)win32/resource.rb \
|
||||||
|
@ -492,95 +425,56 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
||||||
-so_name=$(RUBY_SO_NAME) \
|
-so_name=$(RUBY_SO_NAME) \
|
||||||
. $(icondirs) $(srcdir)win32
|
. $(icondirs) $(srcdir)win32
|
||||||
|
|
||||||
#config.status: $(srcdir)configure
|
post-install-ext::
|
||||||
# $(SHELL) .config.status --recheck
|
$(MINIRUBY) -I$(srcdir)lib -rrbconfig -rfileutils \
|
||||||
|
-e 'FileUtils.rm_f(Dir[File.join(Config::CONFIG["archdir"],"**","*.tds")])'
|
||||||
|
|
||||||
.path.c = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
|
clean-local::
|
||||||
.path.h = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
|
@$(RM) ext\extinit.c ext\extinit.$(OBJEXT) *.tds *.il? $(RUBY_SO_NAME).lib
|
||||||
.path.y = $(srcdir)
|
@$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
|
||||||
|
|
||||||
.c.obj:
|
distclean-local::
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -c $(<:/=\)
|
@$(RM) ext\config.cache $(RBCONFIG:/=\)
|
||||||
|
@$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF)
|
||||||
.rc.res:
|
@$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
|
||||||
$(RC) $(RFLAGS) -I. -I$(<D). $(iconinc) -I$(srcdir)win32 $(RFLAGS) -fo$@ $(<:/=\)
|
|
||||||
|
|
||||||
.y.c:
|
|
||||||
$(YACC) $(YFLAGS) $(<:\=/)
|
|
||||||
sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $(@F)
|
|
||||||
@del y.tab.c
|
|
||||||
|
|
||||||
parse.c: parse.y
|
|
||||||
|
|
||||||
ext/extinit.obj: ext/extinit.c $(SETUP)
|
ext/extinit.obj: ext/extinit.c $(SETUP)
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -o$@ -c ext/extinit.c
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -o$@ -c ext/extinit.c
|
||||||
|
|
||||||
acosh.obj: acosh.c win32.h
|
main.$(OBJEXT): win32.h
|
||||||
alloca.obj: alloca.c win32.h
|
array.$(OBJEXT): win32.h
|
||||||
crypt.obj: crypt.c win32.h
|
bignum.$(OBJEXT): win32.h
|
||||||
dup2.obj: dup2.c win32.h
|
class.$(OBJEXT): win32.h
|
||||||
erf.obj: erf.c win32.h
|
compar.$(OBJEXT): win32.h
|
||||||
finite.obj: finite.c win32.h
|
dir.$(OBJEXT): dir.h win32.h
|
||||||
flock.obj: flock.c win32.h
|
dln.$(OBJEXT): win32.h
|
||||||
memcmp.obj: memcmp.c win32.h
|
enum.$(OBJEXT): win32.h
|
||||||
memmove.obj: memmove.c win32.h
|
error.$(OBJEXT): win32.h
|
||||||
mkdir.obj: mkdir.c win32.h
|
eval.$(OBJEXT): win32.h
|
||||||
vsnprintf.obj: vsnprintf.c win32.h
|
file.$(OBJEXT): win32.h
|
||||||
strcasecmp.obj: strcasecmp.c win32.h
|
gc.$(OBJEXT): win32.h
|
||||||
strncasecmp.obj: strncasecmp.c win32.h
|
hash.$(OBJEXT): win32.h
|
||||||
strchr.obj: strchr.c win32.h
|
inits.$(OBJEXT): win32.h
|
||||||
strdup.obj: strdup.c win32.h
|
io.$(OBJEXT): win32.h
|
||||||
strerror.obj: strerror.c win32.h
|
marshal.$(OBJEXT): win32.h
|
||||||
strftime.obj: strftime.c win32.h
|
math.$(OBJEXT): win32.h
|
||||||
strstr.obj: strstr.c win32.h
|
numeric.$(OBJEXT): win32.h
|
||||||
strtod.obj: strtod.c win32.h
|
object.$(OBJEXT): win32.h
|
||||||
strtol.obj: strtol.c win32.h
|
pack.$(OBJEXT): win32.h
|
||||||
strtoul.obj: strtoul.c win32.h
|
parse.$(OBJEXT): win32.h
|
||||||
nt.obj: nt.c win32.h
|
process.$(OBJEXT): win32.h
|
||||||
x68.obj: x68.c win32.h
|
prec.$(OBJEXT): win32.h
|
||||||
os2.obj: os2.c win32.h
|
random.$(OBJEXT): win32.h
|
||||||
dl_os2.obj: dl_os2.c win32.h
|
range.$(OBJEXT): win32.h
|
||||||
|
re.$(OBJEXT): win32.h
|
||||||
# when I use -I., there is confliction at "OpenFile"
|
regex.$(OBJEXT): win32.h
|
||||||
# so, set . into environment varible "include"
|
ruby.$(OBJEXT): win32.h
|
||||||
win32.obj: win32.c win32.h
|
signal.$(OBJEXT): win32.h
|
||||||
|
sprintf.$(OBJEXT): win32.h
|
||||||
###
|
st.$(OBJEXT): win32.h
|
||||||
array.obj: array.c ruby.h config.h defines.h intern.h missing.h util.h st.h win32.h
|
string.$(OBJEXT): win32.h
|
||||||
bignum.obj: bignum.c ruby.h config.h defines.h intern.h missing.h win32.h
|
struct.$(OBJEXT): win32.h
|
||||||
class.obj: class.c ruby.h config.h defines.h intern.h missing.h rubysig.h node.h st.h win32.h
|
time.$(OBJEXT): win32.h
|
||||||
compar.obj: compar.c ruby.h config.h defines.h intern.h missing.h win32.h
|
util.$(OBJEXT): win32.h
|
||||||
dir.obj: dir.c ruby.h config.h defines.h intern.h missing.h util.h win32.h
|
variable.$(OBJEXT): win32.h
|
||||||
dln.obj: dln.c ruby.h config.h defines.h intern.h missing.h dln.h win32.h
|
version.$(OBJEXT): win32.h
|
||||||
dmyext.obj: dmyext.c
|
|
||||||
enum.obj: enum.c ruby.h config.h defines.h intern.h missing.h node.h util.h win32.h
|
|
||||||
error.obj: error.c ruby.h config.h defines.h intern.h missing.h env.h st.h win32.h
|
|
||||||
eval.obj: eval.c ruby.h config.h defines.h intern.h missing.h node.h env.h util.h rubysig.h st.h dln.h win32.h
|
|
||||||
file.obj: file.c ruby.h config.h defines.h intern.h missing.h rubyio.h rubysig.h util.h dln.h win32.h
|
|
||||||
gc.obj: gc.c ruby.h config.h defines.h intern.h missing.h rubysig.h st.h node.h env.h re.h regex.h win32.h
|
|
||||||
hash.obj: hash.c ruby.h config.h defines.h intern.h missing.h st.h util.h rubysig.h win32.h
|
|
||||||
inits.obj: inits.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
io.obj: io.c ruby.h config.h defines.h intern.h missing.h rubyio.h rubysig.h env.h util.h win32.h
|
|
||||||
main.obj: main.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
marshal.obj: marshal.c ruby.h config.h defines.h intern.h missing.h rubyio.h st.h util.h win32.h
|
|
||||||
math.obj: math.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
numeric.obj: numeric.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
object.obj: object.c ruby.h config.h defines.h intern.h missing.h st.h util.h win32.h
|
|
||||||
pack.obj: pack.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
parse.obj: parse.c ruby.h config.h defines.h intern.h missing.h env.h node.h st.h regex.h util.h lex.c win32.h
|
|
||||||
prec.obj: prec.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
process.obj: process.c ruby.h config.h defines.h intern.h missing.h rubysig.h st.h win32.h
|
|
||||||
random.obj: random.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
range.obj: range.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
re.obj: re.c ruby.h config.h defines.h intern.h missing.h re.h regex.h win32.h
|
|
||||||
regex.obj: regex.c config.h regex.h win32.h
|
|
||||||
ruby.obj: ruby.c ruby.h config.h defines.h intern.h missing.h dln.h node.h util.h win32.h
|
|
||||||
signal.obj: signal.c ruby.h config.h defines.h intern.h missing.h rubysig.h win32.h
|
|
||||||
sprintf.obj: sprintf.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
st.obj: st.c config.h st.h
|
|
||||||
string.obj: string.c ruby.h config.h defines.h intern.h missing.h re.h regex.h win32.h
|
|
||||||
struct.obj: struct.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
time.obj: time.c ruby.h config.h defines.h intern.h missing.h win32.h
|
|
||||||
util.obj: util.c ruby.h config.h defines.h intern.h missing.h util.h win32.h
|
|
||||||
variable.obj: variable.c ruby.h config.h defines.h intern.h missing.h env.h node.h st.h util.h win32.h
|
|
||||||
version.obj: version.c ruby.h config.h defines.h intern.h missing.h version.h win32.h
|
|
||||||
|
|
|
@ -8,25 +8,79 @@ echo>> ~tmp~.mak conf = %0
|
||||||
echo>> ~tmp~.mak $(conf:\=/): nul
|
echo>> ~tmp~.mak $(conf:\=/): nul
|
||||||
echo>> ~tmp~.mak @del ~tmp~.mak
|
echo>> ~tmp~.mak @del ~tmp~.mak
|
||||||
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)setup.mak \
|
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)setup.mak \
|
||||||
echo>> ~tmp~.mak bcc32dir="$(@D)" \
|
|
||||||
:loop
|
:loop
|
||||||
if "%1" == "" goto :end
|
if "%1" == "" goto :end
|
||||||
|
if "%1" == "--prefix" goto :prefix
|
||||||
if "%1" == "--srcdir" goto :srcdir
|
if "%1" == "--srcdir" goto :srcdir
|
||||||
if "%1" == "srcdir" goto :srcdir
|
if "%1" == "srcdir" goto :srcdir
|
||||||
if "%1" == "--target" goto :target
|
if "%1" == "--target" goto :target
|
||||||
if "%1" == "target" goto :target
|
if "%1" == "target" goto :target
|
||||||
echo>> ~tmp~.mak "%1"
|
if "%1" == "--with-static-linked-ext" goto :extstatic
|
||||||
|
if "%1" == "--program-suffix" goto :suffix
|
||||||
|
if "%1" == "--program-name" goto :progname
|
||||||
|
if "%1" == "--enable-install-doc" goto :enable-rdoc
|
||||||
|
if "%1" == "--disable-install-doc" goto :disable-rdoc
|
||||||
|
if "%1" == "-h" goto :help
|
||||||
|
if "%1" == "--help" goto :help
|
||||||
|
echo>> ~tmp~.mak "%1" \
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:srcdir
|
:srcdir
|
||||||
echo>> ~tmp~.mak "srcdir=%2"
|
echo>> ~tmp~.mak -D"srcdir=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:prefix
|
||||||
|
echo>> ~tmp~.mak -D"prefix=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:suffix
|
||||||
|
echo>> ~tmp~.mak -D"RUBY_SUFFIX=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:installname
|
||||||
|
echo>> ~tmp~.mak -D"RUBY_INSTALL_NAME=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:soname
|
||||||
|
echo>> ~tmp~.mak -D"RUBY_SO_NAME=%2" \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:target
|
:target
|
||||||
echo>> ~tmp~.mak %2
|
echo>> ~tmp~.mak "%2" \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
|
:extstatic
|
||||||
|
echo>> ~tmp~.mak -D"EXTSTATIC=static" \
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:enable-rdoc
|
||||||
|
echo>> ~tmp~.mak -D"RDOCTARGET=install-doc" \
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:disable-rdoc
|
||||||
|
echo>> ~tmp~.mak -D"RDOCTARGET=install-nodoc" \
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:help
|
||||||
|
echo Configuration:
|
||||||
|
echo --help display this help
|
||||||
|
echo --srcdir=DIR find the sources in DIR [configure dir or `..']
|
||||||
|
echo Installation directories:
|
||||||
|
echo --prefix=PREFIX install files in PREFIX [/usr]
|
||||||
|
echo System types:
|
||||||
|
echo --target=TARGET configure for TARGET [i386-bccwin32]
|
||||||
|
echo Optional Package:
|
||||||
|
echo --with-static-linked-ext link external modules statically
|
||||||
|
echo --enable-install-doc install rdoc indexes during install
|
||||||
|
del ~tmp~.mak
|
||||||
|
goto :exit
|
||||||
:end
|
:end
|
||||||
|
echo>> ~tmp~.mak bcc32dir="$(@D)"
|
||||||
make -s -f ~tmp~.mak
|
make -s -f ~tmp~.mak
|
||||||
|
:exit
|
||||||
|
|
29
common.mk
29
common.mk
|
@ -9,7 +9,6 @@ DMYEXT = dmyext.$(OBJEXT)
|
||||||
MAINOBJ = main.$(OBJEXT)
|
MAINOBJ = main.$(OBJEXT)
|
||||||
|
|
||||||
OBJS = array.$(OBJEXT) \
|
OBJS = array.$(OBJEXT) \
|
||||||
ascii.$(OBJEXT) \
|
|
||||||
bignum.$(OBJEXT) \
|
bignum.$(OBJEXT) \
|
||||||
class.$(OBJEXT) \
|
class.$(OBJEXT) \
|
||||||
compar.$(OBJEXT) \
|
compar.$(OBJEXT) \
|
||||||
|
@ -17,7 +16,6 @@ OBJS = array.$(OBJEXT) \
|
||||||
dln.$(OBJEXT) \
|
dln.$(OBJEXT) \
|
||||||
enum.$(OBJEXT) \
|
enum.$(OBJEXT) \
|
||||||
error.$(OBJEXT) \
|
error.$(OBJEXT) \
|
||||||
euc_jp.$(OBJEXT) \
|
|
||||||
eval.$(OBJEXT) \
|
eval.$(OBJEXT) \
|
||||||
file.$(OBJEXT) \
|
file.$(OBJEXT) \
|
||||||
gc.$(OBJEXT) \
|
gc.$(OBJEXT) \
|
||||||
|
@ -35,20 +33,14 @@ OBJS = array.$(OBJEXT) \
|
||||||
random.$(OBJEXT) \
|
random.$(OBJEXT) \
|
||||||
range.$(OBJEXT) \
|
range.$(OBJEXT) \
|
||||||
re.$(OBJEXT) \
|
re.$(OBJEXT) \
|
||||||
regcomp.$(OBJEXT) \
|
regex.$(OBJEXT) \
|
||||||
regenc.$(OBJEXT) \
|
|
||||||
regerror.$(OBJEXT) \
|
|
||||||
regexec.$(OBJEXT) \
|
|
||||||
regparse.$(OBJEXT) \
|
|
||||||
ruby.$(OBJEXT) \
|
ruby.$(OBJEXT) \
|
||||||
signal.$(OBJEXT) \
|
signal.$(OBJEXT) \
|
||||||
sjis.$(OBJEXT) \
|
|
||||||
sprintf.$(OBJEXT) \
|
sprintf.$(OBJEXT) \
|
||||||
st.$(OBJEXT) \
|
st.$(OBJEXT) \
|
||||||
string.$(OBJEXT) \
|
string.$(OBJEXT) \
|
||||||
struct.$(OBJEXT) \
|
struct.$(OBJEXT) \
|
||||||
time.$(OBJEXT) \
|
time.$(OBJEXT) \
|
||||||
utf8.$(OBJEXT) \
|
|
||||||
util.$(OBJEXT) \
|
util.$(OBJEXT) \
|
||||||
variable.$(OBJEXT) \
|
variable.$(OBJEXT) \
|
||||||
version.$(OBJEXT) \
|
version.$(OBJEXT) \
|
||||||
|
@ -198,8 +190,6 @@ win32.$(OBJEXT): {$(VPATH)}win32.c
|
||||||
array.$(OBJEXT): {$(VPATH)}array.c {$(VPATH)}ruby.h config.h \
|
array.$(OBJEXT): {$(VPATH)}array.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)}util.h {$(VPATH)}st.h
|
{$(VPATH)}util.h {$(VPATH)}st.h
|
||||||
ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h \
|
|
||||||
{$(VPATH)}oniguruma.h config.h
|
|
||||||
bignum.$(OBJEXT): {$(VPATH)}bignum.c {$(VPATH)}ruby.h config.h \
|
bignum.$(OBJEXT): {$(VPATH)}bignum.c {$(VPATH)}ruby.h config.h \
|
||||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
|
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
|
||||||
class.$(OBJEXT): {$(VPATH)}class.c {$(VPATH)}ruby.h config.h \
|
class.$(OBJEXT): {$(VPATH)}class.c {$(VPATH)}ruby.h config.h \
|
||||||
|
@ -220,8 +210,6 @@ enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h config.h \
|
||||||
error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}ruby.h config.h \
|
error.$(OBJEXT): {$(VPATH)}error.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)}env.h {$(VPATH)}st.h
|
{$(VPATH)}env.h {$(VPATH)}st.h
|
||||||
euc_jp.$(OBJEXT): {$(VPATH)}euc_jp.c {$(VPATH)}regenc.h \
|
|
||||||
{$(VPATH)}oniguruma.h
|
|
||||||
eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}ruby.h config.h \
|
eval.$(OBJEXT): {$(VPATH)}eval.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)}node.h {$(VPATH)}env.h {$(VPATH)}util.h \
|
{$(VPATH)}node.h {$(VPATH)}env.h {$(VPATH)}util.h \
|
||||||
|
@ -273,24 +261,13 @@ range.$(OBJEXT): {$(VPATH)}range.c {$(VPATH)}ruby.h config.h \
|
||||||
re.$(OBJEXT): {$(VPATH)}re.c {$(VPATH)}ruby.h config.h \
|
re.$(OBJEXT): {$(VPATH)}re.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)}re.h {$(VPATH)}regex.h
|
{$(VPATH)}re.h {$(VPATH)}regex.h
|
||||||
regcomp.$(OBJEXT): {$(VPATH)}regcomp.c {$(VPATH)}oniguruma.h \
|
regex.$(OBJEXT): {$(VPATH)}regex.c config.h {$(VPATH)}regex.h
|
||||||
{$(VPATH)}regint.h {$(VPATH)}regparse.h {$(VPATH)}regenc.h config.h
|
|
||||||
regenc.$(OBJEXT): {$(VPATH)}regenc.c {$(VPATH)}regint.h \
|
|
||||||
{$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h
|
|
||||||
regerror.$(OBJEXT): {$(VPATH)}regerror.c {$(VPATH)}regint.h \
|
|
||||||
{$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h
|
|
||||||
regexec.$(OBJEXT): {$(VPATH)}regexec.c {$(VPATH)}regint.h \
|
|
||||||
{$(VPATH)}regenc.h {$(VPATH)}oniguruma.h config.h
|
|
||||||
regparse.$(OBJEXT): {$(VPATH)}regparse.c {$(VPATH)}oniguruma.h \
|
|
||||||
{$(VPATH)}regint.h {$(VPATH)}regparse.h {$(VPATH)}regenc.h config.h
|
|
||||||
ruby.$(OBJEXT): {$(VPATH)}ruby.c {$(VPATH)}ruby.h config.h \
|
ruby.$(OBJEXT): {$(VPATH)}ruby.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)}node.h {$(VPATH)}util.h
|
{$(VPATH)}dln.h {$(VPATH)}node.h {$(VPATH)}util.h
|
||||||
signal.$(OBJEXT): {$(VPATH)}signal.c {$(VPATH)}ruby.h config.h \
|
signal.$(OBJEXT): {$(VPATH)}signal.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)}rubysig.h
|
{$(VPATH)}rubysig.h
|
||||||
sjis.$(OBJEXT): {$(VPATH)}sjis.c {$(VPATH)}regenc.h \
|
|
||||||
{$(VPATH)}oniguruma.h config.h
|
|
||||||
sprintf.$(OBJEXT): {$(VPATH)}sprintf.c {$(VPATH)}ruby.h config.h \
|
sprintf.$(OBJEXT): {$(VPATH)}sprintf.c {$(VPATH)}ruby.h config.h \
|
||||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
|
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
|
||||||
st.$(OBJEXT): {$(VPATH)}st.c config.h {$(VPATH)}st.h
|
st.$(OBJEXT): {$(VPATH)}st.c config.h {$(VPATH)}st.h
|
||||||
|
@ -301,8 +278,6 @@ struct.$(OBJEXT): {$(VPATH)}struct.c {$(VPATH)}ruby.h config.h \
|
||||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
|
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
|
||||||
time.$(OBJEXT): {$(VPATH)}time.c {$(VPATH)}ruby.h config.h \
|
time.$(OBJEXT): {$(VPATH)}time.c {$(VPATH)}ruby.h config.h \
|
||||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
|
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
|
||||||
utf8.$(OBJEXT): {$(VPATH)}utf8.c {$(VPATH)}regenc.h \
|
|
||||||
{$(VPATH)}oniguruma.h config.h
|
|
||||||
util.$(OBJEXT): {$(VPATH)}util.c {$(VPATH)}ruby.h config.h \
|
util.$(OBJEXT): {$(VPATH)}util.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)}util.h
|
{$(VPATH)}util.h
|
||||||
|
|
30
configure.in
30
configure.in
|
@ -192,6 +192,15 @@ AC_PROG_MAKE_SET
|
||||||
AC_AIX
|
AC_AIX
|
||||||
AC_MINIX
|
AC_MINIX
|
||||||
|
|
||||||
|
AC_SUBST(RM, ['rm -f'])
|
||||||
|
AC_SUBST(CP, ['cp -v'])
|
||||||
|
AC_SUBST(INSTALL, ['install -vp'])
|
||||||
|
if $as_mkdir_p; then
|
||||||
|
AC_SUBST(MAKEDIRS, ['mkdir -p'])
|
||||||
|
else
|
||||||
|
AC_SUBST(MAKEDIRS, ['install -d'])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl check for large file stuff
|
dnl check for large file stuff
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
|
@ -246,7 +255,7 @@ if test "$rb_cv_stdarg" = yes; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CACHE_CHECK([for noreturn], rb_cv_noreturn,
|
AC_CACHE_CHECK([for noreturn], rb_cv_noreturn,
|
||||||
[rb_cv_noreturn=no
|
[rb_cv_noreturn=x
|
||||||
for mac in "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do
|
for mac in "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do
|
||||||
AC_TRY_COMPILE(
|
AC_TRY_COMPILE(
|
||||||
[#define NORETURN(x) $mac
|
[#define NORETURN(x) $mac
|
||||||
|
@ -830,6 +839,7 @@ if test "$with_dln_a_out" != yes; then
|
||||||
hpux*) DLDFLAGS="$DLDFLAGS -E"
|
hpux*) DLDFLAGS="$DLDFLAGS -E"
|
||||||
: ${LDSHARED='ld -b'}
|
: ${LDSHARED='ld -b'}
|
||||||
XLDFLAGS="$XLDFLAGS -Wl,-E"
|
XLDFLAGS="$XLDFLAGS -Wl,-E"
|
||||||
|
: ${LIBPATHENV=SHLIB_PATH}
|
||||||
rb_cv_dlopen=yes;;
|
rb_cv_dlopen=yes;;
|
||||||
solaris*) if test "$GCC" = yes; then
|
solaris*) if test "$GCC" = yes; then
|
||||||
: ${LDSHARED='$(CC) -Wl,-G'}
|
: ${LDSHARED='$(CC) -Wl,-G'}
|
||||||
|
@ -891,6 +901,7 @@ if test "$with_dln_a_out" != yes; then
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
|
darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
|
||||||
: ${LDFLAGS=""}
|
: ${LDFLAGS=""}
|
||||||
|
: ${LIBPATHENV=DYLD_LIBRARY_PATH}
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
|
aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
|
||||||
XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
|
XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
|
||||||
|
@ -899,6 +910,7 @@ if test "$with_dln_a_out" != yes; then
|
||||||
: ${ARCHFILE="ruby.imp"}
|
: ${ARCHFILE="ruby.imp"}
|
||||||
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS) $(CFLAGS)'
|
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS) $(CFLAGS)'
|
||||||
TRY_LINK="$TRY_LINK"' $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'
|
TRY_LINK="$TRY_LINK"' $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'
|
||||||
|
: ${LIBPATHENV=SHLIB_PATH}
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
|
|
||||||
human*) : ${DLDFLAGS=''}
|
human*) : ${DLDFLAGS=''}
|
||||||
|
@ -916,6 +928,7 @@ if test "$with_dln_a_out" != yes; then
|
||||||
DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot"
|
DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
: ${LIBPATHENV=LIBRARY_PATH}
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
nto-qnx*) DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
|
nto-qnx*) DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
|
||||||
: ${LDSHARED='ld -Bshareable -x'}
|
: ${LDSHARED='ld -Bshareable -x'}
|
||||||
|
@ -924,6 +937,7 @@ if test "$with_dln_a_out" != yes; then
|
||||||
cygwin*|mingw*) : ${LDSHARED="${CC} -shared -s"}
|
cygwin*|mingw*) : ${LDSHARED="${CC} -shared -s"}
|
||||||
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x02000000"
|
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x02000000"
|
||||||
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import,--export-all"
|
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import,--export-all"
|
||||||
|
: ${LIBPATHENV=""}
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
hiuxmpp) : ${LDSHARED='ld -r'} ;;
|
hiuxmpp) : ${LDSHARED='ld -r'} ;;
|
||||||
atheos*) : ${LDSHARED="$CC -shared"}
|
atheos*) : ${LDSHARED="$CC -shared"}
|
||||||
|
@ -945,6 +959,7 @@ fi
|
||||||
AC_SUBST(LINK_SO)
|
AC_SUBST(LINK_SO)
|
||||||
AC_SUBST(LIBPATHFLAG)
|
AC_SUBST(LIBPATHFLAG)
|
||||||
AC_SUBST(RPATHFLAG)
|
AC_SUBST(RPATHFLAG)
|
||||||
|
AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}")
|
||||||
AC_SUBST(TRY_LINK)
|
AC_SUBST(TRY_LINK)
|
||||||
|
|
||||||
dln_a_out_works=no
|
dln_a_out_works=no
|
||||||
|
@ -1103,12 +1118,16 @@ fi
|
||||||
if test x"$cross_compiling" = xyes; then
|
if test x"$cross_compiling" = xyes; then
|
||||||
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"
|
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"
|
||||||
PREP=fake.rb
|
PREP=fake.rb
|
||||||
|
RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
|
||||||
else
|
else
|
||||||
MINIRUBY='./miniruby$(EXEEXT)'
|
MINIRUBY='./miniruby$(EXEEXT)'
|
||||||
PREP=''
|
PREP='miniruby$(EXEEXT)'
|
||||||
|
RUNRUBY='$(MINIRUBY) $(srcdir)/runruby.rb --extout=$(EXTOUT) --'
|
||||||
fi
|
fi
|
||||||
AC_SUBST(MINIRUBY)
|
AC_SUBST(MINIRUBY)
|
||||||
AC_SUBST(PREP)
|
AC_SUBST(PREP)
|
||||||
|
AC_SUBST(RUNRUBY)
|
||||||
|
AC_SUBST(EXTOUT, [${EXTOUT-.ext}])
|
||||||
|
|
||||||
FIRSTMAKEFILE=""
|
FIRSTMAKEFILE=""
|
||||||
LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a'
|
LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a'
|
||||||
|
@ -1474,5 +1493,10 @@ else
|
||||||
fi
|
fi
|
||||||
: > confdefs.h
|
: > confdefs.h
|
||||||
|
|
||||||
AC_CONFIG_FILES([$FIRSTMAKEFILE Makefile])
|
AC_CONFIG_FILES($FIRSTMAKEFILE)
|
||||||
|
AC_CONFIG_FILES(Makefile, [{
|
||||||
|
echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)'
|
||||||
|
test "$RUBY_INSTALL_NAME$EXEEXT" = ruby || echo 'ruby: $(PROGRAM);'
|
||||||
|
sed ['s/{\$([^(){}]*)[^{}]*}//g'] ${srcdir}/common.mk
|
||||||
|
} >> Makefile], [RUBY_INSTALL_NAME=$RUBY_INSTALL_NAME EXEEXT=$EXEEXT])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
include Makefile
|
include Makefile
|
||||||
|
|
||||||
ENABLE_SHARED=@ENABLE_SHARED@
|
ENABLE_SHARED=@ENABLE_SHARED@
|
||||||
|
DLLWRAP = @DLLWRAP@ --target=@target_os@
|
||||||
|
|
||||||
ifeq (@target_os@,cygwin)
|
ifeq (@target_os@,cygwin)
|
||||||
DLL_BASE_NAME := $(subst .dll,,$(LIBRUBY_SO))
|
DLL_BASE_NAME := $(subst .dll,,$(LIBRUBY_SO))
|
||||||
else
|
else
|
||||||
DLL_BASE_NAME := $(RUBY_SO_NAME)
|
DLL_BASE_NAME := $(RUBY_SO_NAME)
|
||||||
|
DLLWRAP += -mno-cygwin
|
||||||
|
VPATH += $(srcdir)/win32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(ENABLE_SHARED),yes)
|
ifneq ($(ENABLE_SHARED),yes)
|
||||||
|
@ -24,6 +27,10 @@ endif
|
||||||
WPROGRAM = $(RUBYW_INSTALL_NAME)$(EXEEXT)
|
WPROGRAM = $(RUBYW_INSTALL_NAME)$(EXEEXT)
|
||||||
SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS)
|
SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS)
|
||||||
EXTOBJS += $(@:$(EXEEXT)=.res.@OBJEXT@)
|
EXTOBJS += $(@:$(EXEEXT)=.res.@OBJEXT@)
|
||||||
|
RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(DLL_BASE_NAME).rc
|
||||||
|
|
||||||
|
ruby: $(PROGRAM)
|
||||||
|
rubyw: $(WPROGRAM)
|
||||||
|
|
||||||
$(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO)
|
$(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO)
|
||||||
$(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
|
$(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
|
||||||
|
@ -31,7 +38,7 @@ $(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
|
||||||
%.res.@OBJEXT@: %.rc
|
%.res.@OBJEXT@: %.rc
|
||||||
@WINDRES@ --include-dir . --include-dir $(<D) --include-dir $(srcdir)/win32 $< $@
|
@WINDRES@ --include-dir . --include-dir $(<D) --include-dir $(srcdir)/win32 $< $@
|
||||||
|
|
||||||
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(DLL_BASE_NAME).rc: rbconfig.rb
|
$(RCFILES): $(RBCONFIG)
|
||||||
@$(MINIRUBY) $(srcdir)/win32/resource.rb \
|
@$(MINIRUBY) $(srcdir)/win32/resource.rb \
|
||||||
-ruby_name=$(RUBY_INSTALL_NAME) -rubyw_name=$(RUBYW_INSTALL_NAME) \
|
-ruby_name=$(RUBY_INSTALL_NAME) -rubyw_name=$(RUBYW_INSTALL_NAME) \
|
||||||
-so_name=$(DLL_BASE_NAME) \
|
-so_name=$(DLL_BASE_NAME) \
|
||||||
|
@ -44,7 +51,7 @@ $(WPROGRAM): $(RUBYW_INSTALL_NAME).res.@OBJEXT@
|
||||||
$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
|
$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
|
||||||
|
|
||||||
$(RUBY_EXP): $(LIBRUBY_A)
|
$(RUBY_EXP): $(LIBRUBY_A)
|
||||||
@DLLWRAP@ --target=@target_os@ --driver-name=$(CC) \
|
$(DLLWRAP) \
|
||||||
--output-exp=$(RUBY_EXP) \
|
--output-exp=$(RUBY_EXP) \
|
||||||
--export-all $(LIBRUBY_A) $(LIBS) -o $(PROGRAM)
|
--export-all $(LIBRUBY_A) $(LIBS) -o $(PROGRAM)
|
||||||
$(LDSHARED) $(DLDFLAGS) $(OBJS) dmyext.o $(SOLIBS) -o $(PROGRAM)
|
$(LDSHARED) $(DLDFLAGS) $(OBJS) dmyext.o $(SOLIBS) -o $(PROGRAM)
|
||||||
|
@ -63,3 +70,9 @@ cygwin-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR).dll: $(LIBRUBY_A)
|
||||||
@DLLWRAP@ -s --def=rubydll.def -o $@
|
@DLLWRAP@ -s --def=rubydll.def -o $@
|
||||||
@rm -f rubydll.def
|
@rm -f rubydll.def
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
clean-local::
|
||||||
|
@$(RM) $(RUBY_EXP) $(RCFILES:.rc=.res.@OBJEXT@)
|
||||||
|
|
||||||
|
distclean-local::
|
||||||
|
@$(RM) $(RCFILES)
|
||||||
|
|
256
ext/extmk.rb
256
ext/extmk.rb
|
@ -16,6 +16,8 @@ alias $PROGRAM_NAME $0
|
||||||
alias $0 $progname
|
alias $0 $progname
|
||||||
|
|
||||||
$extlist = []
|
$extlist = []
|
||||||
|
$extupdate = false
|
||||||
|
$compiled = {}
|
||||||
|
|
||||||
$:.replace ["."]
|
$:.replace ["."]
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
|
@ -24,12 +26,11 @@ srcdir = File.dirname(File.dirname(__FILE__))
|
||||||
|
|
||||||
$:.replace [srcdir, srcdir+"/lib", "."]
|
$:.replace [srcdir, srcdir+"/lib", "."]
|
||||||
|
|
||||||
require 'mkmf'
|
|
||||||
require 'getopts'
|
|
||||||
|
|
||||||
$topdir = "."
|
$topdir = "."
|
||||||
$top_srcdir = srcdir
|
$top_srcdir = srcdir
|
||||||
$hdrdir = $top_srcdir
|
|
||||||
|
require 'mkmf'
|
||||||
|
require 'optparse/shellwords'
|
||||||
|
|
||||||
def sysquote(x)
|
def sysquote(x)
|
||||||
@quote ||= /human|os2|macos/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
|
@quote ||= /human|os2|macos/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
|
||||||
|
@ -44,6 +45,43 @@ def relative_from(path, base)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def extract_makefile(makefile, keep = true)
|
||||||
|
m = File.read(makefile)
|
||||||
|
if !(target = m[/^TARGET[ \t]*=[ \t]*(\S*)/, 1])
|
||||||
|
return keep
|
||||||
|
end
|
||||||
|
installrb = {}
|
||||||
|
m.scan(/^install-rb-default:[ \t]*(\S+)\n\1:[ \t]*(\S+)/) {installrb[$2] = $1}
|
||||||
|
oldrb = installrb.keys.sort
|
||||||
|
newrb = install_rb(nil, "").collect {|d, *f| f}.flatten.sort
|
||||||
|
if target_prefix = m[/^target_prefix[ \t]*=[ \t]*\/(.*)/, 1]
|
||||||
|
target = "#{target_prefix}/#{target}"
|
||||||
|
end
|
||||||
|
unless oldrb == newrb
|
||||||
|
if $extout
|
||||||
|
newrb.each {|f| installrb.delete(f)}
|
||||||
|
unless installrb.empty?
|
||||||
|
config = CONFIG.dup
|
||||||
|
install_dirs(target_prefix).each {|var, val| config[var] = val}
|
||||||
|
FileUtils.rm_f(installrb.values.collect {|f| Config.expand(f, config)}, :verbose => true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
$target = target
|
||||||
|
/^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil
|
||||||
|
$preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "")
|
||||||
|
$DLDFLAGS += " " + (m[/^DLDFLAGS[ \t]*=[ \t]*(.*)/, 1] || "")
|
||||||
|
if s = m[/^LIBS[ \t]*=[ \t]*(.*)/, 1]
|
||||||
|
s.sub!(/^#{Regexp.quote($LIBRUBYARG)} */, "")
|
||||||
|
s.sub!(/ *#{Regexp.quote($LIBS)}$/, "")
|
||||||
|
$libs = s
|
||||||
|
end
|
||||||
|
$LOCAL_LIBS = m[/^LOCAL_LIBS[ \t]*=[ \t]*(.*)/, 1] || ""
|
||||||
|
$LIBPATH = Shellwords.shellwords(m[/^libpath[ \t]*=[ \t]*(.*)/, 1] || "") - %w[$(libdir) $(topdir)]
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
def extmake(target)
|
def extmake(target)
|
||||||
print "#{$message} #{target}\n"
|
print "#{$message} #{target}\n"
|
||||||
$stdout.flush
|
$stdout.flush
|
||||||
|
@ -57,8 +95,7 @@ def extmake(target)
|
||||||
return true if $nodynamic and not $static
|
return true if $nodynamic and not $static
|
||||||
end
|
end
|
||||||
|
|
||||||
init_mkmf
|
FileUtils.mkpath target unless File.directory?(target)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
dir = Dir.pwd
|
dir = Dir.pwd
|
||||||
FileUtils.mkpath target unless File.directory?(target)
|
FileUtils.mkpath target unless File.directory?(target)
|
||||||
|
@ -72,18 +109,21 @@ def extmake(target)
|
||||||
$mdir = target
|
$mdir = target
|
||||||
$srcdir = File.join($top_srcdir, "ext", $mdir)
|
$srcdir = File.join($top_srcdir, "ext", $mdir)
|
||||||
$preload = nil
|
$preload = nil
|
||||||
|
$compiled[target] = false
|
||||||
makefile = "./Makefile"
|
makefile = "./Makefile"
|
||||||
|
ok = File.exist?(makefile)
|
||||||
unless $ignore
|
unless $ignore
|
||||||
if $static ||
|
Config::CONFIG["srcdir"] = $srcdir
|
||||||
!(t = modified?(makefile, MTIMES)) ||
|
Config::CONFIG["topdir"] = $topdir
|
||||||
%W<#{$srcdir}/makefile.rb #{$srcdir}/extconf.rb
|
begin
|
||||||
#{$srcdir}/depend>.any? {|f| modified?(f, [t])}
|
if (!(ok &&= extract_makefile(makefile)) ||
|
||||||
then
|
!(t = modified?(makefile, MTIMES)) ||
|
||||||
$defs = []
|
%W"#{$srcdir}/makefile.rb #{$srcdir}/extconf.rb #{$srcdir}/depend".any? {|f| modified?(f, [t])})
|
||||||
Logging::logfile 'mkmf.log'
|
then
|
||||||
Config::CONFIG["srcdir"] = $srcdir
|
ok = false
|
||||||
rm_f makefile
|
init_mkmf
|
||||||
begin
|
Logging::logfile 'mkmf.log'
|
||||||
|
rm_f makefile
|
||||||
if File.exist?($0 = "#{$srcdir}/makefile.rb")
|
if File.exist?($0 = "#{$srcdir}/makefile.rb")
|
||||||
load $0
|
load $0
|
||||||
elsif File.exist?($0 = "#{$srcdir}/extconf.rb")
|
elsif File.exist?($0 = "#{$srcdir}/extconf.rb")
|
||||||
|
@ -91,31 +131,38 @@ def extmake(target)
|
||||||
else
|
else
|
||||||
create_makefile(target)
|
create_makefile(target)
|
||||||
end
|
end
|
||||||
File.exist?(makefile)
|
$extupdate = true
|
||||||
rescue SystemExit
|
ok = File.exist?(makefile)
|
||||||
# ignore
|
|
||||||
ensure
|
|
||||||
rm_f "conftest*"
|
|
||||||
$0 = $PROGRAM_NAME
|
|
||||||
Config::CONFIG["srcdir"] = $top_srcdir
|
|
||||||
end
|
end
|
||||||
else
|
rescue SystemExit
|
||||||
true
|
# ignore
|
||||||
|
ensure
|
||||||
|
rm_f "conftest*"
|
||||||
|
config = $0
|
||||||
|
$0 = $PROGRAM_NAME
|
||||||
|
Config::CONFIG["srcdir"] = $top_srcdir
|
||||||
|
Config::CONFIG["topdir"] = topdir
|
||||||
|
end
|
||||||
|
end
|
||||||
|
ok = yield(ok) if block_given?
|
||||||
|
unless ok
|
||||||
|
open(makefile, "w") do |f|
|
||||||
|
f.print dummy_makefile($srcdir)
|
||||||
end
|
end
|
||||||
else
|
|
||||||
File.exist?(makefile)
|
|
||||||
end or open(makefile, "w") do |f|
|
|
||||||
f.print dummy_makefile($srcdir)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
args = sysquote($mflags)
|
args = sysquote($mflags)
|
||||||
if $static
|
if $static
|
||||||
args += ["static"]
|
args += ["static"] unless $clean
|
||||||
$extlist.push [$static, $target, File.basename($target), $preload]
|
$extlist.push [$static, $target, File.basename($target), $preload]
|
||||||
end
|
end
|
||||||
unless system($make, *args)
|
unless system($make, *args)
|
||||||
$ignore or $continue or return false
|
$ignore or $continue or return false
|
||||||
end
|
end
|
||||||
|
$compiled[target] = true
|
||||||
|
if $clean and $clean != true
|
||||||
|
File.unlink(makefile) rescue nil
|
||||||
|
end
|
||||||
if $static
|
if $static
|
||||||
$extflags ||= ""
|
$extflags ||= ""
|
||||||
$extlibs ||= []
|
$extlibs ||= []
|
||||||
|
@ -131,24 +178,65 @@ def extmake(target)
|
||||||
$topdir = topdir
|
$topdir = topdir
|
||||||
Dir.chdir dir
|
Dir.chdir dir
|
||||||
end
|
end
|
||||||
|
begin
|
||||||
|
Dir.rmdir target
|
||||||
|
target = File.dirname(target)
|
||||||
|
rescue SystemCallError
|
||||||
|
break
|
||||||
|
end while true
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def compiled?(target)
|
||||||
|
$compiled[target]
|
||||||
|
end
|
||||||
|
|
||||||
def parse_args()
|
def parse_args()
|
||||||
getopts('n', 'extstatic:', 'dest-dir:',
|
$mflags = []
|
||||||
'make:', 'make-flags:', 'mflags:')
|
|
||||||
|
|
||||||
$dryrun = $OPT['n']
|
opts = nil
|
||||||
$force_static = $OPT['extstatic'] == 'static'
|
$optparser ||= OptionParser.new do |opts|
|
||||||
$destdir = $OPT['dest-dir'] || ''
|
opts.on('-n') {$dryrun = true}
|
||||||
$make = $OPT['make'] || $make || 'make'
|
opts.on('--[no-]extension [EXTS]', Array) do |v|
|
||||||
mflags = ($OPT['make-flags'] || '').strip
|
$extension = (v == false ? [] : v)
|
||||||
mflags = ($OPT['mflags'] || '').strip if mflags.empty?
|
end
|
||||||
|
opts.on('--[no-]extstatic [STATIC]', Array) do |v|
|
||||||
$mflags = Shellwords.shellwords(mflags)
|
if ($extstatic = v) == false
|
||||||
if arg = $mflags.first
|
$extstatic = []
|
||||||
arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
|
elsif v
|
||||||
|
$force_static = true
|
||||||
|
$extstatic.delete("static")
|
||||||
|
$extstatic = nil if $extstatic.empty?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
opts.on('--dest-dir=DIR') do |v|
|
||||||
|
$destdir = v
|
||||||
|
end
|
||||||
|
opts.on('--extout=DIR') do |v|
|
||||||
|
$extout = (v unless v.empty?)
|
||||||
|
end
|
||||||
|
opts.on('--make=MAKE') do |v|
|
||||||
|
$make = v || 'make'
|
||||||
|
end
|
||||||
|
opts.on('--make-flags=FLAGS', '--mflags', Shellwords) do |v|
|
||||||
|
if arg = v.first
|
||||||
|
arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
|
||||||
|
end
|
||||||
|
$mflags.concat(v)
|
||||||
|
end
|
||||||
|
opts.on('--message [MESSAGE]', String) do |v|
|
||||||
|
$message = v
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
begin
|
||||||
|
$optparser.parse!(ARGV)
|
||||||
|
rescue OptionParser::InvalidOption => e
|
||||||
|
retry if /^--/ =~ e.args[0]
|
||||||
|
$optparser.warn(e)
|
||||||
|
abort opts.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
$destdir ||= ''
|
||||||
|
|
||||||
$make, *rest = Shellwords.shellwords($make)
|
$make, *rest = Shellwords.shellwords($make)
|
||||||
$mflags.unshift(*rest) unless rest.empty?
|
$mflags.unshift(*rest) unless rest.empty?
|
||||||
|
@ -173,24 +261,33 @@ def parse_args()
|
||||||
$destdir = File.expand_path($destdir)
|
$destdir = File.expand_path($destdir)
|
||||||
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
|
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
|
||||||
end
|
end
|
||||||
|
if $extout
|
||||||
|
$extout = '$(topdir)/'+$extout
|
||||||
|
$extout_prefix = $extout ? "$(extout)$(target_prefix)/" : ""
|
||||||
|
$mflags << "extout=#$extout" << "extout_prefix=#$extout_prefix"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
parse_args()
|
parse_args()
|
||||||
|
|
||||||
|
if target = ARGV.shift and /^[a-z-]+$/ =~ target
|
||||||
|
$mflags.push(target)
|
||||||
|
target = target.sub(/^(dist|real)(?=(?:clean)?$)/, '')
|
||||||
|
case target
|
||||||
|
when /clean/
|
||||||
|
$ignore ||= true
|
||||||
|
$clean = $1 ? $1[0] : true
|
||||||
|
when /^install\b/
|
||||||
|
$install = true
|
||||||
|
$ignore ||= true
|
||||||
|
$mflags.unshift("INSTALL_PROG=install -c -p -m 0755",
|
||||||
|
"INSTALL_DATA=install -c -p -m 0644",
|
||||||
|
"MAKEDIRS=mkdir -p") if $dryrun
|
||||||
|
end
|
||||||
|
end
|
||||||
unless $message
|
unless $message
|
||||||
if $message = ARGV.shift and /^[a-z]+$/ =~ $message
|
if target
|
||||||
$mflags.push($message)
|
$message = target.sub(/^(\w+)e?\b/, '\1ing').tr('-', ' ')
|
||||||
$message = $message.sub(/^(?:dist|real)(?=(?:clean)?$)/, '\1')
|
|
||||||
case $message
|
|
||||||
when "clean"
|
|
||||||
$ignore ||= true
|
|
||||||
when "install"
|
|
||||||
$ignore ||= true
|
|
||||||
$mflags.unshift("INSTALL_PROG=install -c -p -m 0755",
|
|
||||||
"INSTALL_DATA=install -c -p -m 0644",
|
|
||||||
"MAKEDIRS=mkdir -p") if $dryrun
|
|
||||||
end
|
|
||||||
$message.sub!(/e?$/, "ing")
|
|
||||||
else
|
else
|
||||||
$message = "compiling"
|
$message = "compiling"
|
||||||
end
|
end
|
||||||
|
@ -204,13 +301,19 @@ elsif $nmake
|
||||||
else
|
else
|
||||||
$ruby = '$(topdir)/miniruby' + EXEEXT
|
$ruby = '$(topdir)/miniruby' + EXEEXT
|
||||||
end
|
end
|
||||||
$ruby << " -I$(topdir) -I$(hdrdir)/lib"
|
$ruby << " -I'$(topdir)' -I'$(hdrdir)/lib'"
|
||||||
$config_h = '$(topdir)/config.h'
|
$config_h = '$(topdir)/config.h'
|
||||||
|
|
||||||
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
|
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
|
||||||
|
|
||||||
# get static-link modules
|
# get static-link modules
|
||||||
$static_ext = {}
|
$static_ext = {}
|
||||||
|
if $extstatic
|
||||||
|
$extstatic.each do |target|
|
||||||
|
target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM
|
||||||
|
$static_ext[target] = $static_ext.size
|
||||||
|
end
|
||||||
|
end
|
||||||
for dir in ["ext", File::join($top_srcdir, "ext")]
|
for dir in ["ext", File::join($top_srcdir, "ext")]
|
||||||
setup = File::join(dir, CONFIG['setup'])
|
setup = File::join(dir, CONFIG['setup'])
|
||||||
if File.file? setup
|
if File.file? setup
|
||||||
|
@ -228,13 +331,34 @@ for dir in ["ext", File::join($top_srcdir, "ext")]
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM
|
target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM
|
||||||
$static_ext[target] = true
|
$static_ext[target] = $static_ext.size
|
||||||
end
|
end
|
||||||
MTIMES << f.mtime
|
MTIMES << f.mtime
|
||||||
$setup = setup
|
$setup = setup
|
||||||
f.close
|
f.close
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
end unless $extstatic
|
||||||
|
|
||||||
|
ext_prefix = "#{$top_srcdir}/ext"
|
||||||
|
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
|
||||||
|
exts |= $extension if $extension
|
||||||
|
exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
|
||||||
|
d = File.dirname(d)
|
||||||
|
d.slice!(0, ext_prefix.length + 1)
|
||||||
|
d
|
||||||
|
}.sort unless $extension
|
||||||
|
|
||||||
|
if $extout
|
||||||
|
Config.expand(extout = "#$extout", Config::CONFIG.merge("topdir"=>$topdir))
|
||||||
|
if $install
|
||||||
|
Config.expand(dest = "#{$destdir}#{$rubylibdir}")
|
||||||
|
FileUtils.cp_r(extout+"/.", dest, :verbose => true, :noop => $dryrun)
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
unless $ignore
|
||||||
|
FileUtils.mkpath(extout)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
dir = Dir.pwd
|
dir = Dir.pwd
|
||||||
|
@ -242,17 +366,19 @@ FileUtils::makedirs('ext')
|
||||||
Dir::chdir('ext')
|
Dir::chdir('ext')
|
||||||
|
|
||||||
$hdrdir = $top_srcdir = relative_from(srcdir, $topdir = "..")
|
$hdrdir = $top_srcdir = relative_from(srcdir, $topdir = "..")
|
||||||
ext_prefix = "#{$top_srcdir}/ext"
|
exts.each do |d|
|
||||||
Dir.glob("#{ext_prefix}/*/**/extconf.rb") do |d|
|
extmake(d) or abort
|
||||||
d = File.dirname(d)
|
|
||||||
d.slice!(0, ext_prefix.length + 1)
|
|
||||||
extmake(d) or exit(1)
|
|
||||||
end
|
end
|
||||||
$hdrdir = $top_srcdir = srcdir
|
$hdrdir = $top_srcdir = srcdir
|
||||||
$topdir = "."
|
$topdir = "."
|
||||||
|
|
||||||
if $ignore
|
if $ignore
|
||||||
|
FileUtils.rm_f(%W"extinit.c extinit.#{$OBJEXT}") if $clean
|
||||||
Dir.chdir ".."
|
Dir.chdir ".."
|
||||||
|
if $clean
|
||||||
|
Dir.rmdir('ext') rescue nil
|
||||||
|
FileUtils.rm_rf(extout) if $extout
|
||||||
|
end
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -305,11 +431,13 @@ SRC
|
||||||
end
|
end
|
||||||
rubies = []
|
rubies = []
|
||||||
%w[RUBY RUBYW].each {|r|
|
%w[RUBY RUBYW].each {|r|
|
||||||
config_string(r+"_INSTALL_NAME", Config::CONFIG) {|r| rubies << r+EXEEXT}
|
if r = arg_config("--"+r.downcase) || config_string(r+"_INSTALL_NAME")
|
||||||
|
rubies << r+EXEEXT
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
Dir.chdir ".."
|
Dir.chdir ".."
|
||||||
if $extlist.size > 0
|
if !$extlist.empty? and $extupdate
|
||||||
rm_f(Config::CONFIG["LIBRUBY_SO"])
|
rm_f(Config::CONFIG["LIBRUBY_SO"])
|
||||||
end
|
end
|
||||||
puts "making #{rubies.join(', ')}"
|
puts "making #{rubies.join(', ')}"
|
||||||
|
|
64
instruby.rb
64
instruby.rb
|
@ -7,27 +7,32 @@ srcdir = File.dirname(__FILE__)
|
||||||
$:.unshift File.join(srcdir, "lib")
|
$:.unshift File.join(srcdir, "lib")
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'shellwords'
|
require 'shellwords'
|
||||||
require 'getopts'
|
require 'optparse'
|
||||||
|
require 'optparse/shellwords'
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
|
|
||||||
|
STDOUT.sync = true
|
||||||
File.umask(0)
|
File.umask(0)
|
||||||
|
|
||||||
def parse_args()
|
def parse_args()
|
||||||
getopts('n', 'dest-dir:',
|
$mantype = 'doc'
|
||||||
'make:', 'make-flags:', 'mflags:',
|
$destdir = nil
|
||||||
'mantype:doc')
|
$make = 'make'
|
||||||
|
$mflags = []
|
||||||
$dryrun = $OPT['n']
|
$install = []
|
||||||
$destdir = $OPT['dest-dir'] || ''
|
opt = OptionParser.new
|
||||||
$make = $OPT['make'] || $make || 'make'
|
opt.on('-n') {$dryrun = true}
|
||||||
$mantype = $OPT['mantype']
|
opt.on('--dest-dir=DIR') {|dir| $destdir = dir}
|
||||||
mflags = ($OPT['make-flags'] || '').strip
|
opt.on('--make=COMMAND') {|make| $make = make}
|
||||||
mflags = ($OPT['mflags'] || '').strip if mflags.empty?
|
opt.on('--mantype=MAN') {|man| $mantype = man}
|
||||||
|
opt.on('--make-flags=FLAGS', '--mflags', Shellwords) do |v|
|
||||||
$mflags = Shellwords.shellwords(mflags)
|
if arg = v.first
|
||||||
if arg = $mflags.first
|
arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
|
||||||
arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
|
end
|
||||||
|
$mflags.concat(v)
|
||||||
end
|
end
|
||||||
|
opt.on('--install=TYPE', [:bin, :lib, :man]) {|ins| $install << ins}
|
||||||
|
opt.parse! rescue abort [$!.message, opt].join("\n")
|
||||||
|
|
||||||
$make, *rest = Shellwords.shellwords($make)
|
$make, *rest = Shellwords.shellwords($make)
|
||||||
$mflags.unshift(*rest) unless rest.empty?
|
$mflags.unshift(*rest) unless rest.empty?
|
||||||
|
@ -55,6 +60,10 @@ include FileUtils::NoWrite if $dryrun
|
||||||
@fileutils_output = STDOUT
|
@fileutils_output = STDOUT
|
||||||
@fileutils_label = ''
|
@fileutils_label = ''
|
||||||
|
|
||||||
|
def install?(type)
|
||||||
|
yield if $install.empty? or $install.include?(type)
|
||||||
|
end
|
||||||
|
|
||||||
def install(src, dest, options = {})
|
def install(src, dest, options = {})
|
||||||
options[:preserve] = true
|
options[:preserve] = true
|
||||||
super
|
super
|
||||||
|
@ -99,11 +108,29 @@ arc = CONFIG["LIBRUBY_A"]
|
||||||
|
|
||||||
makedirs [bindir, libdir, rubylibdir, archlibdir, sitelibdir, sitearchlibdir]
|
makedirs [bindir, libdir, rubylibdir, archlibdir, sitelibdir, sitearchlibdir]
|
||||||
|
|
||||||
|
install?(:bin) do
|
||||||
ruby_bin = File.join(bindir, ruby_install_name)
|
ruby_bin = File.join(bindir, ruby_install_name)
|
||||||
|
|
||||||
|
major = CONFIG["MAJOR"]
|
||||||
|
minor = CONFIG["MINOR"]
|
||||||
|
teeny = CONFIG["TEENY"]
|
||||||
|
os = CONFIG["target_os"]
|
||||||
|
suffixes = %W[#{major}#{minor} #{major}#{minor}#{teeny}
|
||||||
|
#{major}#{minor}-#{os} #{major}#{minor}#{teeny}-#{os}
|
||||||
|
-#{major}.#{minor} -#{major}.#{minor}.#{teeny}
|
||||||
|
]
|
||||||
|
def suffixes.link(bin)
|
||||||
|
each do |suf|
|
||||||
|
ln(bin+exeext, bin+suf+exeext, force: true)
|
||||||
|
end
|
||||||
|
rescue NotImplementedError
|
||||||
|
end
|
||||||
|
|
||||||
install ruby_install_name+exeext, ruby_bin+exeext, :mode => 0755
|
install ruby_install_name+exeext, ruby_bin+exeext, :mode => 0755
|
||||||
|
suffixes.link(ruby_bin)
|
||||||
if rubyw_install_name and !rubyw_install_name.empty?
|
if rubyw_install_name and !rubyw_install_name.empty?
|
||||||
install rubyw_install_name+exeext, bindir, :mode => 0755
|
install rubyw_install_name+exeext, bindir, :mode => 0755
|
||||||
|
suffixes.link(File.join(bindir, rubyw_install_name))
|
||||||
end
|
end
|
||||||
install dll, bindir, :mode => 0755 if enable_shared and dll != lib
|
install dll, bindir, :mode => 0755 if enable_shared and dll != lib
|
||||||
install lib, libdir, :mode => 0755 unless lib == arc
|
install lib, libdir, :mode => 0755 unless lib == arc
|
||||||
|
@ -121,9 +148,11 @@ if dll == lib and dll != arc
|
||||||
ln_sf(dll, File.join(libdir, link))
|
ln_sf(dll, File.join(libdir, link))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Dir.chdir srcdir
|
Dir.chdir srcdir
|
||||||
|
|
||||||
|
install?(:lib) do
|
||||||
ruby_shebang = File.join(CONFIG["bindir"], ruby_install_name)
|
ruby_shebang = File.join(CONFIG["bindir"], ruby_install_name)
|
||||||
if File::ALT_SEPARATOR
|
if File::ALT_SEPARATOR
|
||||||
ruby_bin_dosish = ruby_shebang.tr(File::SEPARATOR, File::ALT_SEPARATOR)
|
ruby_bin_dosish = ruby_shebang.tr(File::SEPARATOR, File::ALT_SEPARATOR)
|
||||||
|
@ -176,7 +205,9 @@ for f in Dir["lib/**/*{.rb,help-message}"]
|
||||||
makedirs dir
|
makedirs dir
|
||||||
install f, dir, :mode => 0644
|
install f, dir, :mode => 0644
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
install?(:bin) do
|
||||||
for f in Dir["*.h"]
|
for f in Dir["*.h"]
|
||||||
install f, archlibdir, :mode => 0644
|
install f, archlibdir, :mode => 0644
|
||||||
end
|
end
|
||||||
|
@ -185,7 +216,9 @@ if RUBY_PLATFORM =~ /mswin32|mingw|bccwin32/
|
||||||
makedirs File.join(archlibdir, "win32")
|
makedirs File.join(archlibdir, "win32")
|
||||||
install "win32/win32.h", File.join(archlibdir, "win32"), :mode => 0644
|
install "win32/win32.h", File.join(archlibdir, "win32"), :mode => 0644
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
install?(:man) do
|
||||||
for mdoc in Dir["*.[1-9]"]
|
for mdoc in Dir["*.[1-9]"]
|
||||||
next unless File.file?(mdoc) and open(mdoc){|fh| fh.read(1) == '.'}
|
next unless File.file?(mdoc) and open(mdoc){|fh| fh.read(1) == '.'}
|
||||||
|
|
||||||
|
@ -212,5 +245,6 @@ for mdoc in Dir["*.[1-9]"]
|
||||||
install w.path, destfile, :mode => 0644
|
install w.path, destfile, :mode => 0644
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# vi:set sw=2:
|
# vi:set sw=2:
|
||||||
|
|
267
lib/mkmf.rb
267
lib/mkmf.rb
|
@ -40,7 +40,6 @@ unless defined? $configure_args
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
$srcdir = nil
|
|
||||||
$libdir = CONFIG["libdir"]
|
$libdir = CONFIG["libdir"]
|
||||||
$rubylibdir = CONFIG["rubylibdir"]
|
$rubylibdir = CONFIG["rubylibdir"]
|
||||||
$archdir = CONFIG["archdir"]
|
$archdir = CONFIG["archdir"]
|
||||||
|
@ -55,6 +54,8 @@ $cygwin = /cygwin/ =~ RUBY_PLATFORM
|
||||||
$human = /human/ =~ RUBY_PLATFORM
|
$human = /human/ =~ RUBY_PLATFORM
|
||||||
$netbsd = /netbsd/ =~ RUBY_PLATFORM
|
$netbsd = /netbsd/ =~ RUBY_PLATFORM
|
||||||
$os2 = /os2/ =~ RUBY_PLATFORM
|
$os2 = /os2/ =~ RUBY_PLATFORM
|
||||||
|
$beos = /beos/ =~ RUBY_PLATFORM
|
||||||
|
$solaris = /solaris/ =~ RUBY_PLATFORM
|
||||||
|
|
||||||
def config_string(key, config = CONFIG)
|
def config_string(key, config = CONFIG)
|
||||||
s = config[key] and !s.empty? and block_given? ? yield(s) : s
|
s = config[key] and !s.empty? and block_given? ? yield(s) : s
|
||||||
|
@ -73,6 +74,32 @@ INSTALL_DIRS = [
|
||||||
[dir_re('sitearchdir'), "$(RUBYARCHDIR)"]
|
[dir_re('sitearchdir'), "$(RUBYARCHDIR)"]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def install_dirs(target_prefix = nil)
|
||||||
|
if $extout
|
||||||
|
dirs = [
|
||||||
|
['RUBYCOMMONDIR', '$(extout)'],
|
||||||
|
['RUBYLIBDIR', '$(extout)$(target_prefix)'],
|
||||||
|
['RUBYARCHDIR', '$(extout)/$(arch)$(target_prefix)'],
|
||||||
|
['extout', "#$extout"],
|
||||||
|
['extout_prefix', "#$extout_prefix"],
|
||||||
|
]
|
||||||
|
elsif $extmk
|
||||||
|
dirs = [
|
||||||
|
['RUBYCOMMONDIR', '$(rubylibdir)'],
|
||||||
|
['RUBYLIBDIR', '$(rubylibdir)$(target_prefix)'],
|
||||||
|
['RUBYARCHDIR', '$(archdir)$(target_prefix)'],
|
||||||
|
]
|
||||||
|
else
|
||||||
|
dirs = [
|
||||||
|
['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'],
|
||||||
|
['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'],
|
||||||
|
['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'],
|
||||||
|
]
|
||||||
|
end
|
||||||
|
dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")]
|
||||||
|
dirs
|
||||||
|
end
|
||||||
|
|
||||||
def map_dir(dir, map = nil)
|
def map_dir(dir, map = nil)
|
||||||
map ||= INSTALL_DIRS
|
map ||= INSTALL_DIRS
|
||||||
map.inject(dir) {|dir, (orig, new)| dir.gsub(orig, new)}
|
map.inject(dir) {|dir, (orig, new)| dir.gsub(orig, new)}
|
||||||
|
@ -290,6 +317,30 @@ def cpp_include(header)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def with_cppflags(flags)
|
||||||
|
cppflags = $CPPFLAGS
|
||||||
|
$CPPFLAGS = flags
|
||||||
|
ret = yield
|
||||||
|
ensure
|
||||||
|
$CPPFLAGS = cppflags unless ret
|
||||||
|
end
|
||||||
|
|
||||||
|
def with_cflags(flags)
|
||||||
|
cflags = $CFLAGS
|
||||||
|
$CFLAGS = flags
|
||||||
|
ret = yield
|
||||||
|
ensure
|
||||||
|
$CFLAGS = cflags unless ret
|
||||||
|
end
|
||||||
|
|
||||||
|
def with_ldflags(flags)
|
||||||
|
ldflags = $LDFLAGS
|
||||||
|
$LDFLAGS = flags
|
||||||
|
ret = yield
|
||||||
|
ensure
|
||||||
|
$LDFLAGS = ldflags unless ret
|
||||||
|
end
|
||||||
|
|
||||||
def try_static_assert(expr, headers = nil, opt = "", &b)
|
def try_static_assert(expr, headers = nil, opt = "", &b)
|
||||||
headers = cpp_include(headers)
|
headers = cpp_include(headers)
|
||||||
try_compile(<<SRC, opt, &b)
|
try_compile(<<SRC, opt, &b)
|
||||||
|
@ -435,7 +486,7 @@ def install_files(mfile, ifiles, map = nil, srcprefix = nil)
|
||||||
ifiles.each do |files, dir, prefix|
|
ifiles.each do |files, dir, prefix|
|
||||||
dir = map_dir(dir, map)
|
dir = map_dir(dir, map)
|
||||||
prefix = %r|\A#{Regexp.quote(prefix)}/?| if prefix
|
prefix = %r|\A#{Regexp.quote(prefix)}/?| if prefix
|
||||||
if( files[0,2] == "./" )
|
if /\A\.\// =~ files
|
||||||
# install files which are in current working directory.
|
# install files which are in current working directory.
|
||||||
files = files[2..-1]
|
files = files[2..-1]
|
||||||
len = nil
|
len = nil
|
||||||
|
@ -576,6 +627,25 @@ def have_header(header, &b)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def find_header(header, *paths)
|
||||||
|
checking_for header do
|
||||||
|
if try_cpp(cpp_include(header))
|
||||||
|
true
|
||||||
|
else
|
||||||
|
found = false
|
||||||
|
paths.each do |dir|
|
||||||
|
opt = "-I#{dir}".quote
|
||||||
|
if try_cpp(cpp_include(header), opt)
|
||||||
|
$INCFLAGS << " " << opt
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
found
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def have_struct_member(type, member, header = nil, &b)
|
def have_struct_member(type, member, header = nil, &b)
|
||||||
checking_for "#{type}.#{member}" do
|
checking_for "#{type}.#{member}" do
|
||||||
if try_compile(<<"SRC", &b)
|
if try_compile(<<"SRC", &b)
|
||||||
|
@ -761,6 +831,13 @@ end
|
||||||
|
|
||||||
def configuration(srcdir)
|
def configuration(srcdir)
|
||||||
mk = []
|
mk = []
|
||||||
|
vpath = %w[$(srcdir) $(topdir) $(hdrdir)]
|
||||||
|
if !CROSS_COMPILING && CONFIG['build_os'] == 'cygwin' && CONFIG['target_os'] != 'cygwin'
|
||||||
|
vpath.each {|p| p.sub!(/.*/, '$(shell cygpath -u \&)')}
|
||||||
|
end
|
||||||
|
if !CROSS_COMPILING && CONFIG['build_os'] == 'msdosdjgpp'
|
||||||
|
CONFIG['PATH_SEPARATOR'] = ';'
|
||||||
|
end
|
||||||
mk << %{
|
mk << %{
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
@ -769,7 +846,7 @@ SHELL = /bin/sh
|
||||||
srcdir = #{srcdir}
|
srcdir = #{srcdir}
|
||||||
topdir = #{$topdir}
|
topdir = #{$topdir}
|
||||||
hdrdir = #{$extmk ? $hdrdir : '$(topdir)'}
|
hdrdir = #{$extmk ? $hdrdir : '$(topdir)'}
|
||||||
VPATH = #{$mingw && CONFIG['build_os'] == 'cygwin' ? '$(shell cygpath -u $(srcdir))' : '$(srcdir)'}
|
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
|
||||||
}
|
}
|
||||||
drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
|
drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
|
||||||
if destdir = CONFIG["prefix"].scan(drive)[0] and !destdir.empty?
|
if destdir = CONFIG["prefix"].scan(drive)[0] and !destdir.empty?
|
||||||
|
@ -806,13 +883,16 @@ sitearch = #{CONFIG['sitearch']}
|
||||||
ruby_version = #{Config::CONFIG['ruby_version']}
|
ruby_version = #{Config::CONFIG['ruby_version']}
|
||||||
ruby = #{$ruby}
|
ruby = #{$ruby}
|
||||||
RUBY = #{($nmake && !$extmk && !$configure_args.has_key?('--ruby')) ? '$(ruby:/=\)' : '$(ruby)'}
|
RUBY = #{($nmake && !$extmk && !$configure_args.has_key?('--ruby')) ? '$(ruby:/=\)' : '$(ruby)'}
|
||||||
RM = $(RUBY) -run -e rm -- -f
|
RM = #{config_string('RM') || '$(RUBY) -run -e rm -- -f'}
|
||||||
MAKEDIRS = $(RUBY) -run -e mkdir -- -p
|
MAKEDIRS = #{config_string('MAKEDIRS') || '$(RUBY) -run -e mkdir -- -p'}
|
||||||
INSTALL_PROG = $(RUBY) -run -e install -- -vpm 0755
|
INSTALL = #{config_string('INSTALL') || '$(RUBY) -run -e install -- -vp'}
|
||||||
INSTALL_DATA = $(RUBY) -run -e install -- -vpm 0644
|
INSTALL_PROG = $(INSTALL) -m 0755
|
||||||
|
INSTALL_DATA = $(INSTALL) -m 0644
|
||||||
|
COPY = #{config_string('COPY') || '$(RUBY) -run -e cp -- -v'}
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
|
|
||||||
|
preload = #{$preload.join(" ") if $preload}
|
||||||
}
|
}
|
||||||
if $nmake == ?b
|
if $nmake == ?b
|
||||||
mk.each do |x|
|
mk.each do |x|
|
||||||
|
@ -827,7 +907,13 @@ INSTALL_DATA = $(RUBY) -run -e install -- -vpm 0644
|
||||||
end
|
end
|
||||||
|
|
||||||
def dummy_makefile(srcdir)
|
def dummy_makefile(srcdir)
|
||||||
configuration(srcdir) << "all install: Makefile\n" << CLEANINGS
|
configuration(srcdir) << <<RULES << CLEANINGS
|
||||||
|
CLEANFILES = #{$cleanfiles.join(' ')}
|
||||||
|
DISTCLEANFILES = #{$distcleanfiles.join(' ')}
|
||||||
|
|
||||||
|
all install static install-so install-rb: Makefile
|
||||||
|
|
||||||
|
RULES
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_makefile(target, srcprefix = nil)
|
def create_makefile(target, srcprefix = nil)
|
||||||
|
@ -892,12 +978,15 @@ def create_makefile(target, srcprefix = nil)
|
||||||
mfile = open("Makefile", "wb")
|
mfile = open("Makefile", "wb")
|
||||||
mfile.print configuration(srcdir)
|
mfile.print configuration(srcdir)
|
||||||
mfile.print %{
|
mfile.print %{
|
||||||
|
libpath = #{$LIBPATH.join(" ")}
|
||||||
LIBPATH = #{libpath}
|
LIBPATH = #{libpath}
|
||||||
DEFFILE = #{deffile}
|
DEFFILE = #{deffile}
|
||||||
|
|
||||||
CLEANFILES = #{$cleanfiles.join(' ')}
|
CLEANFILES = #{$cleanfiles.join(' ')}
|
||||||
DISTCLEANFILES = #{$distcleanfiles.join(' ')}
|
DISTCLEANFILES = #{$distcleanfiles.join(' ')}
|
||||||
|
|
||||||
|
extout = #{$extout}
|
||||||
|
extout_prefix = #{$extout_prefix}
|
||||||
target_prefix = #{target_prefix}
|
target_prefix = #{target_prefix}
|
||||||
LOCAL_LIBS = #{$LOCAL_LIBS}
|
LOCAL_LIBS = #{$LOCAL_LIBS}
|
||||||
LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
|
LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
|
||||||
|
@ -905,62 +994,63 @@ SRCS = #{srcs.collect(&File.method(:basename)).join(' ')}
|
||||||
OBJS = #{$objs}
|
OBJS = #{$objs}
|
||||||
TARGET = #{target}
|
TARGET = #{target}
|
||||||
DLLIB = #{dllib}
|
DLLIB = #{dllib}
|
||||||
STATIC_LIB = #{staticlib}
|
STATIC_LIB = #{staticlib unless $static.nil?}
|
||||||
}
|
|
||||||
if $extmk
|
|
||||||
mfile.print %{
|
|
||||||
RUBYCOMMONDIR = $(rubylibdir)
|
|
||||||
RUBYLIBDIR = $(rubylibdir)$(target_prefix)
|
|
||||||
RUBYARCHDIR = $(archdir)$(target_prefix)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
mfile.print %{
|
|
||||||
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
|
||||||
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
|
||||||
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
|
||||||
}
|
|
||||||
end
|
|
||||||
mfile.print %{
|
|
||||||
CLEANLIBS = "$(TARGET).{lib,exp,il?,tds,map}" $(DLLIB)
|
|
||||||
CLEANOBJS = "*.{#{$OBJEXT},#{$LIBEXT},s[ol],pdb,bak}"
|
|
||||||
|
|
||||||
all: #{target ? "$(DLLIB)" : "Makefile"}
|
}
|
||||||
static: $(STATIC_LIB)
|
install_dirs.each {|d| mfile.print("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]}
|
||||||
|
n = ($extout ? '$(RUBYARCHDIR)/' : '') + '$(TARGET).'
|
||||||
|
mfile.print %{
|
||||||
|
TARGET_SO = #{($extout ? '$(RUBYARCHDIR)/' : '')}$(DLLIB)
|
||||||
|
CLEANLIBS = #{n}#{CONFIG['DLEXT']} #{n}il? #{n}tds #{n}map
|
||||||
|
CLEANOBJS = *.#{$OBJEXT} *.#{$LIBEXT} *.s[ol] *.pdb *.exp *.bak
|
||||||
|
|
||||||
|
all: #{target ? $extout ? "install" : "$(DLLIB)" : "Makefile"}
|
||||||
|
static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
|
||||||
}
|
}
|
||||||
mfile.print CLEANINGS
|
mfile.print CLEANINGS
|
||||||
dirs = []
|
dirs = []
|
||||||
if not $static and target
|
mfile.print "install: install-so install-rb\n\n"
|
||||||
dirs << (dir = "$(RUBYARCHDIR)")
|
sodir = dir = "$(RUBYARCHDIR)"
|
||||||
mfile.print("install: #{dir}\n")
|
mfile.print("install-so: #{dir}\n")
|
||||||
|
if target
|
||||||
f = "$(DLLIB)"
|
f = "$(DLLIB)"
|
||||||
dest = "#{dir}/#{f}"
|
dest = "#{dir}/#{f}"
|
||||||
mfile.print "install: #{dest}\n"
|
mfile.print "install-so: #{dest}\n"
|
||||||
mfile.print "#{dest}: #{f} #{dir}\n\t@$(INSTALL_PROG) #{f} #{dir}\n"
|
unless $extout
|
||||||
|
mfile.print "#{dest}: #{f}\n\t@$(INSTALL_PROG) #{f} #{dir}\n"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
for i in [[["lib/**/*.rb", "$(RUBYLIBDIR)", "lib"]], $INSTALLFILES]
|
dirs << (dir = "$(RUBYLIBDIR)")
|
||||||
|
mfile.print("install-rb: install-rb-default\n")
|
||||||
|
mfile.print("install-rb-default: #{dir}\n")
|
||||||
|
for sfx, i in [["-default", [["lib/**/*.rb", "$(RUBYLIBDIR)", "lib"]]], ["", $INSTALLFILES]]
|
||||||
files = install_files(mfile, i, nil, srcprefix) or next
|
files = install_files(mfile, i, nil, srcprefix) or next
|
||||||
for dir, *files in files
|
for dir, *files in files
|
||||||
unless dirs.include?(dir)
|
unless dirs.include?(dir)
|
||||||
dirs << dir
|
dirs << dir
|
||||||
mfile.print("install: #{dir}\n")
|
mfile.print "install-rb#{sfx}: #{dir}\n"
|
||||||
end
|
end
|
||||||
files.each do |f|
|
files.each do |f|
|
||||||
dest = "#{dir}/#{File.basename(f)}"
|
dest = "#{dir}/#{File.basename(f)}"
|
||||||
mfile.print("install: #{dest}\n")
|
mfile.print("install-rb#{sfx}: #{dest}\n")
|
||||||
mfile.print("#{dest}: #{f} #{dir}\n\t@$(INSTALL_DATA) #{f} #{dir}\n")
|
mfile.print("#{dest}: #{f}\n\t@$(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} #{dir}\n")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if dirs.empty?
|
dirs.unshift(sodir) if target and !dirs.include?(sodir)
|
||||||
mfile.print("install:\n")
|
dirs.each {|dir| mfile.print "#{dir}:\n\t@$(MAKEDIRS) $@\n"}
|
||||||
else
|
|
||||||
dirs.each {|dir| mfile.print "#{dir}:\n\t@$(MAKEDIRS) #{dir}\n"}
|
|
||||||
end
|
|
||||||
|
|
||||||
mfile.print "\nsite-install: install\n\n"
|
mfile.print <<-SITEINSTALL
|
||||||
|
|
||||||
|
site-install: site-install-so site-install-rb
|
||||||
|
site-install-so: install-so
|
||||||
|
site-install-rb: install-rb
|
||||||
|
|
||||||
|
SITEINSTALL
|
||||||
|
|
||||||
return unless target
|
return unless target
|
||||||
|
|
||||||
|
mfile.puts SRC_EXT.collect {|ext| ".path.#{ext} = $(VPATH)"} if $nmake == ?b
|
||||||
mfile.print ".SUFFIXES: .#{SRC_EXT.join(' .')} .#{$OBJEXT}\n"
|
mfile.print ".SUFFIXES: .#{SRC_EXT.join(' .')} .#{$OBJEXT}\n"
|
||||||
mfile.print "\n"
|
mfile.print "\n"
|
||||||
|
|
||||||
|
@ -977,18 +1067,17 @@ static: $(STATIC_LIB)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if makedef
|
mfile.print "$(RUBYARCHDIR)/" if $extout
|
||||||
mfile.print "$(DLLIB): $(OBJS) $(DEFFILE)\n\t"
|
mfile.print "$(DLLIB): ", (makedef ? "$(DEFFILE) " : ""), "$(OBJS)\n\t"
|
||||||
else
|
|
||||||
mfile.print "$(DLLIB): $(OBJS)\n\t"
|
|
||||||
end
|
|
||||||
mfile.print "@-$(RM) $@\n\t"
|
mfile.print "@-$(RM) $@\n\t"
|
||||||
mfile.print "@-$(RM) $(TARGET).lib\n\t" if $mswin
|
mfile.print "@-$(MAKEDIRS) $(@D)\n\t" if $extout
|
||||||
mfile.print LINK_SO, "\n\n"
|
mfile.print LINK_SO, "\n\n"
|
||||||
mfile.print "$(STATIC_LIB): $(OBJS)\n\t"
|
unless $static.nil?
|
||||||
mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
|
mfile.print "$(STATIC_LIB): $(OBJS)\n\t"
|
||||||
if ranlib = config_string('RANLIB')
|
mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
|
||||||
mfile.print "\n\t@-#{ranlib} $(DLLIB) 2> /dev/null || true"
|
config_string('RANLIB') do |ranlib|
|
||||||
|
mfile.print "\n\t@-#{ranlib} $(DLLIB) 2> /dev/null || true"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
mfile.print "\n\n"
|
mfile.print "\n\n"
|
||||||
if makedef
|
if makedef
|
||||||
|
@ -1000,15 +1089,53 @@ static: $(STATIC_LIB)
|
||||||
if File.exist?(depend)
|
if File.exist?(depend)
|
||||||
open(depend, "r") do |dfile|
|
open(depend, "r") do |dfile|
|
||||||
mfile.printf "###\n"
|
mfile.printf "###\n"
|
||||||
while line = dfile.gets()
|
cont = implicit = nil
|
||||||
line.gsub!(/\.o\b/, ".#{$OBJEXT}")
|
impconv = proc do
|
||||||
if $nmake
|
COMPILE_RULES.each {|rule| mfile.print(rule % implicit[0], implicit[1])}
|
||||||
line.gsub!(%r"(\s)([^\s\/]+\.(?:#{(SRC_EXT + ['h']).join('|')}))(?=\s|\z)", '\1{.;$(VPATH)}\2')
|
implicit = nil
|
||||||
|
end
|
||||||
|
ruleconv = proc do |line|
|
||||||
|
if implicit
|
||||||
|
if /\A\t/ =~ line
|
||||||
|
implicit[1] << line
|
||||||
|
next
|
||||||
|
else
|
||||||
|
impconv[]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if m = /\A\.(\w+)\.(\w+)(?:\s*:)/.match(line)
|
||||||
|
implicit = [[m[1], m[2]], [m.post_match]]
|
||||||
|
next
|
||||||
|
elsif RULE_SUBST and /\A[$\w][^#]*:/ =~ line
|
||||||
|
line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
|
||||||
end
|
end
|
||||||
line.gsub!(/\$\(hdrdir\)\/config.h/, $config_h) if $config_h
|
|
||||||
mfile.print line
|
mfile.print line
|
||||||
end
|
end
|
||||||
|
while line = dfile.gets()
|
||||||
|
line.gsub!(/\.o\b/, ".#{$OBJEXT}")
|
||||||
|
line.gsub!(/\$\(hdrdir\)\/config.h/, $config_h) if $config_h
|
||||||
|
if /(?:^|[^\\])(?:\\\\)*\\$/ =~ line
|
||||||
|
(cont ||= []) << line
|
||||||
|
next
|
||||||
|
elsif cont
|
||||||
|
line = (cont << line).join
|
||||||
|
cont = nil
|
||||||
|
end
|
||||||
|
ruleconv.call(line)
|
||||||
|
end
|
||||||
|
if cont
|
||||||
|
ruleconv.call(cont.join)
|
||||||
|
elsif implicit
|
||||||
|
impconv.call
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
headers = %w[ruby.h defines.h]
|
||||||
|
if RULE_SUBST
|
||||||
|
headers.each {|h| h.sub!(/.*/) {|*m| RULE_SUBST % m}}
|
||||||
|
end
|
||||||
|
headers << $config_h if $config_h
|
||||||
|
mfile.print "$(OBJS): ", headers.join(' '), "\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
$makefile_created = true
|
$makefile_created = true
|
||||||
|
@ -1044,14 +1171,17 @@ def init_mkmf(config = CONFIG)
|
||||||
|
|
||||||
$LOCAL_LIBS = ""
|
$LOCAL_LIBS = ""
|
||||||
|
|
||||||
$cleanfiles = []
|
$cleanfiles = config_string('CLEANFILES') {|s| Shellwords.shellwords(s)} || []
|
||||||
$distcleanfiles = []
|
$distcleanfiles = config_string('DISTCLEANFILES') {|s| Shellwords.shellwords(s)} || []
|
||||||
|
|
||||||
|
$extout ||= nil
|
||||||
|
$extout_prefix ||= nil
|
||||||
|
|
||||||
$arg_config.clear
|
$arg_config.clear
|
||||||
dir_config("opt")
|
dir_config("opt")
|
||||||
end
|
end
|
||||||
|
|
||||||
FailedMassage = <<MESSAGE
|
FailedMessage = <<MESSAGE
|
||||||
Could not create Makefile due to some reason, probably lack of
|
Could not create Makefile due to some reason, probably lack of
|
||||||
necessary libraries and/or headers. Check the mkmf.log file for more
|
necessary libraries and/or headers. Check the mkmf.log file for more
|
||||||
details. You may need configuration options.
|
details. You may need configuration options.
|
||||||
|
@ -1062,7 +1192,7 @@ MESSAGE
|
||||||
def mkmf_failed(path)
|
def mkmf_failed(path)
|
||||||
unless $makefile_created or File.exist?("Makefile")
|
unless $makefile_created or File.exist?("Makefile")
|
||||||
opts = $arg_config.collect {|t, n| "\t#{t}#{"=#{n}" if n}\n"}
|
opts = $arg_config.collect {|t, n| "\t#{t}#{"=#{n}" if n}\n"}
|
||||||
abort "*** #{path} failed ***\n" + FailedMassage + opts.join
|
abort "*** #{path} failed ***\n" + FailedMessage + opts.join
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1081,8 +1211,12 @@ end
|
||||||
Config::CONFIG["srcdir"] = CONFIG["srcdir"] =
|
Config::CONFIG["srcdir"] = CONFIG["srcdir"] =
|
||||||
$srcdir = arg_config("--srcdir", File.dirname($0))
|
$srcdir = arg_config("--srcdir", File.dirname($0))
|
||||||
$configure_args["--topsrcdir"] ||= $srcdir
|
$configure_args["--topsrcdir"] ||= $srcdir
|
||||||
Config::CONFIG["topdir"] = CONFIG["topdir"] =
|
$curdir = arg_config("--curdir", Dir.pwd)
|
||||||
$curdir = arg_config("--curdir", Dir.pwd)
|
Config.expand(curdir = $curdir.dup)
|
||||||
|
unless File.expand_path(Config::CONFIG["topdir"]) == File.expand_path(curdir)
|
||||||
|
CONFIG["topdir"] = $curdir
|
||||||
|
Config::CONFIG["topdir"] = curdir
|
||||||
|
end
|
||||||
$configure_args["--topdir"] ||= $curdir
|
$configure_args["--topdir"] ||= $curdir
|
||||||
$ruby = arg_config("--ruby", File.join(Config::CONFIG["bindir"], CONFIG["ruby_install_name"]))
|
$ruby = arg_config("--ruby", File.join(Config::CONFIG["bindir"], CONFIG["ruby_install_name"]))
|
||||||
|
|
||||||
|
@ -1104,6 +1238,7 @@ COMMON_HEADERS = (hdr.join("\n") unless hdr.empty?)
|
||||||
COMMON_LIBS = config_string('COMMON_LIBS', &split) || []
|
COMMON_LIBS = config_string('COMMON_LIBS', &split) || []
|
||||||
|
|
||||||
COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:]
|
COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:]
|
||||||
|
RULE_SUBST = config_string('RULE_SUBST')
|
||||||
COMPILE_C = config_string('COMPILE_C') || '$(CC) $(CFLAGS) $(CPPFLAGS) -c $<'
|
COMPILE_C = config_string('COMPILE_C') || '$(CC) $(CFLAGS) $(CPPFLAGS) -c $<'
|
||||||
COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<'
|
COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<'
|
||||||
TRY_LINK = config_string('TRY_LINK') ||
|
TRY_LINK = config_string('TRY_LINK') ||
|
||||||
|
@ -1111,9 +1246,9 @@ TRY_LINK = config_string('TRY_LINK') ||
|
||||||
"$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
|
"$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
|
||||||
LINK_SO = config_string('LINK_SO') ||
|
LINK_SO = config_string('LINK_SO') ||
|
||||||
if CONFIG["DLEXT"] == $OBJEXT
|
if CONFIG["DLEXT"] == $OBJEXT
|
||||||
"ld $(DLDFLAGS) -r -o $(DLLIB) $(OBJS)\n"
|
"ld $(DLDFLAGS) -r -o $@ $(OBJS)\n"
|
||||||
else
|
else
|
||||||
"$(LDSHARED) $(DLDFLAGS) $(LIBPATH) #{OUTFLAG}$(DLLIB) " \
|
"$(LDSHARED) $(DLDFLAGS) $(LIBPATH) #{OUTFLAG}$@ " \
|
||||||
"$(OBJS) $(LOCAL_LIBS) $(LIBS)"
|
"$(OBJS) $(LOCAL_LIBS) $(LIBS)"
|
||||||
end
|
end
|
||||||
LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L"%s"'
|
LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L"%s"'
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
SHELL = $(COMSPEC)
|
SHELL = $(COMSPEC)
|
||||||
|
MKFILES = Makefile
|
||||||
|
NULL = nul
|
||||||
|
|
||||||
#### Start of system configuration section. ####
|
#### Start of system configuration section. ####
|
||||||
|
|
||||||
|
@ -26,7 +28,7 @@ iconinc=-I$(icondirs: = -I)
|
||||||
!endif
|
!endif
|
||||||
###############
|
###############
|
||||||
|
|
||||||
VPATH = $(srcdir):$(srcdir)/missing
|
VPATH = $(srcdir);$(srcdir)/missing;$(srcdir)/win32
|
||||||
.SUFFIXES: .y .def .lib
|
.SUFFIXES: .y .def .lib
|
||||||
|
|
||||||
!if !defined(CC)
|
!if !defined(CC)
|
||||||
|
@ -41,6 +43,7 @@ YACC = byacc
|
||||||
AR = lib -nologo
|
AR = lib -nologo
|
||||||
PURIFY =
|
PURIFY =
|
||||||
AUTOCONF = autoconf
|
AUTOCONF = autoconf
|
||||||
|
RM = $(srcdir:/=\)\win32\rm.bat
|
||||||
|
|
||||||
!if !defined(PROCESSOR_ARCHITECTURE)
|
!if !defined(PROCESSOR_ARCHITECTURE)
|
||||||
PROCESSOR_ARCHITECTURE = x86
|
PROCESSOR_ARCHITECTURE = x86
|
||||||
|
@ -81,19 +84,29 @@ prefix = /usr
|
||||||
!if !defined(exec_prefix)
|
!if !defined(exec_prefix)
|
||||||
exec_prefix = $(prefix)
|
exec_prefix = $(prefix)
|
||||||
!endif
|
!endif
|
||||||
!if !defined(DESTDIR)
|
|
||||||
DESTDIR = $(prefix)
|
|
||||||
!endif
|
|
||||||
!if !defined(libdir)
|
!if !defined(libdir)
|
||||||
libdir = $(exec_prefix)/lib
|
libdir = $(exec_prefix)/lib
|
||||||
!endif
|
!endif
|
||||||
|
!if !defined(datadir)
|
||||||
|
datadir = $(prefix)/share
|
||||||
|
!endif
|
||||||
|
!ifndef EXTOUT
|
||||||
|
EXTOUT = .ext
|
||||||
|
!endif
|
||||||
!ifndef RIDATADIR
|
!ifndef RIDATADIR
|
||||||
RIDATADIR = $(DESTDIR)/share/ri/$(MAJOR).$(MINOR)/system
|
RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system
|
||||||
|
!endif
|
||||||
|
!ifndef TESTUI
|
||||||
|
TESTUI = console
|
||||||
|
!endif
|
||||||
|
!ifndef TESTS
|
||||||
|
TESTS =
|
||||||
!endif
|
!endif
|
||||||
!ifndef RDOCTARGET
|
!ifndef RDOCTARGET
|
||||||
RDOCTARGET = install-nodoc
|
RDOCTARGET = install-nodoc
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
OUTFLAG = -Fe
|
||||||
!if !defined(CFLAGS)
|
!if !defined(CFLAGS)
|
||||||
CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
||||||
!endif
|
!endif
|
||||||
|
@ -131,6 +144,7 @@ PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
|
||||||
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
|
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
|
||||||
RUBYDEF = $(RUBY_SO_NAME).def
|
RUBYDEF = $(RUBY_SO_NAME).def
|
||||||
MINIRUBY = .\miniruby$(EXEEXT)
|
MINIRUBY = .\miniruby$(EXEEXT)
|
||||||
|
RUNRUBY = .\ruby$(EXEEXT) "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" --
|
||||||
|
|
||||||
!if !defined(STACK)
|
!if !defined(STACK)
|
||||||
STACK = 0x2000000
|
STACK = 0x2000000
|
||||||
|
@ -144,71 +158,35 @@ LIBRUBY_SO = $(RUBY_SO_NAME).dll
|
||||||
LIBRUBY = $(RUBY_SO_NAME).lib
|
LIBRUBY = $(RUBY_SO_NAME).lib
|
||||||
LIBRUBYARG = $(LIBRUBY)
|
LIBRUBYARG = $(LIBRUBY)
|
||||||
|
|
||||||
|
PREP = miniruby$(EXEEXT)
|
||||||
|
|
||||||
|
!if !defined(EXTSTATIC)
|
||||||
|
EXTSTATIC =
|
||||||
|
!endif
|
||||||
|
|
||||||
|
OBJEXT = obj
|
||||||
|
|
||||||
EXTOBJS =
|
EXTOBJS =
|
||||||
DLDOBJS =
|
DLDOBJS =
|
||||||
|
|
||||||
MAINOBJ = main.obj
|
WINMAINOBJ = winmain.$(OBJEXT)
|
||||||
WINMAINOBJ = winmain.obj
|
|
||||||
|
|
||||||
OBJS = array.obj \
|
all: $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk
|
||||||
bignum.obj \
|
|
||||||
class.obj \
|
|
||||||
compar.obj \
|
|
||||||
dir.obj \
|
|
||||||
dln.obj \
|
|
||||||
enum.obj \
|
|
||||||
error.obj \
|
|
||||||
eval.obj \
|
|
||||||
file.obj \
|
|
||||||
gc.obj \
|
|
||||||
hash.obj \
|
|
||||||
inits.obj \
|
|
||||||
io.obj \
|
|
||||||
marshal.obj \
|
|
||||||
math.obj \
|
|
||||||
numeric.obj \
|
|
||||||
object.obj \
|
|
||||||
pack.obj \
|
|
||||||
parse.obj \
|
|
||||||
prec.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)
|
|
||||||
|
|
||||||
SCRIPT_ARGS = "--dest-dir=$(DESTDIR)" \
|
|
||||||
"--make=$(MAKE)" \
|
|
||||||
"--mflags=$(MFLAGS)" \
|
|
||||||
"--make-flags=$(MAKEFLAGS)"
|
|
||||||
|
|
||||||
all: ext miniruby$(EXEEXT) rbconfig.rb \
|
|
||||||
$(LIBRUBY) $(MISCLIBS)
|
|
||||||
@$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) $(SCRIPT_ARGS)
|
|
||||||
|
|
||||||
ext:
|
|
||||||
@mkdir $@
|
|
||||||
|
|
||||||
ruby: $(PROGRAM)
|
ruby: $(PROGRAM)
|
||||||
rubyw: $(WPROGRAM)
|
rubyw: $(WPROGRAM)
|
||||||
lib: $(LIBRUBY)
|
|
||||||
dll: $(LIBRUBY_SO)
|
|
||||||
|
|
||||||
config: config.h config.status
|
!include $(srcdir)/common.mk
|
||||||
|
|
||||||
config.h:
|
CONFIG_H = ./.config.h.time
|
||||||
@echo Creating <<$@
|
|
||||||
|
config: config.status
|
||||||
|
|
||||||
|
config.status: $(CONFIG_H)
|
||||||
|
|
||||||
|
$(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub
|
||||||
|
@echo Creating config.h
|
||||||
|
@$(srcdir:/=\)\win32\ifchange.bat config.h <<
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
#define HAVE_SYS_STAT_H 1
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
@ -296,12 +274,15 @@ config.h:
|
||||||
#define RUBY_PLATFORM "$(ARCH)-$(OS)"
|
#define RUBY_PLATFORM "$(ARCH)-$(OS)"
|
||||||
#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
||||||
#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(RT)"
|
#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(RT)"
|
||||||
<<KEEP
|
<<
|
||||||
|
@exit > $(@:/=\)
|
||||||
|
|
||||||
config.status: Makefile $(srcdir)/win32/Makefile.sub
|
config.status: $(MKFILES) $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk
|
||||||
@echo Creating <<$@
|
@echo Creating $@
|
||||||
|
@exit <<$@
|
||||||
# Generated automatically by Makefile.sub.
|
# Generated automatically by Makefile.sub.
|
||||||
s,@SHELL@,$$(COMSPEC),;t t
|
s,@SHELL@,$$(COMSPEC),;t t
|
||||||
|
s,@PATH_SEPARATOR@,;,;t t
|
||||||
s,@CFLAGS@,$(CFLAGS),;t t
|
s,@CFLAGS@,$(CFLAGS),;t t
|
||||||
s,@CPPFLAGS@,$(CPPFLAGS),;t t
|
s,@CPPFLAGS@,$(CPPFLAGS),;t t
|
||||||
s,@CXXFLAGS@,$(CXXFLAGS),;t t
|
s,@CXXFLAGS@,$(CXXFLAGS),;t t
|
||||||
|
@ -309,7 +290,7 @@ s,@FFLAGS@,$(FFLAGS),;t t
|
||||||
s,@LDFLAGS@,,;t t
|
s,@LDFLAGS@,,;t t
|
||||||
s,@LIBS@,$(LIBS),;t t
|
s,@LIBS@,$(LIBS),;t t
|
||||||
s,@exec_prefix@,$${prefix},;t t
|
s,@exec_prefix@,$${prefix},;t t
|
||||||
s,@prefix@,,;t t
|
s,@prefix@,$(prefix),;t t
|
||||||
s,@program_transform_name@,s,,,,;t t
|
s,@program_transform_name@,s,,,,;t t
|
||||||
s,@bindir@,$${exec_prefix}/bin,;t t
|
s,@bindir@,$${exec_prefix}/bin,;t t
|
||||||
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
||||||
|
@ -350,10 +331,10 @@ s,@LIBOBJS@, acosh.obj crypt.obj erf.obj win32.obj,;t t
|
||||||
s,@ALLOCA@,$(ALLOCA),;t t
|
s,@ALLOCA@,$(ALLOCA),;t t
|
||||||
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
|
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
|
||||||
s,@EXEEXT@,.exe,;t t
|
s,@EXEEXT@,.exe,;t t
|
||||||
s,@OBJEXT@,obj,;t t
|
s,@OBJEXT@,$(OBJEXT),;t t
|
||||||
s,@XCFLAGS@,$(XCFLAGS),;t t
|
s,@XCFLAGS@,$(XCFLAGS),;t t
|
||||||
s,@XLDFLAGS@,$(XLDFLAGS),;t t
|
s,@XLDFLAGS@,$(XLDFLAGS),;t t
|
||||||
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE),;t t
|
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb,;t t
|
||||||
s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
|
s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
|
||||||
s,@STATIC@,$(STATIC),;t t
|
s,@STATIC@,$(STATIC),;t t
|
||||||
s,@CCDLFLAGS@,,;t t
|
s,@CCDLFLAGS@,,;t t
|
||||||
|
@ -365,6 +346,11 @@ s,@STRIP@,$(STRIP),;t t
|
||||||
s,@EXTSTATIC@,$(EXTSTATIC),;t t
|
s,@EXTSTATIC@,$(EXTSTATIC),;t t
|
||||||
s,@setup@,Setup,;t t
|
s,@setup@,Setup,;t t
|
||||||
s,@MINIRUBY@,$(MINIRUBY),;t t
|
s,@MINIRUBY@,$(MINIRUBY),;t t
|
||||||
|
s,@PREP@,miniruby$(EXEEXT),;t t
|
||||||
|
s,@RUNRUBY@,$(RUNRUBY),;t t
|
||||||
|
s,@EXTOUT@,$(EXTOUT),;t t
|
||||||
|
s,@ARCHFILE@,,;t t
|
||||||
|
s,@RDOCTARGET@,$(RDOCTARGET),;t t
|
||||||
s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t
|
s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t
|
||||||
s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t
|
s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t
|
||||||
s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
|
s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
|
||||||
|
@ -381,7 +367,7 @@ s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
|
||||||
s,@SOLIBS@,$(SOLIBS),;t t
|
s,@SOLIBS@,$(SOLIBS),;t t
|
||||||
s,@DLDLIBS@,$(DLDLIBS),;t t
|
s,@DLDLIBS@,$(DLDLIBS),;t t
|
||||||
s,@ENABLE_SHARED@,yes,;t t
|
s,@ENABLE_SHARED@,yes,;t t
|
||||||
s,@OUTFLAG@,-Fe,;t t
|
s,@OUTFLAG@,$(OUTFLAG),;t t
|
||||||
s,@CPPOUTFILE@,-P,;t t
|
s,@CPPOUTFILE@,-P,;t t
|
||||||
s,@LIBPATHFLAG@, -libpath:"%s",;t t
|
s,@LIBPATHFLAG@, -libpath:"%s",;t t
|
||||||
s,@RPATHFLAG@,,;t t
|
s,@RPATHFLAG@,,;t t
|
||||||
|
@ -389,11 +375,13 @@ s,@LIBARG@,%s.lib,;t t
|
||||||
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS),;t t
|
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS),;t t
|
||||||
s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t
|
s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t
|
||||||
s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
|
s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
|
||||||
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: .%s.%s:,;t t
|
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
|
||||||
|
s,@RULE_SUBST@,{.;$$(srcdir);$$(topdir);$$(hdrdir)}%s,;t t
|
||||||
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
|
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
|
||||||
s,@COMMON_LIBS@,m,;t t
|
s,@COMMON_LIBS@,m,;t t
|
||||||
s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
|
s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
|
||||||
s,@COMMON_HEADERS@,windows.h winsock.h,;t t
|
s,@COMMON_HEADERS@,windows.h winsock.h,;t t
|
||||||
|
s,@DISTCLEANFILES@,vc*.pdb,;t t
|
||||||
s,@EXPORT_PREFIX@, ,;t t
|
s,@EXPORT_PREFIX@, ,;t t
|
||||||
s,@arch@,$(ARCH)-$(OS),;t t
|
s,@arch@,$(ARCH)-$(OS),;t t
|
||||||
s,@sitearch@,$(ARCH)-$(RT),;t t
|
s,@sitearch@,$(ARCH)-$(RT),;t t
|
||||||
|
@ -404,111 +392,47 @@ s,@srcdir@,$(srcdir),;t t
|
||||||
s,@top_srcdir@,$(srcdir),;t t
|
s,@top_srcdir@,$(srcdir),;t t
|
||||||
<<KEEP
|
<<KEEP
|
||||||
|
|
||||||
miniruby$(EXEEXT): $(OBJS) $(MAINOBJ) dmyext.obj
|
miniruby$(EXEEXT):
|
||||||
@echo. $(LIBS)
|
@echo. $(LIBS)
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) dmyext.obj $(OBJS) $(LIBS) -Fe$@ $(LDFLAGS)
|
$(PURIFY) $(CC) $(MAINOBJ) $(LIBRUBY_A) $(LIBS) -Fe$@ $(LDFLAGS)
|
||||||
|
|
||||||
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $*.res
|
$(PROGRAM): $(RUBY_INSTALL_NAME).res
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) $*.res \
|
$(PURIFY) $(CC) $(MAINOBJ) $(RUBY_INSTALL_NAME).res \
|
||||||
-Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS)
|
$(OUTFLAG)$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS)
|
||||||
|
|
||||||
$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
|
$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) $*.res \
|
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) \
|
||||||
-Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS) -subsystem:Windows
|
$(RUBYW_INSTALL_NAME).res $(OUTFLAG)$@ $(LIBRUBYARG) \
|
||||||
|
$(LDFLAGS) $(XLDFLAGS) -subsystem:Windows
|
||||||
|
|
||||||
$(LIBRUBY_A): $(OBJS) dmyext.obj
|
$(LIBRUBY_A): $(OBJS) $(DMYEXT)
|
||||||
$(AR) $(ARFLAGS)$@ $(OBJS) dmyext.obj
|
$(AR) $(ARFLAGS)$@ $(OBJS) $(DMYEXT)
|
||||||
|
|
||||||
$(LIBRUBY): $(RUBYDEF)
|
$(LIBRUBY): $(RUBYDEF)
|
||||||
$(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
|
$(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
|
||||||
|
|
||||||
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $*.res
|
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
|
||||||
@echo. $(DLDOBJS)
|
@echo. $(DLDOBJS)
|
||||||
$(LIBRUBY_LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) $*.res $(LIBS) \
|
$(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
|
||||||
-Fe$@ $(LDFLAGS) $(LIBRUBY_DLDFLAGS)
|
$(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \
|
||||||
|
$(LIBRUBY_DLDFLAGS)
|
||||||
|
|
||||||
$(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)
|
$(RUBYDEF): $(LIBRUBY_A) $(PREP)
|
||||||
$(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
$(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
||||||
|
|
||||||
{$(srcdir)/win32}.def.lib:
|
{$(srcdir)/win32}.def.lib:
|
||||||
$(AR) $(ARFLAGS)$@ -def:$<
|
$(AR) $(ARFLAGS)$@ -def:$<
|
||||||
|
|
||||||
install: install-nodoc $(RDOCTARGET)
|
clean-local::
|
||||||
|
@$(RM) ext\extinit.c ext\extinit.$(OBJEXT) ext\vc*.pdb miniruby.lib
|
||||||
|
@$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
|
||||||
|
|
||||||
install-nodoc: rbconfig.rb
|
distclean-local::
|
||||||
$(MINIRUBY) $(srcdir)/instruby.rb $(SCRIPT_ARGS)
|
@$(RM) ext\config.cache $(RBCONFIG:/=\)
|
||||||
$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) install
|
@$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF)
|
||||||
|
@$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
|
||||||
|
|
||||||
what-where no-install: rbconfig.rb
|
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: $(RBCONFIG)
|
||||||
$(MINIRUBY) $(srcdir)/instruby.rb -n $(SCRIPT_ARGS) --mantype="$(MANTYPE)"
|
|
||||||
$(MINIRUBY) $(srcdir)/ext/extmk.rb -n $(SCRIPT_ARGS) install
|
|
||||||
|
|
||||||
install-doc:
|
|
||||||
@echo Generating RDoc documentation
|
|
||||||
$(DESTDIR:/=\)\bin\$(PROGRAM) $(srcdir)/bin/rdoc --all --ri-system --op "$(RIDATADIR)" $(srcdir)
|
|
||||||
|
|
||||||
clean: clean-ext clean-local
|
|
||||||
|
|
||||||
clean-local:
|
|
||||||
@if exist $(LIBRUBY_A) del $(LIBRUBY_A)
|
|
||||||
@if exist $(MAINOBJ) del $(MAINOBJ)
|
|
||||||
@if exist rbconfig.rb del rbconfig.rb
|
|
||||||
@if exist ext\extinit.c del ext\extinit.c
|
|
||||||
@if exist ext\extinit.obj del ext\extinit.obj
|
|
||||||
@if exist ext\vc*.pdb del ext\vc*.pdb
|
|
||||||
@if exist *.obj del *.obj
|
|
||||||
@if exist *.res del *.res
|
|
||||||
|
|
||||||
clean-ext:
|
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) clean
|
|
||||||
|
|
||||||
distclean: distclean-ext distclean-local
|
|
||||||
|
|
||||||
distclean-local: clean-local
|
|
||||||
@if exist Makefile del Makefile
|
|
||||||
@if exist config.h del config.h
|
|
||||||
@if exist ext\config.cache del ext\config.cache
|
|
||||||
@if exist config.cache del config.cache
|
|
||||||
@if exist config.log del config.log
|
|
||||||
@if exist config.status del config.status
|
|
||||||
@if exist *~ del *~
|
|
||||||
@if exist *.bak del *.bak
|
|
||||||
@if exist *.stackdump del *.stackdump
|
|
||||||
@if exist *.core del *.core
|
|
||||||
@if exist gmon.out del gmon.out
|
|
||||||
@if exist y.tab.c del y.tab.c
|
|
||||||
@if exist y.output del y.output
|
|
||||||
@if exist *.map del *.map
|
|
||||||
@if exist *.pdb del *.pdb
|
|
||||||
@if exist *.ilk del *.ilk
|
|
||||||
@if exist *.exp del *.exp
|
|
||||||
@if exist $(RUBYDEF) del $(RUBYDEF)
|
|
||||||
@if exist $(RUBY_INSTALL_NAME).rc del $(RUBY_INSTALL_NAME).rc
|
|
||||||
@if exist $(RUBYW_INSTALL_NAME).rc del $(RUBYW_INSTALL_NAME).rc
|
|
||||||
@if exist $(RUBY_SO_NAME).rc del $(RUBY_SO_NAME).rc
|
|
||||||
@if exist $(PROGRAM) del $(PROGRAM)
|
|
||||||
@if exist $(WPROGRAM) del $(WPROGRAM)
|
|
||||||
@if exist $(LIBRUBY_SO) del $(LIBRUBY_SO)
|
|
||||||
@if exist $(LIBRUBY) del $(LIBRUBY)
|
|
||||||
@if exist ext\nul if not exist ext\* rmdir ext
|
|
||||||
@if exist miniruby$(EXEEXT) del miniruby$(EXEEXT)
|
|
||||||
|
|
||||||
distclean-ext:
|
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) distclean
|
|
||||||
|
|
||||||
realclean: distclean
|
|
||||||
@if exist parse.c del parse.c
|
|
||||||
@if exist lex.c del lex.c
|
|
||||||
|
|
||||||
test: miniruby$(EXEEXT) rbconfig.rb $(PROGRAM) NUL
|
|
||||||
@miniruby$(EXEEXT) $(srcdir)/rubytest.rb
|
|
||||||
|
|
||||||
rbconfig.rb: miniruby$(EXEEXT) config.status
|
|
||||||
@$(MINIRUBY) $(srcdir)/mkconfig.rb -srcdir=$(srcdir) \
|
|
||||||
-install_name=$(RUBY_INSTALL_NAME) \
|
|
||||||
-so_name=$(RUBY_SO_NAME) rbconfig.rb
|
|
||||||
|
|
||||||
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
|
||||||
@$(MINIRUBY) $(srcdir)/win32/resource.rb \
|
@$(MINIRUBY) $(srcdir)/win32/resource.rb \
|
||||||
-ruby_name=$(RUBY_INSTALL_NAME) \
|
-ruby_name=$(RUBY_INSTALL_NAME) \
|
||||||
-rubyw_name=$(RUBYW_INSTALL_NAME) \
|
-rubyw_name=$(RUBYW_INSTALL_NAME) \
|
||||||
|
@ -516,13 +440,13 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
||||||
. $(icondirs) $(srcdir)/win32
|
. $(icondirs) $(srcdir)/win32
|
||||||
|
|
||||||
{$(srcdir)/missing}.c.obj:
|
{$(srcdir)/missing}.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
{$(srcdir)/win32}.c.obj:
|
{$(srcdir)/win32}.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
{$(srcdir)}.c.obj:
|
{$(srcdir)}.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
.c.obj:
|
.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
|
|
||||||
.rc.res:
|
.rc.res:
|
||||||
$(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
|
$(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
|
||||||
|
@ -532,162 +456,9 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
||||||
sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $@
|
sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $@
|
||||||
@del y.tab.c
|
@del y.tab.c
|
||||||
|
|
||||||
{$(srcdir)}parse.c: parse.y
|
$(OBJS): {$(srcdir)}win32/win32.h
|
||||||
|
|
||||||
|
dir.$(OBJEXT): {$(srcdir)}win32/dir.h
|
||||||
|
|
||||||
ext/extinit.obj: ext/extinit.c $(SETUP)
|
ext/extinit.obj: ext/extinit.c $(SETUP)
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fo$@ -c ext/extinit.c
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fo$@ -c ext/extinit.c
|
||||||
|
|
||||||
acosh.obj: {$(srcdir)}missing/acosh.c
|
|
||||||
alloca.obj: {$(srcdir)}missing/alloca.c
|
|
||||||
crypt.obj: {$(srcdir)}missing/crypt.c
|
|
||||||
dup2.obj: {$(srcdir)}missing/dup2.c
|
|
||||||
erf.obj: {$(srcdir)}missing/erf.c
|
|
||||||
finite.obj: {$(srcdir)}missing/finite.c
|
|
||||||
flock.obj: {$(srcdir)}missing/flock.c
|
|
||||||
memcmp.obj: {$(srcdir)}missing/memcmp.c
|
|
||||||
memmove.obj: {$(srcdir)}missing/memmove.c
|
|
||||||
mkdir.obj: {$(srcdir)}missing/mkdir.c
|
|
||||||
vsnprintf.obj: {$(srcdir)}missing/vsnprintf.c
|
|
||||||
strcasecmp.obj: {$(srcdir)}missing/strcasecmp.c
|
|
||||||
strncasecmp.obj: {$(srcdir)}missing/strncasecmp.c
|
|
||||||
strchr.obj: {$(srcdir)}missing/strchr.c
|
|
||||||
strdup.obj: {$(srcdir)}missing/strdup.c
|
|
||||||
strerror.obj: {$(srcdir)}missing/strerror.c
|
|
||||||
strftime.obj: {$(srcdir)}missing/strftime.c
|
|
||||||
strstr.obj: {$(srcdir)}missing/strstr.c
|
|
||||||
strtod.obj: {$(srcdir)}missing/strtod.c
|
|
||||||
strtol.obj: {$(srcdir)}missing/strtol.c
|
|
||||||
strtoul.obj: {$(srcdir)}missing/strtoul.c
|
|
||||||
nt.obj: {$(srcdir)}missing/nt.c
|
|
||||||
x68.obj: {$(srcdir)}missing/x68.c
|
|
||||||
os2.obj: {$(srcdir)}missing/os2.c
|
|
||||||
dl_os2.obj: {$(srcdir)}missing/dl_os2.c
|
|
||||||
|
|
||||||
# when I use -I., there is confliction at "OpenFile"
|
|
||||||
# so, set . into environment varible "include"
|
|
||||||
win32.obj: {$(srcdir)}win32/win32.c
|
|
||||||
|
|
||||||
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
|
||||||
.NOEXPORT:
|
|
||||||
###
|
|
||||||
array.obj: {$(srcdir)}array.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
|
|
||||||
bignum.obj: {$(srcdir)}bignum.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
class.obj: {$(srcdir)}class.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}node.h {$(srcdir)}st.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
compar.obj: {$(srcdir)}compar.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
dir.obj: {$(srcdir)}dir.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
dln.obj: {$(srcdir)}dln.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}dln.h {$(srcdir)}/win32/win32.h
|
|
||||||
dmyext.obj: {$(srcdir)}dmyext.c
|
|
||||||
enum.obj: {$(srcdir)}enum.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}node.h {$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
error.obj: {$(srcdir)}error.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}env.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
|
|
||||||
eval.obj: {$(srcdir)}eval.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}node.h {$(srcdir)}env.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}dln.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
file.obj: {$(srcdir)}file.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubyio.h {$(srcdir)}rubysig.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}dln.h {$(srcdir)}/win32/win32.h
|
|
||||||
gc.obj: {$(srcdir)}gc.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}node.h \
|
|
||||||
{$(srcdir)}env.h {$(srcdir)}re.h {$(srcdir)}regex.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
hash.obj: {$(srcdir)}hash.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}st.h {$(srcdir)}util.h {$(srcdir)}rubysig.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
inits.obj: {$(srcdir)}inits.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
io.obj: {$(srcdir)}io.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubyio.h {$(srcdir)}rubysig.h {$(srcdir)}env.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
main.obj: {$(srcdir)}main.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
marshal.obj: {$(srcdir)}marshal.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubyio.h {$(srcdir)}st.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
math.obj: {$(srcdir)}math.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
numeric.obj: {$(srcdir)}numeric.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
object.obj: {$(srcdir)}object.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}st.h {$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
pack.obj: {$(srcdir)}pack.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
parse.obj: {$(srcdir)}parse.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}env.h {$(srcdir)}node.h {$(srcdir)}st.h {$(srcdir)}regex.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}lex.c {$(srcdir)}/win32/win32.h
|
|
||||||
prec.obj: {$(srcdir)}prec.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
process.obj: {$(srcdir)}process.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
|
|
||||||
random.obj: {$(srcdir)}random.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
range.obj: {$(srcdir)}range.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
re.obj: {$(srcdir)}re.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}re.h {$(srcdir)}regex.h {$(srcdir)}/win32/win32.h
|
|
||||||
regex.obj: {$(srcdir)}regex.c config.h {$(srcdir)}regex.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
ruby.obj: {$(srcdir)}ruby.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}dln.h {$(srcdir)}node.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
signal.obj: {$(srcdir)}signal.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}/win32/win32.h
|
|
||||||
sprintf.obj: {$(srcdir)}sprintf.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
st.obj: {$(srcdir)}st.c config.h {$(srcdir)}st.h
|
|
||||||
string.obj: {$(srcdir)}string.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}re.h {$(srcdir)}regex.h {$(srcdir)}/win32/win32.h
|
|
||||||
struct.obj: {$(srcdir)}struct.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
time.obj: {$(srcdir)}time.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
util.obj: {$(srcdir)}util.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
variable.obj: {$(srcdir)}variable.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}env.h {$(srcdir)}node.h {$(srcdir)}st.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
version.obj: {$(srcdir)}version.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}version.h {$(srcdir)}/win32/win32.h
|
|
||||||
|
|
|
@ -10,10 +10,14 @@ echo>> ~tmp~.mak @del ~tmp~.mak
|
||||||
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
|
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
|
||||||
:loop
|
:loop
|
||||||
if "%1" == "" goto :end
|
if "%1" == "" goto :end
|
||||||
|
if "%1" == "--prefix" goto :prefix
|
||||||
if "%1" == "--srcdir" goto :srcdir
|
if "%1" == "--srcdir" goto :srcdir
|
||||||
if "%1" == "srcdir" goto :srcdir
|
if "%1" == "srcdir" goto :srcdir
|
||||||
if "%1" == "--target" goto :target
|
if "%1" == "--target" goto :target
|
||||||
if "%1" == "target" goto :target
|
if "%1" == "target" goto :target
|
||||||
|
if "%1" == "--with-static-linked-ext" goto :extstatic
|
||||||
|
if "%1" == "--program-suffix" goto :suffix
|
||||||
|
if "%1" == "--program-name" goto :progname
|
||||||
if "%1" == "--enable-install-doc" goto :enable-rdoc
|
if "%1" == "--enable-install-doc" goto :enable-rdoc
|
||||||
if "%1" == "--disable-install-doc" goto :disable-rdoc
|
if "%1" == "--disable-install-doc" goto :disable-rdoc
|
||||||
if "%1" == "-h" goto :help
|
if "%1" == "-h" goto :help
|
||||||
|
@ -26,11 +30,35 @@ goto :loop
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
|
:prefix
|
||||||
|
echo>> ~tmp~.mak "prefix=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:suffix
|
||||||
|
echo>> ~tmp~.mak "RUBY_SUFFIX=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:installname
|
||||||
|
echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:soname
|
||||||
|
echo>> ~tmp~.mak "RUBY_SO_NAME=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
:target
|
:target
|
||||||
echo>> ~tmp~.mak "%2" \
|
echo>> ~tmp~.mak "%2" \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
|
:extstatic
|
||||||
|
echo>> ~tmp~.mak "EXTSTATIC=static" \
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
:enable-rdoc
|
:enable-rdoc
|
||||||
echo>> ~tmp~.mak "RDOCTARGET=install-doc" \
|
echo>> ~tmp~.mak "RDOCTARGET=install-doc" \
|
||||||
shift
|
shift
|
||||||
|
@ -43,9 +71,12 @@ goto :loop
|
||||||
echo Configuration:
|
echo Configuration:
|
||||||
echo --help display this help
|
echo --help display this help
|
||||||
echo --srcdir=DIR find the sources in DIR [configure dir or `..']
|
echo --srcdir=DIR find the sources in DIR [configure dir or `..']
|
||||||
|
echo Installation directories:
|
||||||
|
echo --prefix=PREFIX install files in PREFIX [/usr]
|
||||||
echo System types:
|
echo System types:
|
||||||
echo --target=TARGET configure for TARGET [i386-mswin32]
|
echo --target=TARGET configure for TARGET [i386-mswin32]
|
||||||
echo Optional Package:
|
echo Optional Package:
|
||||||
|
echo --with-static-linked-ext link external modules statically
|
||||||
echo --enable-install-doc install rdoc indexes during install
|
echo --enable-install-doc install rdoc indexes during install
|
||||||
del ~tmp~.mak
|
del ~tmp~.mak
|
||||||
goto :exit
|
goto :exit
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
SHELL = $(COMSPEC)
|
SHELL = $(COMSPEC)
|
||||||
|
MKFILES = Makefile
|
||||||
|
NULL = nul
|
||||||
|
|
||||||
#### Start of system configuration section. ####
|
#### Start of system configuration section. ####
|
||||||
|
|
||||||
|
@ -26,7 +28,7 @@ iconinc=-I$(icondirs: = -I)
|
||||||
!endif
|
!endif
|
||||||
###############
|
###############
|
||||||
|
|
||||||
VPATH = $(srcdir):$(srcdir)/missing
|
VPATH = $(srcdir);$(srcdir)/missing;$(srcdir)/wince
|
||||||
.SUFFIXES: .y .def .lib
|
.SUFFIXES: .y .def .lib
|
||||||
|
|
||||||
!if !defined(CC)
|
!if !defined(CC)
|
||||||
|
@ -41,6 +43,7 @@ YACC = byacc
|
||||||
AR = lib -nologo
|
AR = lib -nologo
|
||||||
PURIFY =
|
PURIFY =
|
||||||
AUTOCONF = autoconf
|
AUTOCONF = autoconf
|
||||||
|
RM = $(srcdir)\win32\rm.bat
|
||||||
|
|
||||||
!if !defined(PROCESSOR_ARCHITECTURE)
|
!if !defined(PROCESSOR_ARCHITECTURE)
|
||||||
PROCESSOR_ARCHITECTURE = x86
|
PROCESSOR_ARCHITECTURE = x86
|
||||||
|
@ -66,11 +69,9 @@ DEBUGFLAGS = -Zi
|
||||||
!if !defined(OPTFLAGS)
|
!if !defined(OPTFLAGS)
|
||||||
OPTFLAGS = -w -O2b2xg-
|
OPTFLAGS = -w -O2b2xg-
|
||||||
!endif
|
!endif
|
||||||
!ifndef OS
|
!if !defined(OS) || !defined(RT)
|
||||||
OS = mswin32
|
OS = mswince
|
||||||
!endif
|
RT = $(OS)
|
||||||
!ifndef RT
|
|
||||||
RT = msvcrt
|
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!ifndef RUBY_SO_NAME
|
!ifndef RUBY_SO_NAME
|
||||||
|
@ -80,7 +81,6 @@ RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)
|
||||||
RUBY_PLATFORM = $(ARCH)-$(OS)
|
RUBY_PLATFORM = $(ARCH)-$(OS)
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
|
||||||
!if !defined(prefix)
|
!if !defined(prefix)
|
||||||
prefix = /usr
|
prefix = /usr
|
||||||
!endif
|
!endif
|
||||||
|
@ -90,17 +90,34 @@ exec_prefix = $(prefix)
|
||||||
!if !defined(libdir)
|
!if !defined(libdir)
|
||||||
libdir = $(exec_prefix)/lib
|
libdir = $(exec_prefix)/lib
|
||||||
!endif
|
!endif
|
||||||
!if !defined(DESTDIR)
|
!if !defined(datadir)
|
||||||
DESTDIR = $(prefix)
|
datadir = $(prefix)/share
|
||||||
!endif
|
!endif
|
||||||
|
!ifndef EXTOUT
|
||||||
|
EXTOUT = .ext
|
||||||
|
!endif
|
||||||
|
!ifndef RIDATADIR
|
||||||
|
RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system
|
||||||
|
!endif
|
||||||
|
!ifndef RDOCTARGET
|
||||||
|
RDOCTARGET = install-doc
|
||||||
|
!endif
|
||||||
|
|
||||||
|
OUTFLAG = -Fe
|
||||||
!if !defined(CFLAGS)
|
!if !defined(CFLAGS)
|
||||||
CFLAGS = $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
CFLAGS = $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
||||||
!endif
|
!endif
|
||||||
!if !defined(CPPFLAGS)
|
!if !defined(CPPFLAGS)
|
||||||
CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -I$(srcdir)/wince
|
CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -I$(srcdir)/wince \
|
||||||
|
$(CECPUDEF) -DUNDER_CE -D_WIN32_WCE=$(SUBSYSVERSION:.=) \
|
||||||
|
-DFILENAME_MAX=MAX_PATH -DTLS_OUT_OF_INDEXES=0xFFFFFFFF \
|
||||||
|
-DBUFSIZ=512 -D_UNICODE -DUNICODE
|
||||||
|
!endif
|
||||||
|
!if !defined(LDFLAGS)
|
||||||
|
LDFLAGS = -link -incremental:yes -pdb:none -machine:$(MACHINE) -subsystem:$(SUBSYSTEM)
|
||||||
!endif
|
!endif
|
||||||
!if !defined(XLDFLAGS)
|
!if !defined(XLDFLAGS)
|
||||||
XLDFLAGS =
|
XLDFLAGS = -stack:$(STACK) -subsystem:$(SUBSYSTEM)
|
||||||
!endif
|
!endif
|
||||||
!if !defined(RFLAGS)
|
!if !defined(RFLAGS)
|
||||||
RFLAGS = -r
|
RFLAGS = -r
|
||||||
|
@ -108,22 +125,20 @@ RFLAGS = -r
|
||||||
!if !defined(EXTLIBS)
|
!if !defined(EXTLIBS)
|
||||||
EXTLIBS =
|
EXTLIBS =
|
||||||
!endif
|
!endif
|
||||||
LIBS = coredll.lib winsock.lib $(EXTLIBS)
|
LIBS = coredll.lib ceshell.lib winsock.lib $(EXTLIBS)
|
||||||
MISSING = acosh.obj crypt.obj dup2.obj erf.obj hypot.obj \
|
MISSING = acosh.obj crypt.obj dup2.obj erf.obj hypot.obj \
|
||||||
isinf.obj isnan.obj strftime.obj win32.obj
|
isinf.obj isnan.obj strftime.obj win32.obj \
|
||||||
WINCEOBJ= assert.obj direct.obj errno.obj io_wce.obj process_wce.obj \
|
assert.obj direct.obj errno.obj io_wce.obj process_wce.obj \
|
||||||
signal_wce.obj stdio.obj stdlib.obj string_wce.obj \
|
signal_wce.obj stdio.obj stdlib.obj string_wce.obj \
|
||||||
time_wce.obj wince.obj winsock2.obj
|
time_wce.obj wince.obj winsock2.obj \
|
||||||
WINCESYSOBJ = stat.obj timeb.obj utime.obj
|
stat.obj timeb.obj utime.obj
|
||||||
|
|
||||||
ARFLAGS = -machine:$(MACHINE) -out:
|
ARFLAGS = -machine:$(MACHINE) -out:
|
||||||
CC = $(CC) -nologo
|
CC = $(CC) -nologo
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
LDSHARED = $(LD) -LD
|
LDSHARED = $(LD) -LD
|
||||||
XCFLAGS =
|
XCFLAGS = -DRUBY_EXPORT
|
||||||
LDFLAGS = -link -incremental:yes -pdb:none -MACHINE:$(MACHINE) -subsystem:$(SUBSYSTEM)
|
|
||||||
DLDFLAGS = $(LDFLAGS) -dll
|
DLDFLAGS = $(LDFLAGS) -dll
|
||||||
XLDFLAGS = -stack:$(STACK) -subsystem:$(SUBSYSTEM)
|
|
||||||
SOLIBS =
|
SOLIBS =
|
||||||
|
|
||||||
LIBRUBY_LDSHARED = $(LDSHARED)
|
LIBRUBY_LDSHARED = $(LDSHARED)
|
||||||
|
@ -131,10 +146,12 @@ LIBRUBY_DLDFLAGS = $(EXTLDFLAGS) -def:$(RUBYDEF)
|
||||||
|
|
||||||
EXEEXT = .exe
|
EXEEXT = .exe
|
||||||
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
|
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
|
||||||
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
|
|
||||||
RUBYDEF = $(RUBY_SO_NAME).def
|
RUBYDEF = $(RUBY_SO_NAME).def
|
||||||
MINIRUBY = .\minirubyce$(EXEEXT)
|
MINIRUBY = $(RUBY) -I$(MAKEDIR) -rfake
|
||||||
MINIRUBY_WIN = .\miniruby$(EXEEXT)
|
RUNRUBY = $(MINIRUBY) "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" --
|
||||||
|
!ifndef RUBY
|
||||||
|
RUBY = ruby
|
||||||
|
!endif
|
||||||
|
|
||||||
!if !defined(STACK)
|
!if !defined(STACK)
|
||||||
STACK = 0x200000,0x10000
|
STACK = 0x200000,0x10000
|
||||||
|
@ -148,64 +165,27 @@ LIBRUBY_SO = $(RUBY_SO_NAME).dll
|
||||||
LIBRUBY = $(RUBY_SO_NAME).lib
|
LIBRUBY = $(RUBY_SO_NAME).lib
|
||||||
LIBRUBYARG = $(LIBRUBY)
|
LIBRUBYARG = $(LIBRUBY)
|
||||||
|
|
||||||
|
PREP = fake.rb
|
||||||
|
|
||||||
|
!if !defined(EXTSTATIC)
|
||||||
|
EXTSTATIC =
|
||||||
|
!endif
|
||||||
|
|
||||||
|
OBJEXT = obj
|
||||||
|
|
||||||
EXTOBJS =
|
EXTOBJS =
|
||||||
|
DLDOBJS =
|
||||||
|
|
||||||
MAINOBJ = main.obj
|
WINMAINOBJ = wincemain.$(OBJEXT)
|
||||||
WINMAINOBJ = wincemain.obj
|
|
||||||
|
|
||||||
OBJS = array.obj \
|
|
||||||
bignum.obj \
|
|
||||||
class.obj \
|
|
||||||
compar.obj \
|
|
||||||
dir.obj \
|
|
||||||
dln.obj \
|
|
||||||
enum.obj \
|
|
||||||
error.obj \
|
|
||||||
eval.obj \
|
|
||||||
file.obj \
|
|
||||||
gc.obj \
|
|
||||||
hash.obj \
|
|
||||||
inits.obj \
|
|
||||||
io.obj \
|
|
||||||
marshal.obj \
|
|
||||||
math.obj \
|
|
||||||
numeric.obj \
|
|
||||||
object.obj \
|
|
||||||
pack.obj \
|
|
||||||
parse.obj \
|
|
||||||
prec.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) \
|
|
||||||
$(WINCEOBJ) \
|
|
||||||
$(WINCESYSOBJ)
|
|
||||||
|
|
||||||
all: ext minirubyce$(EXEEXT) rbconfig.rb \
|
|
||||||
$(LIBRUBY) $(MISCLIBS)
|
|
||||||
@$(MINIRUBY_WIN) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)"
|
|
||||||
|
|
||||||
ext:
|
|
||||||
@mkdir $@
|
|
||||||
|
|
||||||
|
all: $(srcdir)/wince/Makefile.sub $(srcdir)/common.mk
|
||||||
ruby: $(PROGRAM)
|
ruby: $(PROGRAM)
|
||||||
rubyw: $(WPROGRAM)
|
|
||||||
lib: $(LIBRUBY)
|
|
||||||
dll: $(LIBRUBY_SO)
|
|
||||||
|
|
||||||
config: config.h config.status
|
CONFIG_H = ./.config.h.time
|
||||||
|
|
||||||
|
config: config.status
|
||||||
|
|
||||||
|
config.status: $(CONFIG_H)
|
||||||
|
|
||||||
BANG = !
|
BANG = !
|
||||||
|
|
||||||
|
@ -213,8 +193,9 @@ BANG = !
|
||||||
!include config.h
|
!include config.h
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
config.h:
|
$(CONFIG_H): $(MKFILES) $(srcdir)/wince/Makefile.sub
|
||||||
@echo Creating <<$@
|
@echo Creating config.h
|
||||||
|
@$(srcdir:/=\)\win32\ifchange.bat config.h <<
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
#define HAVE_SYS_STAT_H 1
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
@ -286,7 +267,6 @@ config.h:
|
||||||
#define NEED_IO_SEEK_BETWEEN_RW 1
|
#define NEED_IO_SEEK_BETWEEN_RW 1
|
||||||
#define DEFAULT_KCODE KCODE_NONE
|
#define DEFAULT_KCODE KCODE_NONE
|
||||||
#define DLEXT ".so"
|
#define DLEXT ".so"
|
||||||
#define DLEXT2 ".dll"
|
|
||||||
#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR)"
|
#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR)"
|
||||||
#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
|
#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
|
||||||
#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)"
|
#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)"
|
||||||
|
@ -320,12 +300,15 @@ $(BANG)endif
|
||||||
#define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 )
|
#define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 )
|
||||||
#define isxdigit(c) ( ((c>=0&&c<=9)||(c>='A'&&c<='F')||(c>='a'&&c<='f'))?1:0 )
|
#define isxdigit(c) ( ((c>=0&&c<=9)||(c>='A'&&c<='F')||(c>='a'&&c<='f'))?1:0 )
|
||||||
#endif
|
#endif
|
||||||
<<KEEP
|
<<
|
||||||
|
@exit > $(@:/=\)
|
||||||
|
|
||||||
config.status: Makefile $(srcdir)/wince/Makefile.sub
|
config.status: $(MKFILES) $(srcdir)/wince/Makefile.sub $(srcdir)/common.mk
|
||||||
@echo Creating <<$@
|
@echo Creating $@
|
||||||
|
@exit <<$@
|
||||||
# Generated automatically by Makefile.sub.
|
# Generated automatically by Makefile.sub.
|
||||||
s,@SHELL@,$$(COMSPEC),;t t
|
s,@SHELL@,$$(COMSPEC),;t t
|
||||||
|
s,@PATH_SEPARATOR@,;,;t t
|
||||||
s,@CFLAGS@,$(CFLAGS),;t t
|
s,@CFLAGS@,$(CFLAGS),;t t
|
||||||
s,@CPPFLAGS@,$(CPPFLAGS),;t t
|
s,@CPPFLAGS@,$(CPPFLAGS),;t t
|
||||||
s,@CXXFLAGS@,$(CXXFLAGS),;t t
|
s,@CXXFLAGS@,$(CXXFLAGS),;t t
|
||||||
|
@ -333,7 +316,7 @@ s,@FFLAGS@,$(FFLAGS),;t t
|
||||||
s,@LDFLAGS@,,;t t
|
s,@LDFLAGS@,,;t t
|
||||||
s,@LIBS@,$(LIBS),;t t
|
s,@LIBS@,$(LIBS),;t t
|
||||||
s,@exec_prefix@,$${prefix},;t t
|
s,@exec_prefix@,$${prefix},;t t
|
||||||
s,@prefix@,,;t t
|
s,@prefix@,$(prefix),;t t
|
||||||
s,@program_transform_name@,s,,,,;t t
|
s,@program_transform_name@,s,,,,;t t
|
||||||
s,@bindir@,$${exec_prefix}/bin,;t t
|
s,@bindir@,$${exec_prefix}/bin,;t t
|
||||||
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
||||||
|
@ -374,21 +357,25 @@ s,@LIBOBJS@, acosh.obj crypt.obj erf.obj win32.obj isinf.obj isnan.obj,;t t
|
||||||
s,@ALLOCA@,$(ALLOCA),;t t
|
s,@ALLOCA@,$(ALLOCA),;t t
|
||||||
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
|
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
|
||||||
s,@EXEEXT@,.exe,;t t
|
s,@EXEEXT@,.exe,;t t
|
||||||
s,@OBJEXT@,obj,;t t
|
s,@OBJEXT@,$(OBJEXT),;t t
|
||||||
s,@XCFLAGS@,$(XCFLAGS),;t t
|
s,@XCFLAGS@,$(XCFLAGS),;t t
|
||||||
s,@XLDFLAGS@,$(XLDFLAGS),;t t
|
s,@XLDFLAGS@,$(XLDFLAGS),;t t
|
||||||
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE),;t t
|
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb,;t t
|
||||||
s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
|
s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
|
||||||
s,@STATIC@,$(STATIC),;t t
|
s,@STATIC@,$(STATIC),;t t
|
||||||
s,@CCDLFLAGS@,-DIMPORT,;t t
|
s,@CCDLFLAGS@,,;t t
|
||||||
s,@LDSHARED@,$(LDSHARED),;t t
|
s,@LDSHARED@,$(LDSHARED),;t t
|
||||||
s,@DLEXT@,so,;t t
|
s,@DLEXT@,so,;t t
|
||||||
s,@DLEXT2@,dll,;t t
|
|
||||||
s,@LIBEXT@,lib,;t t
|
s,@LIBEXT@,lib,;t t
|
||||||
s,@STRIP@,$(STRIP),;t t
|
s,@STRIP@,$(STRIP),;t t
|
||||||
s,@EXTSTATIC@,$(EXTSTATIC),;t t
|
s,@EXTSTATIC@,$(EXTSTATIC),;t t
|
||||||
s,@setup@,Setup,;t t
|
s,@setup@,Setup,;t t
|
||||||
s,@MINIRUBY@,$(MINIRUBY),;t t
|
s,@MINIRUBY@,$(MINIRUBY),;t t
|
||||||
|
s,@PREP@,miniruby$(EXEEXT),;t t
|
||||||
|
s,@RUNRUBY@,$(RUNRUBY),;t t
|
||||||
|
s,@EXTOUT@,$(EXTOUT),;t t
|
||||||
|
s,@ARCHFILE@,,;t t
|
||||||
|
s,@RDOCTARGET@,,;t t
|
||||||
s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t
|
s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t
|
||||||
s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t
|
s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t
|
||||||
s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
|
s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
|
||||||
|
@ -405,7 +392,7 @@ s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
|
||||||
s,@SOLIBS@,$(SOLIBS),;t t
|
s,@SOLIBS@,$(SOLIBS),;t t
|
||||||
s,@DLDLIBS@,$(DLDLIBS),;t t
|
s,@DLDLIBS@,$(DLDLIBS),;t t
|
||||||
s,@ENABLE_SHARED@,yes,;t t
|
s,@ENABLE_SHARED@,yes,;t t
|
||||||
s,@OUTFLAG@,-Fe,;t t
|
s,@OUTFLAG@,$(OUTFLAG),;t t
|
||||||
s,@CPPOUTFILE@,-P,;t t
|
s,@CPPOUTFILE@,-P,;t t
|
||||||
s,@LIBPATHFLAG@, -libpath:"%s",;t t
|
s,@LIBPATHFLAG@, -libpath:"%s",;t t
|
||||||
s,@RPATHFLAG@,,;t t
|
s,@RPATHFLAG@,,;t t
|
||||||
|
@ -413,7 +400,8 @@ s,@LIBARG@,%s.lib,;t t
|
||||||
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS),;t t
|
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS),;t t
|
||||||
s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t
|
s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t
|
||||||
s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
|
s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
|
||||||
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: .%s.%s:,;t t
|
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
|
||||||
|
s,@RULE_SUBST@,{.;$$(srcdir);$$(topdir);$$(hdrdir)}%s,;t t
|
||||||
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
|
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
|
||||||
s,@COMMON_LIBS@,coredll winsock,;t t
|
s,@COMMON_LIBS@,coredll winsock,;t t
|
||||||
s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
|
s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
|
||||||
|
@ -426,127 +414,75 @@ s,@configure_args@,--with-make-prog=nmake --enable-shared $(configure_args),;t t
|
||||||
s,@configure_input@,$$configure_input,;t t
|
s,@configure_input@,$$configure_input,;t t
|
||||||
s,@srcdir@,$(srcdir),;t t
|
s,@srcdir@,$(srcdir),;t t
|
||||||
s,@top_srcdir@,$(srcdir),;t t
|
s,@top_srcdir@,$(srcdir),;t t
|
||||||
s,@RUBY_PLATFORM@,$(RUBY_PLATFORM),;t t
|
|
||||||
<<KEEP
|
<<KEEP
|
||||||
|
|
||||||
minirubyce$(EXEEXT): $(OBJS) $(MAINOBJ) $(WINMAINOBJ) dmyext.obj
|
|
||||||
@echo. $(LIBS)
|
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) dmyext.obj $(OBJS) $(LIBS) -Fe$@ $(LDFLAGS)
|
|
||||||
|
|
||||||
$(PROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
|
$(PROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) $*.res \
|
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) $*.res \
|
||||||
-Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS)
|
-Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS)
|
||||||
|
|
||||||
$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
|
$(LIBRUBY_A): $(OBJS) $(DMYEXT)
|
||||||
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) $*.res \
|
$(AR) $(ARFLAGS)$@ $(OBJS) $(DMYEXT)
|
||||||
-Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS)
|
|
||||||
|
|
||||||
$(LIBRUBY_A): $(OBJS) dmyext.obj
|
|
||||||
$(AR) $(ARFLAGS)$@ $(OBJS) dmyext.obj
|
|
||||||
|
|
||||||
$(LIBRUBY): $(RUBYDEF)
|
$(LIBRUBY): $(RUBYDEF)
|
||||||
$(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
|
$(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
|
||||||
|
|
||||||
$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $*.res
|
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
|
||||||
@echo. $(EXTOBJS)
|
@echo. $(DLDOBJS)
|
||||||
$(LIBRUBY_LDSHARED) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $*.res $(LIBS) \
|
$(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
|
||||||
-Fe$@ $(LDFLAGS) $(LIBRUBY_DLDFLAGS)
|
$(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \
|
||||||
|
$(LIBRUBY_DLDFLAGS)
|
||||||
|
|
||||||
$(RUBYDEF): $(LIBRUBY_A) minirubyce$(EXEEXT)
|
$(RUBYDEF): $(LIBRUBY_A) $(PREP)
|
||||||
$(MINIRUBY_WIN) $(srcdir)/wince/mkexports.rb \
|
$(MINIRUBY) $(srcdir)/win32/mkexports.rb \
|
||||||
-output=$@ $(LIBRUBY_A) $(ARCH)
|
-output=$@ -arch=$(ARCH) $(LIBRUBY_A)
|
||||||
|
|
||||||
{$(srcdir)/wince}.def.lib:
|
{$(srcdir)/wince}.def.lib:
|
||||||
$(AR) $(ARFLAGS)$@ -def:$<
|
$(AR) $(ARFLAGS)$@ -def:$<
|
||||||
|
|
||||||
install: rbconfig.rb
|
clean-local::
|
||||||
$(MINIRUBY_WIN) $(srcdir)/instruby.rb \
|
@$(RM) ext\extinit.c ext\extinit.$(OBJEXT) ext\vc*.pdb
|
||||||
"--dest-dir=$(DESTDIR)" "--make=nmake"
|
@$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
|
||||||
$(MINIRUBY_WIN) $(srcdir)/ext/extmk.rb \
|
|
||||||
--make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
|
|
||||||
|
|
||||||
clean: clean-ext clean-local
|
distclean-local::
|
||||||
|
@$(RM) ext\config.cache $(RBCONFIG:/=\)
|
||||||
|
@$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF)
|
||||||
|
@$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
|
||||||
|
|
||||||
clean-local:
|
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: $(RBCONFIG)
|
||||||
@if exist $(LIBRUBY_A) del $(LIBRUBY_A)
|
@$(MINIRUBY) $(srcdir)/win32/resource.rb \
|
||||||
@if exist $(MAINOBJ) del $(MAINOBJ)
|
|
||||||
@if exist rbconfig.rb del rbconfig.rb
|
|
||||||
@if exist ext\extinit.c del ext\extinit.c
|
|
||||||
@if exist ext\extinit.obj del ext\extinit.obj
|
|
||||||
@if exist ext\vc*.pdb del ext\vc*.pdb
|
|
||||||
@if exist *.obj del *.obj
|
|
||||||
@if exist *.res del *.res
|
|
||||||
|
|
||||||
clean-ext:
|
|
||||||
@-$(MINIRUBY_WIN) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" clean
|
|
||||||
|
|
||||||
distclean: distclean-ext distclean-local
|
|
||||||
|
|
||||||
distclean-local: clean-local
|
|
||||||
@if exist Makefile del Makefile
|
|
||||||
@if exist config.h del config.h
|
|
||||||
@if exist ext\config.cache del ext\config.cache
|
|
||||||
@if exist config.cache del config.cache
|
|
||||||
@if exist config.log del config.log
|
|
||||||
@if exist config.status del config.status
|
|
||||||
@if exist *~ del *~
|
|
||||||
@if exist *.bak del *.bak
|
|
||||||
@if exist *.stackdump del *.stackdump
|
|
||||||
@if exist *.core del *.core
|
|
||||||
@if exist gmon.out del gmon.out
|
|
||||||
@if exist y.tab.c del y.tab.c
|
|
||||||
@if exist y.output del y.output
|
|
||||||
@if exist *.map del *.map
|
|
||||||
@if exist *.pdb del *.pdb
|
|
||||||
@if exist *.ilk del *.ilk
|
|
||||||
@if exist *.exp del *.exp
|
|
||||||
@if exist $(RUBYDEF) del $(RUBYDEF)
|
|
||||||
@if exist $(RUBY_INSTALL_NAME).rc del $(RUBY_INSTALL_NAME).rc
|
|
||||||
@if exist $(RUBYW_INSTALL_NAME).rc del $(RUBYW_INSTALL_NAME).rc
|
|
||||||
@if exist $(RUBY_SO_NAME).rc del $(RUBY_SO_NAME).rc
|
|
||||||
@if exist $(PROGRAM) del $(PROGRAM)
|
|
||||||
@if exist $(WPROGRAM) del $(WPROGRAM)
|
|
||||||
@if exist $(LIBRUBY_SO) del $(LIBRUBY_SO)
|
|
||||||
@if exist $(LIBRUBY) del $(LIBRUBY)
|
|
||||||
@if exist ext\nul if not exist ext\* rmdir ext
|
|
||||||
@if exist minirubyce$(EXEEXT) del minirubyce$(EXEEXT)
|
|
||||||
|
|
||||||
distclean-ext:
|
|
||||||
@-$(MINIRUBY_WIN) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" distclean
|
|
||||||
|
|
||||||
realclean: distclean
|
|
||||||
@if exist parse.c del parse.c
|
|
||||||
@if exist lex.c del lex.c
|
|
||||||
|
|
||||||
test: miniruby$(EXEEXT) rbconfig.rb $(PROGRAM) NUL
|
|
||||||
@miniruby$(EXEEXT) $(srcdir)/rubytest.rb
|
|
||||||
|
|
||||||
rbconfig.rb: miniruby$(EXEEXT) config.status
|
|
||||||
$(MINIRUBY_WIN) $(srcdir)/mkconfig.rb -srcdir=$(srcdir) \
|
|
||||||
-install_name=$(RUBY_INSTALL_NAME) \
|
|
||||||
-so_name=$(RUBY_SO_NAME) rbconfig.rb
|
|
||||||
$(MINIRUBY_WIN) $(srcdir)/wince/mkconfig_wce.rb rbconfig.rb
|
|
||||||
|
|
||||||
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
|
||||||
$(MINIRUBY_WIN) $(srcdir)/win32/resource.rb \
|
|
||||||
-ruby_name=$(RUBY_INSTALL_NAME) \
|
-ruby_name=$(RUBY_INSTALL_NAME) \
|
||||||
-rubyw_name=$(RUBYW_INSTALL_NAME) \
|
-rubyw_name=$(RUBYW_INSTALL_NAME) \
|
||||||
-so_name=$(RUBY_SO_NAME) \
|
-so_name=$(RUBY_SO_NAME) \
|
||||||
-wce_ver=$(SUBSYSVERSION) \
|
-wce_ver=$(SUBSYSVERSION) \
|
||||||
. $(icondirs) $(srcdir)/wince
|
. $(icondirs) $(srcdir)/wince
|
||||||
|
|
||||||
|
fake.rb: $(MKFILES)
|
||||||
|
@echo Creating <<$@
|
||||||
|
class Object
|
||||||
|
CROSS_COMPILING = RUBY_PLATFORM
|
||||||
|
remove_const :RUBY_PLATFORM
|
||||||
|
remove_const :RUBY_VERSION
|
||||||
|
RUBY_PLATFORM = "$(ARCH)"
|
||||||
|
RUBY_VERSION = "$(MAJOR).$(MINOR).$(TEENY)"
|
||||||
|
end
|
||||||
|
class File
|
||||||
|
remove_const :ALT_SEPARATOR
|
||||||
|
ALT_SEPARATOR = "\\"
|
||||||
|
end
|
||||||
|
<<KEEP
|
||||||
|
|
||||||
{$(srcdir)/missing}.c.obj:
|
{$(srcdir)/missing}.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
{$(srcdir)/win32}.c.obj:
|
{$(srcdir)/win32}.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
{$(srcdir)/wince}.c.obj:
|
{$(srcdir)/wince}.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
{$(srcdir)/wince/sys}.c.obj:
|
{$(srcdir)/wince/sys}.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
{$(srcdir)}.c.obj:
|
{$(srcdir)}.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
.c.obj:
|
.c.obj:
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -c -Tc$(<:\=/)
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||||
|
|
||||||
.rc.res:
|
.rc.res:
|
||||||
$(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
|
$(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
|
||||||
|
@ -556,164 +492,11 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
||||||
sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $@
|
sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $@
|
||||||
@del y.tab.c
|
@del y.tab.c
|
||||||
|
|
||||||
{$(srcdir)}parse.c: parse.y
|
!include $(srcdir)/common.mk
|
||||||
|
|
||||||
|
$(OBJS): {$(srcdir)}win32/win32.h
|
||||||
|
|
||||||
|
dir.$(OBJEXT): {$(srcdir)}win32/dir.h
|
||||||
|
|
||||||
ext/extinit.obj: ext/extinit.c $(SETUP)
|
ext/extinit.obj: ext/extinit.c $(SETUP)
|
||||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fo$@ -c ext/extinit.c
|
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fo$@ -c ext/extinit.c
|
||||||
|
|
||||||
acosh.obj: {$(srcdir)}missing/acosh.c
|
|
||||||
alloca.obj: {$(srcdir)}missing/alloca.c
|
|
||||||
crypt.obj: {$(srcdir)}missing/crypt.c
|
|
||||||
dup2.obj: {$(srcdir)}missing/dup2.c
|
|
||||||
erf.obj: {$(srcdir)}missing/erf.c
|
|
||||||
finite.obj: {$(srcdir)}missing/finite.c
|
|
||||||
flock.obj: {$(srcdir)}missing/flock.c
|
|
||||||
isinf.obj: {$(srcdir)}missing/isinf.c
|
|
||||||
isnan.obj: {$(srcdir)}missing/isnan.c
|
|
||||||
memcmp.obj: {$(srcdir)}missing/memcmp.c
|
|
||||||
memmove.obj: {$(srcdir)}missing/memmove.c
|
|
||||||
mkdir.obj: {$(srcdir)}missing/mkdir.c
|
|
||||||
vsnprintf.obj: {$(srcdir)}missing/vsnprintf.c
|
|
||||||
strcasecmp.obj: {$(srcdir)}missing/strcasecmp.c
|
|
||||||
strncasecmp.obj: {$(srcdir)}missing/strncasecmp.c
|
|
||||||
strchr.obj: {$(srcdir)}missing/strchr.c
|
|
||||||
strdup.obj: {$(srcdir)}missing/strdup.c
|
|
||||||
strerror.obj: {$(srcdir)}missing/strerror.c
|
|
||||||
strftime.obj: {$(srcdir)}missing/strftime.c
|
|
||||||
strstr.obj: {$(srcdir)}missing/strstr.c
|
|
||||||
strtod.obj: {$(srcdir)}missing/strtod.c
|
|
||||||
strtol.obj: {$(srcdir)}missing/strtol.c
|
|
||||||
strtoul.obj: {$(srcdir)}missing/strtoul.c
|
|
||||||
nt.obj: {$(srcdir)}missing/nt.c
|
|
||||||
x68.obj: {$(srcdir)}missing/x68.c
|
|
||||||
os2.obj: {$(srcdir)}missing/os2.c
|
|
||||||
dl_os2.obj: {$(srcdir)}missing/dl_os2.c
|
|
||||||
|
|
||||||
# when I use -I., there is confliction at "OpenFile"
|
|
||||||
# so, set . into environment varible "include"
|
|
||||||
win32.obj: {$(srcdir)}win32/win32.c
|
|
||||||
|
|
||||||
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
|
||||||
.NOEXPORT:
|
|
||||||
###
|
|
||||||
array.obj: {$(srcdir)}array.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
|
|
||||||
bignum.obj: {$(srcdir)}bignum.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
class.obj: {$(srcdir)}class.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}node.h {$(srcdir)}st.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
compar.obj: {$(srcdir)}compar.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
dir.obj: {$(srcdir)}dir.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
dln.obj: {$(srcdir)}dln.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}dln.h {$(srcdir)}/win32/win32.h
|
|
||||||
dmyext.obj: {$(srcdir)}dmyext.c
|
|
||||||
enum.obj: {$(srcdir)}enum.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}node.h {$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
error.obj: {$(srcdir)}error.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}env.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
|
|
||||||
eval.obj: {$(srcdir)}eval.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}node.h {$(srcdir)}env.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}dln.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
file.obj: {$(srcdir)}file.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubyio.h {$(srcdir)}rubysig.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}dln.h {$(srcdir)}/win32/win32.h
|
|
||||||
gc.obj: {$(srcdir)}gc.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}node.h \
|
|
||||||
{$(srcdir)}env.h {$(srcdir)}re.h {$(srcdir)}regex.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
hash.obj: {$(srcdir)}hash.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}st.h {$(srcdir)}util.h {$(srcdir)}rubysig.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
inits.obj: {$(srcdir)}inits.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
io.obj: {$(srcdir)}io.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubyio.h {$(srcdir)}rubysig.h {$(srcdir)}env.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
main.obj: {$(srcdir)}main.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
marshal.obj: {$(srcdir)}marshal.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubyio.h {$(srcdir)}st.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
math.obj: {$(srcdir)}math.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
numeric.obj: {$(srcdir)}numeric.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
object.obj: {$(srcdir)}object.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}st.h {$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
pack.obj: {$(srcdir)}pack.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
parse.obj: {$(srcdir)}parse.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}env.h {$(srcdir)}node.h {$(srcdir)}st.h {$(srcdir)}regex.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}lex.c {$(srcdir)}/win32/win32.h
|
|
||||||
prec.obj: {$(srcdir)}prec.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
process.obj: {$(srcdir)}process.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
|
|
||||||
random.obj: {$(srcdir)}random.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
range.obj: {$(srcdir)}range.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
re.obj: {$(srcdir)}re.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}re.h {$(srcdir)}regex.h {$(srcdir)}/win32/win32.h
|
|
||||||
regex.obj: {$(srcdir)}regex.c config.h {$(srcdir)}regex.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
ruby.obj: {$(srcdir)}ruby.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}dln.h {$(srcdir)}node.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
signal.obj: {$(srcdir)}signal.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}rubysig.h {$(srcdir)}/win32/win32.h
|
|
||||||
sprintf.obj: {$(srcdir)}sprintf.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
st.obj: {$(srcdir)}st.c config.h {$(srcdir)}st.h
|
|
||||||
string.obj: {$(srcdir)}string.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}re.h {$(srcdir)}regex.h {$(srcdir)}/win32/win32.h
|
|
||||||
struct.obj: {$(srcdir)}struct.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
time.obj: {$(srcdir)}time.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
util.obj: {$(srcdir)}util.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}util.h {$(srcdir)}/win32/win32.h
|
|
||||||
variable.obj: {$(srcdir)}variable.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}env.h {$(srcdir)}node.h {$(srcdir)}st.h {$(srcdir)}util.h \
|
|
||||||
{$(srcdir)}/win32/win32.h
|
|
||||||
version.obj: {$(srcdir)}version.c {$(srcdir)}ruby.h config.h \
|
|
||||||
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
|
|
||||||
{$(srcdir)}version.h {$(srcdir)}/win32/win32.h
|
|
||||||
|
|
|
@ -1,59 +1,96 @@
|
||||||
@echo off
|
@echo off
|
||||||
::: Don't set environment variable in batch file other than autoexec.bat
|
::: Don't set environment variable in batch file other than autoexec.bat
|
||||||
::: to avoid "Out of environment space" problem on Windows 95/98.
|
::: to avoid "Out of environment space" problem on Windows 95/98.
|
||||||
::: set TMPMAKE=~tmp~.mak
|
::: set TMPMAKE=~tmp~.mak
|
||||||
|
|
||||||
echo> ~tmp~.mak ####
|
echo> ~tmp~.mak ####
|
||||||
echo>> ~tmp~.mak conf = %0
|
echo>> ~tmp~.mak conf = %0
|
||||||
echo>> ~tmp~.mak $(conf:\=/): nul
|
echo>> ~tmp~.mak $(conf:\=/): nul
|
||||||
echo>> ~tmp~.mak @del ~tmp~.mak
|
echo>> ~tmp~.mak @del ~tmp~.mak
|
||||||
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
|
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
|
||||||
:loop
|
:loop
|
||||||
if "%1" == "" goto :end
|
if "%1" == "" goto :end
|
||||||
if "%1" == "--srcdir" goto :srcdir
|
if "%1" == "--prefix" goto :prefix
|
||||||
if "%1" == "srcdir" goto :srcdir
|
if "%1" == "--srcdir" goto :srcdir
|
||||||
if "%1" == "--target" goto :target
|
if "%1" == "srcdir" goto :srcdir
|
||||||
if "%1" == "target" goto :target
|
if "%1" == "--target" goto :target
|
||||||
if "%1" == "--program-suffix" goto :suffix
|
if "%1" == "target" goto :target
|
||||||
if "%1" == "--program-name" goto :progname
|
if "%1" == "--with-static-linked-ext" goto :extstatic
|
||||||
if "%1" == "CC" goto :define
|
if "%1" == "--program-suffix" goto :suffix
|
||||||
if "%1" == "EMBEDDED_TOOLS_DIR" goto :define
|
if "%1" == "--program-name" goto :progname
|
||||||
if "%1" == "CE_TOOLS_DIR" goto :define
|
if "%1" == "--enable-install-doc" goto :enable-rdoc
|
||||||
if "%1" == "EMBEDDED_TOOLS4_DIR" goto :define
|
if "%1" == "--disable-install-doc" goto :disable-rdoc
|
||||||
if "%1" == "CE_TOOLS4_DIR" goto :define
|
if "%1" == "-h" goto :help
|
||||||
echo>> ~tmp~.mak "%1" \
|
if "%1" == "--help" goto :help
|
||||||
shift
|
if "%1" == "CC" goto :define
|
||||||
goto :loop
|
if "%1" == "EMBEDDED_TOOLS_DIR" goto :define
|
||||||
:srcdir
|
if "%1" == "CE_TOOLS_DIR" goto :define
|
||||||
echo>> ~tmp~.mak "srcdir=%2" \
|
if "%1" == "EMBEDDED_TOOLS4_DIR" goto :define
|
||||||
shift
|
if "%1" == "CE_TOOLS4_DIR" goto :define
|
||||||
shift
|
echo>> ~tmp~.mak "%1" \
|
||||||
goto :loop
|
shift
|
||||||
:suffix
|
goto :loop
|
||||||
echo>> ~tmp~.mak "RUBY_SUFFIX=%2" \
|
:srcdir
|
||||||
shift
|
echo>> ~tmp~.mak "srcdir=%2" \
|
||||||
shift
|
shift
|
||||||
goto :loop
|
shift
|
||||||
:installname
|
goto :loop
|
||||||
echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%2" \
|
:prefix
|
||||||
shift
|
echo>> ~tmp~.mak "prefix=%2" \
|
||||||
shift
|
shift
|
||||||
goto :loop
|
shift
|
||||||
:soname
|
goto :loop
|
||||||
echo>> ~tmp~.mak "RUBY_SO_NAME=%2" \
|
:suffix
|
||||||
shift
|
echo>> ~tmp~.mak "RUBY_SUFFIX=%2" \
|
||||||
shift
|
shift
|
||||||
goto :loop
|
shift
|
||||||
:define
|
goto :loop
|
||||||
echo>> ~tmp~.mak "%1=%2" \
|
:installname
|
||||||
shift
|
echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%2" \
|
||||||
shift
|
shift
|
||||||
goto :loop
|
shift
|
||||||
:target
|
goto :loop
|
||||||
echo>> ~tmp~.mak "%2" \
|
:soname
|
||||||
shift
|
echo>> ~tmp~.mak "RUBY_SO_NAME=%2" \
|
||||||
shift
|
shift
|
||||||
goto :loop
|
shift
|
||||||
:end
|
goto :loop
|
||||||
echo>> ~tmp~.mak WIN32DIR=$(@D)
|
:define
|
||||||
nmake -alf ~tmp~.mak
|
echo>> ~tmp~.mak "%1=%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:target
|
||||||
|
echo>> ~tmp~.mak "%2" \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:extstatic
|
||||||
|
echo>> ~tmp~.mak "EXTSTATIC=static" \
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:enable-rdoc
|
||||||
|
echo>> ~tmp~.mak "RDOCTARGET=install-doc" \
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:disable-rdoc
|
||||||
|
echo>> ~tmp~.mak "RDOCTARGET=install-nodoc" \
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
|
:help
|
||||||
|
echo Configuration:
|
||||||
|
echo --help display this help
|
||||||
|
echo --srcdir=DIR find the sources in DIR [configure dir or `..']
|
||||||
|
echo Installation directories:
|
||||||
|
echo --prefix=PREFIX install files in PREFIX [/usr]
|
||||||
|
echo System types:
|
||||||
|
echo --target=TARGET configure for TARGET [i386-mswin32]
|
||||||
|
echo Optional Package:
|
||||||
|
echo --with-static-linked-ext link external modules statically
|
||||||
|
echo --enable-install-doc install rdoc indexes during install
|
||||||
|
del ~tmp~.mak
|
||||||
|
goto :exit
|
||||||
|
:end
|
||||||
|
echo>> ~tmp~.mak WIN32DIR=$(@D)
|
||||||
|
nmake -alf ~tmp~.mak
|
||||||
|
:exit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue