This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git


The following commit(s) were added to refs/heads/master by this push:
     new 8fb98c2  CRYPTO-163 Makefile does not recompile objects if local 
include files are changed
8fb98c2 is described below

commit 8fb98c2babd1239252b636bcba6cf550551cf561
Author: Sebb <s...@apache.org>
AuthorDate: Sun Jun 26 13:48:38 2022 +0100

    CRYPTO-163 Makefile does not recompile objects if local include files are 
changed
---
 Makefile                | 10 +++++++---
 src/changes/changes.xml |  3 ++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 66064ba..9dcb8ae 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,10 @@ include Makefile.common
 COMMONS_CRYPTO_OUT:=$(TARGET)/$(commons-crypto)-$(os_arch)
 COMMONS_CRYPTO_OBJ:=$(addprefix 
$(COMMONS_CRYPTO_OUT)/,OpenSslCryptoRandomNative.o OpenSslNative.o 
OpenSslInfoNative.o)
 
+# Shorthand for local dependencies
+CRYPTO_H:=$(SRC_NATIVE)/org/apache/commons/crypto/org_apache_commons_crypto.h 
lib/include/config.h
+CRYPTO_RANDOM_H:=$(SRC_NATIVE)/org/apache/commons/crypto/random/org_apache_commons_crypto_random.h
+
 # Windows uses different path separators
 ifeq ($(OS_NAME),Windows)
   DELTREE := CMD /C DEL /S/Q
@@ -46,15 +50,15 @@ all: $(NATIVE_DLL)
 $#(TARGET)/jni-classes/org/apache/commons/crypto/OpenSslInfoNative.h: 
$(TARGET)/classes/org/apache/commons/crypto/OpenSslInfoNative.class
 #      $(JAVAH) -force -classpath $(TARGET)/classes -o $@ 
org.apache.commons.crypto.OpenSslInfoNative
 
-$(COMMONS_CRYPTO_OUT)/OpenSslNative.o : 
$(SRC_NATIVE)/org/apache/commons/crypto/cipher/OpenSslNative.c 
$(TARGET)/jni-classes/org_apache_commons_crypto_cipher_OpenSslNative.h
+$(COMMONS_CRYPTO_OUT)/OpenSslNative.o : 
$(SRC_NATIVE)/org/apache/commons/crypto/cipher/OpenSslNative.c $(CRYPTO_H) 
$(TARGET)/jni-classes/org_apache_commons_crypto_cipher_OpenSslNative.h
        @mkdir -p $(@D)
        $(CC) $(CFLAGS) -c $< -o $@
 
-$(COMMONS_CRYPTO_OUT)/OpenSslCryptoRandomNative.o : 
$(SRC_NATIVE)/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c 
$(TARGET)/jni-classes/org_apache_commons_crypto_random_OpenSslCryptoRandomNative.h
+$(COMMONS_CRYPTO_OUT)/OpenSslCryptoRandomNative.o : 
$(SRC_NATIVE)/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c 
$(CRYPTO_H) $(CRYPTO_RANDOM_H) 
$(TARGET)/jni-classes/org_apache_commons_crypto_random_OpenSslCryptoRandomNative.h
        @mkdir -p $(@D)
        $(CC) $(CFLAGS) -c $< -o $@
 
-$(COMMONS_CRYPTO_OUT)/OpenSslInfoNative.o : 
$(SRC_NATIVE)/org/apache/commons/crypto/OpenSslInfoNative.c 
$(TARGET)/jni-classes/org_apache_commons_crypto_OpenSslInfoNative.h
+$(COMMONS_CRYPTO_OUT)/OpenSslInfoNative.o : 
$(SRC_NATIVE)/org/apache/commons/crypto/OpenSslInfoNative.c $(CRYPTO_H) 
$(TARGET)/jni-classes/org_apache_commons_crypto_OpenSslInfoNative.h
        @mkdir -p $(@D)
        $(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' 
-DPROJECT_NAME='"$(PROJECT_NAME)"' -I"$(TARGET)/jni-classes" -c $< -o $@
 
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index bd39245..1339b57 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -64,7 +64,8 @@
     <release version="1.1.1" date="20YY-MM-DD" description="TBD">
       <action issue="CRYPTO-160" type="fix" dev="jochen">Enhance the quality 
of JavaCryptoRandom as a subclass of Random by overwriting 
Random.next(int).</action>
       <!-- FIX -->
-      <action issue="CRYPTO-154" type="fix">License header should be plain a 
comment #113.</action>
+      <action issue="CRYPTO-163" type="fix">Makefile does not recompile 
objects if local include files are changed</action>
+      <action issue="CRYPTO-154" type="fix">License header should be a plain 
comment #113.</action>
       <action                    type="fix" dev="ggregory" due-to="Arturo 
Bernal">Fix PMD warning and don't init to defaults #128.</action>
       <action                    type="fix" dev="ggregory" due-to="Arturo 
Bernal">Minor changes #135.</action>
       <action                    type="fix" dev="ggregory" due-to="Gary 
Gregory">Port from pre-Java 8 javah tool to Java 8 and up javac with the -h 
option.</action>

Reply via email to