From ccf67667b8e07471a3463394574944f78c1adf7b Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 25 Jan 2010 08:36:14 +0000 Subject: [PATCH] * version.c (RUBY_LIB, RUBY_*_LIB): moved from configures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ bcc32/Makefile.sub | 13 +++++-------- configure.in | 6 ------ include/ruby/ruby.h | 2 +- include/ruby/st.h | 2 +- symbian/setup | 7 +------ version.c | 24 ++++++++++++++++++++++++ win32/Makefile.sub | 8 -------- 8 files changed, 36 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2641a7437f..143c490974 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Jan 25 17:36:11 2010 Nobuyoshi Nakada + + * version.c (RUBY_LIB, RUBY_*_LIB): moved from configures. + Mon Jan 25 12:11:45 2010 Nobuyoshi Nakada * signal.c (USE_SIGALTSTACK): only when SA_SIGINFO also is diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index 834e8a5870..130b0f243d 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -196,6 +196,10 @@ ASMEXT = asm INSTALLED_LIST= .installed.list +MKMAIN_CMD = mkmain.bat + +SRC_FILE = $(<:\=/) + WINMAINOBJ = winmain.$(OBJEXT) ARCHMINIOBJS = dmydln.$(OBJEXT) @@ -353,15 +357,8 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub \#define DEFAULT_KCODE KCODE_NONE \#define LOAD_RELATIVE 1 \#define DLEXT ".so" -\#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR).$(TEENY)" -\#define RUBY_SITE_LIB "/lib/ruby/site_ruby" -\#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR).$(TEENY)" -\#define RUBY_VENDOR_LIB "/lib/ruby/vendor_ruby" -\#define RUBY_VENDOR_LIB2 "/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR).$(TEENY)" +\#define RUBY_LIB_PREFIX "/lib/ruby" \#define RUBY_PLATFORM "$(ARCH)-$(OS)" -\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)" -\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)" -\#define RUBY_VENDOR_ARCHLIB "/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)" | @exit > $(@:/=\) diff --git a/configure.in b/configure.in index 8d74e74a7a..5f10f2a6ad 100644 --- a/configure.in +++ b/configure.in @@ -2389,7 +2389,6 @@ else fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -RUBY_LIB_PATH='RUBY_LIB_PREFIX"/"RUBY_LIB_VERSION' AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' @@ -2397,7 +2396,6 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) -RUBY_SITE_LIB_PATH2='RUBY_SITE_LIB"/"RUBY_LIB_VERSION' AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' @@ -2405,7 +2403,6 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" ]) -RUBY_VENDOR_LIB_PATH2='RUBY_VENDOR_LIB"/"RUBY_LIB_VERSION' if test ${RUBY_LIB_VERSION_STYLE+set}; then AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE) @@ -2413,11 +2410,8 @@ else AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION]) fi AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, "${RUBY_LIB_PREFIX}") -AC_DEFINE_UNQUOTED(RUBY_LIB, ${RUBY_LIB_PATH}) AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH}) -AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, ${RUBY_SITE_LIB_PATH2}) AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH}) -AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, ${RUBY_VENDOR_LIB_PATH2}) AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 5318772b35..5d87c0dbba 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -21,7 +21,7 @@ extern "C" { #endif #endif -#ifndef RUBY_LIB +#ifndef RUBY_LIB_PREFIX #include "ruby/config.h" #ifdef RUBY_EXTCONF_H #include RUBY_EXTCONF_H diff --git a/include/ruby/st.h b/include/ruby/st.h index d60ccd9a9a..27e47b816c 100644 --- a/include/ruby/st.h +++ b/include/ruby/st.h @@ -12,7 +12,7 @@ extern "C" { #endif #endif -#ifndef RUBY_LIB +#ifndef RUBY_LIB_PREFIX #include "ruby/config.h" #include "ruby/defines.h" #ifdef RUBY_EXTCONF_H diff --git a/symbian/setup b/symbian/setup index cb9d4eae91..d39bf6e4e7 100644 --- a/symbian/setup +++ b/symbian/setup @@ -170,15 +170,10 @@ define config_h @echo>>$(1) #define DLEXT ".dll" @echo>>$(1) #define EXECUTABLE_EXTS ".exe",".com",".cmd",".bat" @echo>>$(1) #define DLN_NEEDS_ALT_SEPARATOR 1 -@echo>>$(1) #define RUBY_LIB "C:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)" +@echo>>$(1) #define RUBY_LIB_PREFIX "C:/Data/Ruby/lib" @echo>>$(1) #define RUBY_SITE_LIB "E:/Data/Ruby/lib" -@echo>>$(1) #define RUBY_SITE_LIB2 "E:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)" @echo>>$(1) #define RUBY_VENDOR_LIB "C:/Data/Ruby/lib" -@echo>>$(1) #define RUBY_VENDOR_LIB2 "C:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)" @echo>>$(1) #define RUBY_PLATFORM "$(arch)" -@echo>>$(1) #define RUBY_ARCHLIB "C:/Data/Ruby/$(MAJOR).$(MINOR).$(TEENY)/$(arch)" -@echo>>$(1) #define RUBY_SITE_ARCHLIB "E:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)/$(arch)" -@echo>>$(1) #define RUBY_VENDOR_ARCHLIB "C:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)/$(arch)" endef define pre_build_mk diff --git a/version.c b/version.c index 40fecc7eae..455c037b34 100644 --- a/version.c +++ b/version.c @@ -22,6 +22,30 @@ #ifndef RUBY_SITEARCH #define RUBY_SITEARCH RUBY_ARCH #endif +#ifdef RUBY_PLATFORM_CPU +#define RUBY_THINARCH RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS +#endif +#ifndef RUBY_LIB_PREFIX +#error RUBY_LIB_PREFIX must be defined +#endif +#ifndef RUBY_SITE_LIB +#define RUBY_SITE_LIB RUBY_LIB_PREFIX"/site_ruby" +#endif +#ifndef RUBY_VENDOR_LIB +#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby" +#endif + +#define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION +#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION +#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION +#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH +#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH +#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH +#ifdef RUBY_THINARCH +#define RUBY_THIN_ARCHLIB RUBY_LIB "/"RUBY_THINARCH +#define RUBY_SITE_THIN_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_THINARCH +#define RUBY_VENDOR_THIN_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_THINARCH +#endif const char ruby_version[] = RUBY_VERSION; const char ruby_release_date[] = RUBY_RELEASE_DATE; diff --git a/win32/Makefile.sub b/win32/Makefile.sub index a27cfba707..6530fa81d3 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -567,17 +567,9 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define EXECUTABLE_EXTS $(EXECUTABLE_EXTS) #define RUBY_LIB_VERSION_STYLE 3 /* full */ #define RUBY_LIB_PREFIX "/lib/$(RUBY_BASE_NAME)" -#define RUBY_LIB RUBY_LIB_PREFIX"/"RUBY_LIB_VERSION -#define RUBY_SITE_LIB RUBY_LIB_PREFIX"/site_ruby" -#define RUBY_SITE_LIB2 RUBY_SITE_LIB"/"RUBY_LIB_VERSION -#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby" -#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB"/"RUBY_LIB_VERSION #define RUBY_PLATFORM "$(arch)" #define RUBY_SITEARCH "$(sitearch)" #define RUBY_COREDLL "$(RT)" -#define RUBY_ARCHLIB RUBY_LIB"/"RUBY_ARCH -#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2"/"RUBY_SITEARCH -#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2"/"RUBY_SITEARCH #define LIBRUBY_SO "$(LIBRUBY_SO)" #if 0 $(BANG)if "$(RUBY_SO_NAME)"!="$$(RUBY_SO_NAME)" || "$(ARCH)-$(PLATFORM)"!="$$(ARCH)-$$(PLATFORM)"