diff --git a/com.oracle.truffle.r.native/Makefile b/com.oracle.truffle.r.native/Makefile index 2b59c073ff66292a1acdc7318c2385a98a9da7c5..1207d671c8e181439bd78ce61ff62dcc0e1943af 100644 --- a/com.oracle.truffle.r.native/Makefile +++ b/com.oracle.truffle.r.native/Makefile @@ -30,12 +30,17 @@ export FASTR_NATIVE_DIR = $(TOPDIR) export R_VERSION = $(subst R-,,$(notdir $(basename $(basename $(wildcard $(FASTR_R_HOME)/libdownloads/R-*.gz))))) export GNUR_HOME = $(TOPDIR)/gnur/R-$(R_VERSION) -all: +# Completely accurate dependency analysis is very difficult for this project, so use a version number +# to force a clean build, and elsewhere use sentinels to avoid rebuilding when we can't compute the +# dependencies accurately. + +all: checkversion $(MAKE) -C gnur $(MAKE) -C include $(MAKE) -C fficall $(MAKE) -C library $(MAKE) -C run + cp version.source version.built clean: $(MAKE) -C include clean @@ -44,3 +49,25 @@ clean: $(MAKE) -C run clean $(MAKE) -C gnur clean +version.source := $(shell cat version.source) + +#$(info version: $(version.source)) +ifeq ($(wildcard version.built),) + doclean = 1 +else +version.built := $(shell cat version.built) +#$(info version.built: $(version.built)) +ifneq ($(version.source),$(version.built)) + doclean = 1 +else + doclean = 0 +endif +endif + +#$(info doclean: $(doclean)) +checkversion: +ifeq ($(doclean),1) + $(MAKE) clean +endif + + \ No newline at end of file diff --git a/com.oracle.truffle.r.native/fficall/src/jni/rffiutils.c b/com.oracle.truffle.r.native/fficall/src/jni/rffiutils.c index bf170af25d54fcc2d1b17064eacc1687261753ae..03118d01c25eaf42c879226e0dfadf0a4476489a 100644 --- a/com.oracle.truffle.r.native/fficall/src/jni/rffiutils.c +++ b/com.oracle.truffle.r.native/fficall/src/jni/rffiutils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/com.oracle.truffle.r.native/fficall/src/jni/rffiutils.h b/com.oracle.truffle.r.native/fficall/src/jni/rffiutils.h index 6ed346d2111f80391910b104783f49529ec4d037..c86fc4bc15d69e15f9cb22bc70ced2a0d96676ad 100644 --- a/com.oracle.truffle.r.native/fficall/src/jni/rffiutils.h +++ b/com.oracle.truffle.r.native/fficall/src/jni/rffiutils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/com.oracle.truffle.r.native/version.source b/com.oracle.truffle.r.native/version.source new file mode 100644 index 0000000000000000000000000000000000000000..78c24caea0d6432c6894a971ae42532768cc80d4 --- /dev/null +++ b/com.oracle.truffle.r.native/version.source @@ -0,0 +1 @@ +2/10/17 diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/ffi/RFFIUtils.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/ffi/RFFIUtils.java index f98624c494ff3fa252a3a6a008e1fb639bf8117d..9b7df136add07eda78a75719536b4af2007874fd 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/ffi/RFFIUtils.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/ffi/RFFIUtils.java @@ -149,7 +149,6 @@ public class RFFIUtils { } private static void traceCall(CallMode mode, String name, int depthValue, Object... args) { - assert initialized; if (traceEnabled) { StringBuffer sb = new StringBuffer(); sb.append("CallRFFI["); diff --git a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNIUpCallsRFFIImpl.java b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNIUpCallsRFFIImpl.java index 17087d2880bc92ba0c7065b1cc0abfa25248c2b9..94381998e733acd2e1fbb787c85e06477431b3b1 100644 --- a/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNIUpCallsRFFIImpl.java +++ b/com.oracle.truffle.r.runtime.ffi/src/com/oracle/truffle/r/runtime/ffi/jni/JNIUpCallsRFFIImpl.java @@ -33,6 +33,7 @@ import com.oracle.truffle.r.runtime.ffi.CharSXPWrapper; * Some additional methods to support the native JNI side. */ public final class JNIUpCallsRFFIImpl extends JavaUpCallsRFFIImpl { + // Checkstyle: stop method name check /** * Helper function for {@code R_TopLevelExec}, see {@link #R_ToplevelExec()}, called after C