specify Avian version via a macro defined in makefile

This commit is contained in:
Joel Dice 2008-03-06 13:30:26 -07:00
parent 859f676f24
commit fbc5463fb1
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
MAKEFLAGS = -s
name = avian
version = 0.0.1
build-arch = $(shell uname -m)
ifeq ($(build-arch),i586)
@ -55,7 +56,7 @@ warnings = -Wall -Wextra -Werror -Wunused-parameter \
common-cflags = $(warnings) -fno-rtti -fno-exceptions \
-I$(JAVA_HOME)/include -idirafter $(src) -I$(native-build) \
-D__STDC_LIMIT_MACROS -D_JNI_IMPLEMENTATION_
-D__STDC_LIMIT_MACROS -D_JNI_IMPLEMENTATION_ -DAVIAN_VERSION=\"$(version)\"
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
-I$(JAVA_HOME)/include/linux -I$(src) -pthread

View File

@ -441,7 +441,7 @@ Java_java_lang_System_getVMProperty(Thread* t, jclass, jstring name,
if (strcmp(n, "java.lang.classpath") == 0) {
r = makeLocalReference(t, makeString(t, "%s", t->m->finder->path()));
} else if (strcmp(n, "avian.version") == 0) {
r = makeLocalReference(t, makeString(t, "0.0"));
r = makeLocalReference(t, makeString(t, AVIAN_VERSION));
}
if (r) {