You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2016/07/02 19:12:33 UTC
commons-crypto git commit: CRYPTO-70 Compiling on Windows
Repository: commons-crypto
Updated Branches:
refs/heads/master 5b44a0039 -> 26ec56a05
CRYPTO-70 Compiling on Windows
Fix make clean target
Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/26ec56a0
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/26ec56a0
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/26ec56a0
Branch: refs/heads/master
Commit: 26ec56a05cc041587e49bf249aac6817476b5acb
Parents: 5b44a00
Author: Sebb <se...@apache.org>
Authored: Sat Jul 2 20:12:30 2016 +0100
Committer: Sebb <se...@apache.org>
Committed: Sat Jul 2 20:12:30 2016 +0100
----------------------------------------------------------------------
Makefile | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/26ec56a0/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 9147eb8..f87218f 100644
--- a/Makefile
+++ b/Makefile
@@ -30,11 +30,18 @@ endif
# Windows uses different path separators
ifeq ($(OS_NAME),Windows)
+ # Classpath separator
SEP := ;
+ DELTREE := DEL /S/Q
+ # The separator used for file paths
+ FSEP := \\
else
SEP := :
+ DELTREE := rm -rf
+ FSEP := /
endif
-
+# Note that some Windows commands (e.g. javah) accept both / and \ as separators
+# We use the subst function to fix the paths for commands that don't accept /
NATIVE_TARGET_DIR:=$(TARGET)/classes/org/apache/commons/crypto/native/$(OS_NAME)/$(OS_ARCH)
NATIVE_DLL:=$(NATIVE_TARGET_DIR)/$(LIBNAME)
@@ -60,8 +67,8 @@ $(COMMONS_CRYPTO_OUT)/$(LIBNAME): $(COMMONS_CRYPTO_OBJ)
$(STRIP) $@
clean:
- rm -rf $(TARGET)/jni-classes
- rm -rf $(COMMONS_CRYPTO_OUT)
+ $(DELTREE) $(subst /,$(FSEP),$(TARGET)/jni-classes)
+ $(DELTREE) $(subst /,$(FSEP),$(COMMONS_CRYPTO_OUT))
native: $(NATIVE_DLL)