summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-21 14:17:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-21 14:17:44 +0000
commitb9ecdfaa3d8bb6c318c2299f020a0583bcdfe88c (patch)
tree256f7ef575c3c57ea4cde2e539f7c38d21bdb9ea /Makefile.in
parent8209f4fb71cb1ec86f9e24b3aa7a2e54b3d215bc (diff)
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries. * configure.in (LIBPATHFLAG): switch template to specify library path. * configure.in (LINK_SO): command to link shared objects. * configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent files. * configure.in (EXPORT_PREFIX): prefix to exported symbols on Windows. * configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS): libraries, macros and headers used in common. * configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode excutable name. * Makefile.in (CFLAGS): append XCFLAGS. * Makefile.in (PREP): miscellaneous system dependent files. * Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb. * Makefile.in (fake.rb): CROSS_COMPILING keeps building platform. * Makefile.in (MAKEFILES): depend on *.in and config.status. * Makefile.in (parse.c): replace "y.tab.c" with actual name for byacc. * ext/extmk.rb, lib/mkmf.rb: integrated. * ext/extmk.rb: propagate MFLAGS. * ext/extmk.rb (extmake): make dummy Makefile to clean even if no Makefile is made. * lib/mkmf.rb (older): accept multiple file names and Time objects. * lib/mkmf.rb (xsystem): split and qoute. * lib/mkmf.rb (cpp_include): make include directives. * lib/mkmf.rb (try_func): try wheather specified function is available. * lib/mkmf.rb (install_files): default to site-install. * lib/mkmf.rb (checking_for): added. * lib/mkmf.rb (find_executable0): just find executable file with no message. * lib/mkmf.rb (create_header): output header file is variable. * lib/mkmf.rb (create_makefile): separate sections. * lib/mkmf.rb (init_mkmf): initialize global variables. * win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added. * bcc32/Makefile.sub (ARCH): fixed to i386. * win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not link EXTOBJS. * ext/dl/extconf.rb: use try_cpp to cross compile. * ext/dl/extconf.rb: not modify files in source directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in75
1 files changed, 57 insertions, 18 deletions
diff --git a/Makefile.in b/Makefile.in
index fec6198..ebfed68 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,10 +12,20 @@ AUTOCONF = autoconf
@SET_MAKE@
prefix = @prefix@
-CFLAGS = @CFLAGS@
+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@
-XLDFLAGS = @XLDFLAGS@
+EXTLDFLAGS =
+XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
EXTLIBS =
LIBS = @LIBS@ $(EXTLIBS)
MISSING = @LIBOBJS@ @ALLOCA@
@@ -28,6 +38,8 @@ 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. ####
@@ -41,6 +53,9 @@ LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
LIBRUBY = @LIBRUBY@
LIBRUBYARG = @LIBRUBYARG@
+PREP = @PREP@ @ARCHFILE@
+SETUP =
+
EXTOBJS =
MAINOBJ = main.@OBJEXT@
@@ -83,14 +98,14 @@ OBJS = array.@OBJEXT@ \
version.@OBJEXT@ \
$(MISSING)
-all: miniruby$(EXEEXT) @PREP@ rbconfig.rb $(LIBRUBY)
- @@MINIRUBY@ $(srcdir)/ext/extmk.rb @EXTSTATIC@
+all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY)
+ @$(MINIRUBY) $(srcdir)/ext/extmk.rb @EXTSTATIC@ $(MAKE) $(MFLAGS)$(MAKEFLAGS)
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) dmyext.@OBJEXT@
@rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.@OBJEXT@ $(LIBRUBY_A) $(LIBS) -o $@
-$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS)
+$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS) $(SETUP) miniruby$(EXEEXT)
@rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
@@ -98,16 +113,22 @@ $(LIBRUBY_A): $(OBJS) dmyext.@OBJEXT@
@AR@ rcu $@ $(OBJS) dmyext.@OBJEXT@
@-@RANLIB@ $@ 2> /dev/null || true
-$(LIBRUBY_SO): $(OBJS) dmyext.@OBJEXT@ miniruby$(EXEEXT)
+$(LIBRUBY_SO): $(OBJS) dmyext.@OBJEXT@ miniruby$(EXEEXT) $(PREP)
$(LDSHARED) $(DLDFLAGS) $(OBJS) dmyext.@OBJEXT@ $(SOLIBS) -o $@
- @-@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}' \
$(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 $(DESTDIR)
+ $(MINIRUBY) $(srcdir)/instruby.rb --make=$(MAKE) $(MFLAGS)$(MAKEFLAGS) $(DESTDIR)
+ $(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) $(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR) install
-clean-ext:; @-@MINIRUBY@ $(srcdir)/ext/extmk.rb clean 2> /dev/null || true
+clean-ext:
+ @-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) $(MFLAGS)$(MAKEFLAGS) clean 2> /dev/null || true
clean-local:
@rm -f $(OBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY_ALIASES)
@@ -117,10 +138,10 @@ clean-local:
clean: clean-ext clean-local
distclean-ext:
- @-@MINIRUBY@ $(srcdir)/ext/extmk.rb distclean 2> /dev/null || true
+ @-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) $(MFLAGS)$(MAKEFLAGS) distclean 2> /dev/null || true
distclean-local: clean-local
- @rm -f Makefile config.h rbconfig.rb
+ @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
@@ -130,23 +151,37 @@ realclean: distclean
@rm -f parse.c
@rm -f lex.c
-test: miniruby$(EXEEXT) rbconfig.rb
+test: miniruby$(EXEEXT) rbconfig.rb $(PROGRAM)
@./miniruby$(EXEEXT) $(srcdir)/rubytest.rb
-rbconfig.rb: miniruby$(EXEEXT) $(srcdir)/mkconfig.rb config.status
- @@MINIRUBY@ $(srcdir)/mkconfig.rb rbconfig.rb
+rbconfig.rb: miniruby$(EXEEXT) $(srcdir)/mkconfig.rb config.status $(PREP)
+ @$(MINIRUBY) $(srcdir)/mkconfig.rb rbconfig.rb
-fake.rb: miniruby$(EXEEXT)
+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@"; \
- CROSS_COMPILING = true; \
end \
' > $@
+Makefile: $(srcdir)/Makefile.in
+
+.PRECIOUS: @MAKEFILES@
+
+@MAKEFILES@: config.status
+ MAKE=$(MAKE) $(SHELL) ./config.status
+ @{ : $(MAKE); \
+ echo "all:; -@rm -f conftest.mk"; \
+ echo "conftest.mk: .force; @echo AUTO_REMAKE"; \
+ echo ".force:"; \
+ } > conftest.mk
+ @$(MAKE) -f conftest.mk | grep '^AUTO_REMAKE$$' >/dev/null 2>&1 || \
+ { echo "Makefile updated, restart."; exit 1; }
+
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
@@ -159,9 +194,13 @@ $(srcdir)/configure: $(srcdir)/configure.in
lex.c: keywords
gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $(srcdir)/keywords > lex.c
-parse.c: parse.y
+.y.c:
$(YACC) $<
- mv -f y.tab.c parse.c
+ 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