Skip to content
Browse files

Unbreak shared build on Windows. Collect all version ids to auto.def.

  • Loading branch information...
1 parent ab939f3 commit 9f6a391ea48da29f46aa92a500df91a944e39307 @vadim-z vadim-z committed with Aug 18, 2013
Showing with 13 additions and 15 deletions.
  1. +6 −3 Makefile.in
  2. +4 −7 auto.def
  3. +0 −5 jim.h
  4. +3 −0 make-bootstrap-jim
View
9 Makefile.in
@@ -8,7 +8,10 @@ STRIP = @STRIP@
# Configuration
SH_CFLAGS ?= @SH_CFLAGS@
-SH_LDFLAGS ?= @SH_LDFLAGS@ @SH_SOPREFIX@libjim.@LIBSOEXT@.0.75
+SH_LDFLAGS ?= @SH_LDFLAGS@
+@if SH_SOPREFIX
+SH_LDFLAGS += @SH_SOPREFIX@libjim@LIBSOEXT@
+@endif
SHOBJ_CFLAGS ?= @SHOBJ_CFLAGS@
@if JIM_STATICLIB
SHOBJ_LDFLAGS ?= @SHOBJ_LDFLAGS@
@@ -33,11 +36,11 @@ VPATH := @srcdir@
@if JIM_STATICLIB
LIBJIM := libjim.a
@else
-LIBJIM := libjim.@LIBSOEXT@.0.75
+LIBJIM := libjim@LIBSOEXT@
SH_LIBJIM := $(LIBJIM)
CC += $(SH_CFLAGS)
CXX += $(SH_CFLAGS)
-DEF_LD_PATH := @LD_LIBRARY_PATH@=@builddir@
+DEF_LD_PATH := @LD_LIBRARY_PATH@="@builddir@:$(@LD_LIBRARY_PATH@)"
@endif
@if HAVE_CXX_EXTENSIONS
View
11 auto.def
@@ -1,6 +1,8 @@
# vim:se syn=tcl:
#
+define JIM_VERSION 75
+
# Note: modules which support options *must* be included before 'options'
use cc cc-shared cc-db cc-lib
use local
@@ -117,12 +119,6 @@ switch -glob -- $host_os {
}
}
-if {[have-feature windows]} {
- define LIBSOEXT dll
-} else {
- define LIBSOEXT so
-}
-
# Find some tools
cc-check-tools ar ranlib strip
define tclsh [info nameofexecutable]
@@ -188,6 +184,7 @@ if {[opt-bool shared with-jim-shared]} {
msg-result "Building static library"
define JIM_STATICLIB
}
+define LIBSOEXT [format [get-define SH_SOEXTVER] [format %.2f [expr {[get-define JIM_VERSION] / 100.0}]]]
define JIM_INSTALL [opt-bool install-jim]
define JIM_DOCS [opt-bool docs]
@@ -333,7 +330,7 @@ define C_EXT_SHOBJS [suffix .so $extinfo(module-c)]
define TCL_EXTS [suffix .tcl $extinfo(module-tcl)]
define EXTRA_OBJS $extra_objs
-make-config-header jim-config.h -auto {HAVE_LONG_LONG* JIM_UTF8} -none *
+make-config-header jim-config.h -auto {HAVE_LONG_LONG* JIM_UTF8} -bare JIM_VERSION -none *
make-config-header jimautoconf.h -auto {jim_ext_* TCL_PLATFORM_* TCL_LIBRARY USE_* JIM_* _FILE_OFFSET*}
make-template Makefile.in
make-template build-jim-ext.in
View
5 jim.h
@@ -125,11 +125,6 @@ extern "C" {
* Exported defines
* ---------------------------------------------------------------------------*/
-/* Jim version numbering: every version of jim is marked with a
- * successive integer number. This is version 0. The first
- * stable version will be 1, then 2, 3, and so on. */
-#define JIM_VERSION 75
-
#define JIM_OK 0
#define JIM_ERR 1
#define JIM_RETURN 2
View
3 make-bootstrap-jim
@@ -87,6 +87,9 @@ cat <<EOF
#endif
EOF
+# get JIM_VERSION from auto.def
+sed -n -e 's/^\(define JIM_VERSION.*\)/#\1/p' auto.def
+
outputsource()
{
sed -e '/#include.*jim/d' -e '/#include.*utf8/d' \

0 comments on commit 9f6a391

Please sign in to comment.
Something went wrong with that request. Please try again.