1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/Makefile.in
matz 6212cfb9c5 * gc.c (Init_stack): stack region is far smaller than usual if
pthread is used.

* marshal.c (w_extended): singleton methods should not be checked
  when dumping via marshal_dump() or _dump(). [ruby-talk:85909]

* file.c (getcwdofdrv): avoid using getcwd() directly, use
  my_getcwd() instead.

* merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine
  <sunshine@sunshineco.com>.  [ruby-core:01596]

* marshal.c (w_object): LINK check earlier than anything else,
  i.e. do not dump TYPE_IVAR for already dumped objects.
  (ruby-bugs PR#1220)

* eval.c (rb_eval): call "inherited" only when a new class is
  generated; not on reopening.

* eval.c (eval): prepend error position in evaluating string to

* configure.in: revived NextStep, OpenStep, and Rhapsody ports which
  had become unbuildable; enhanced --enable-fat-binary option so that
  it accepts a list of desired architectures (rather than assuming a
  fixed list), or defaults to a platform-appropriate list if user does
  not provide an explicit list; made the default list of architectures
  for MAB (fat binary) more comprehensive; now uses -fno-common even
  when building the interpreter (in addition to using it for
  extensions), thus allowing the interpreter to be embedded into a
  plugin module of an external project (in addition to allowing
  embedding directly into an application); added checks for
  <netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now
  ensures that -I/usr/local/include is employed when extensions'
  extconf.rb scripts invoke have_header() since extension checks on
  NextStep and OpenStep will fail without it if the desired resource
  resides in the /usr/local tree; fixed formatting of --help message.

* Makefile.in: $(LIBRUBY_A) rule now deletes the archive before
  invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives
  (see configure's --enable-fat-binary option); added rule for new
  missing/getcwd.c.

* defines.h: fixed endian handling during MAB build (see configure's
  --enable-fat-binary option) to ensure that all portions of the
  project see the correct WORDS_BIGENDIAN value (some extension modules
  were getting the wrong endian setting); added missing constants
  GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep
  and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H
  define in NeXT section.

* dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on
  NextStep since, on some installations, this value always resolves
  uselessly to zero.

* dln.c: added error reporting to NextStep extension loader since the
  previous behavior of failing silently was not useful; now ensures
  that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined
  for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice
  on Rhapsody since this header lacks multiple-include protection,
  which resulted in "redefinition" compilation errors.

* main.c: also create hard reference to objc_msgSend() on NeXT
  platforms (in addition to Apple platforms).

* lib/mkmf.rb: now exports XCFLAGS from configure script to extension
  makefiles so that extensions can be built MAB (see configure's
  --enable-fat-binary option); also utilize XCFLAGS in cc_command()
  (but not cpp_command() because MAB flags are incompatible with
  direct invocation of `cpp').

* ext/curses/extconf.rb: now additionally checks for presence of these
  curses functions which are not present on NextStep or Openstep:
  bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(),
  setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(),
  wscrl(), wsetscrreg()

* ext/curses/curses.c: added appropriate #ifdef's for additional set of
  curses functions now checked by extconf.rb; fixed curses_bkgd() and
  window_bkgd() to correctly return boolean result rather than numeric
  result; fixed window_getbkgd() to correctly signal an error by
  returning nil rather than -1.

* ext/etc/etc.c: setup_passwd() and setup_group() now check for null
  pointers before invoking rb_tainted_str_new2() upon fields extracted
  from `struct passwd' and `struct group' since null pointers in some
  fields are common on NextStep/OpenStep (especially so for the
  `pw_comment' field) and rb_tainted_str_new2() throws an exception
  when it receives a null pointer.

* ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup().

* ext/socket/getaddrinfo.c: cast first argument of getservbyname(),
  gethostbyaddr(), and gethostbyname() from (const char*) to non-const
  (char*) for older platforms such as NextStep and OpenStep.

* ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup(); include
  <netinet/in_systm.h> if present for NextStep and OpenStep; cast first
  argument of gethostbyaddr() and getservbyname() from (const char*) to
  non-const (char*) for older platforms.

* ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22 04:00:03 +00:00

376 lines
12 KiB
Makefile

SHELL = /bin/sh
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = $(srcdir):$(srcdir)/missing
CC = @CC@
YACC = @YACC@
PURIFY =
AUTOCONF = autoconf
@SET_MAKE@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libdir = @libdir@
libexecdir = @libexecdir@
arch = @arch@
sitearch = @sitearch@
sitedir = @sitedir@
CFLAGS = @CFLAGS@ @XCFLAGS@
CPPFLAGS = -I. -I$(srcdir)
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLDFLAGS =
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
EXTLIBS =
LIBS = @LIBS@ $(EXTLIBS)
MISSING = @LIBOBJS@ @ALLOCA@
LDSHARED = @LIBRUBY_LDSHARED@
DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(EXTLDFLAGS)
SOLIBS = @SOLIBS@
MAINLIBS = @MAINLIBS@
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
RUBY_SO_NAME=@RUBY_SO_NAME@
EXEEXT = @EXEEXT@
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
RUBY = $(RUBY_INSTALL_NAME)
MINIRUBY = @MINIRUBY@
#### End of system configuration section. ####
MAJOR= @MAJOR@
MINOR= @MINOR@
TEENY= @TEENY@
LIBRUBY_A = @LIBRUBY_A@
LIBRUBY_SO = @LIBRUBY_SO@
LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
LIBRUBY = @LIBRUBY@
LIBRUBYARG = @LIBRUBYARG@
LIBRUBYARG_STATIC = @LIBRUBYARG_STATIC@
LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
PREP = @PREP@ @ARCHFILE@
SETUP =
EXTSTATIC = @EXTSTATIC@
EXTOBJS =
DLDOBJS = $(DMYEXT)
DMYEXT = dmyext.@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@
SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
--make="$(MAKE)" \
--mflags="$(MFLAGS)" \
--make-flags="$(MAKEFLAGS)"
all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY)
@$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic="$(EXTSTATIC)" $(SCRIPT_ARGS)
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(DMYEXT)
@rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(DMYEXT) $(LIBRUBY_A) $(LIBS) -o $@
$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS) $(SETUP) miniruby$(EXEEXT)
@rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
# 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
# supported.
$(LIBRUBY_A): $(OBJS) $(DMYEXT)
@rm -f $@
@AR@ rcu $@ $(OBJS) $(DMYEXT)
@-@RANLIB@ $@ 2> /dev/null || true
$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) miniruby$(EXEEXT) $(PREP)
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) -o $@
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
ruby.imp: $(LIBRUBY_A)
@@NM@ -Pgp $(LIBRUBY_A) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
# $(MINIRUBY) $< $@
install: 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
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 ' \
class Object; \
CROSS_COMPILING = RUBY_PLATFORM; \
remove_const :RUBY_PLATFORM; \
remove_const :RUBY_VERSION; \
RUBY_PLATFORM = "@arch@"; \
RUBY_VERSION = "@MAJOR@.@MINOR@.@TEENY@"; \
end; \
if RUBY_PLATFORM =~ /mswin|bccwin|mingw/; \
class File; \
remove_const :ALT_SEPARATOR; \
ALT_SEPARATOR = "\\"; \
end; \
end; \
' > $@
Makefile: $(srcdir)/Makefile.in
.PRECIOUS: @MAKEFILES@
.PHONY: test
PHONY:
@MAKEFILES@: config.status
MAKE=$(MAKE) $(SHELL) ./config.status
@{ \
echo "all:; -@rm -f conftest.mk"; \
echo "conftest.mk: .force; @echo AUTO_REMAKE"; \
echo ".force:"; \
} > conftest.mk || exit 1; \
$(MAKE) -f conftest.mk | grep '^AUTO_REMAKE$$' >/dev/null 2>&1 || \
{ echo "Makefile updated, restart."; exit 1; }
config.status: $(srcdir)/configure
MINIRUBY="$(MINIRUBY)" $(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in
cd $(srcdir) && $(AUTOCONF)
.c.@OBJEXT@:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
lex.c: keywords
if test "$(srcdir)" = "."; then \
gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $> > $@; \
else \
cp $(srcdir)/lex.c .; \
fi
.y.c:
$(YACC) $<
sed '/^#/s|y\.tab\.c|$@|' y.tab.c > $@
rm -f y.tab.c
ext/extinit.@OBJEXT@: ext/extinit.c $(SETUP)
$(CC) $(CFLAGS) $(CPPFLAGS) @OUTFLAG@$@ -c ext/extinit.c
acosh.@OBJEXT@: $(srcdir)/missing/acosh.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/acosh.c
alloca.@OBJEXT@: $(srcdir)/missing/alloca.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/alloca.c
crypt.@OBJEXT@: $(srcdir)/missing/crypt.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/crypt.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 version.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 version.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