Fixed Linux file globbing in tree_shaker Makefile
Change on 2017/02/02 by zgao
@@ -75,6 +75,12 @@ UNUSED_JAR_CONTENTS = \
$(CLASS_DIR)/hook* \
$(CLASS_DIR)/jdt*
+ifeq ($(shell uname), Linux)
+PRUNE_CMD = bash -O globasciiranges -c "rm -rf $(UNUSED_JAR_CONTENTS)"
+else
+PRUNE_CMD = rm -rf $(UNUSED_JAR_CONTENTS)
+endif
+
default: $(JAR)
@:
@@ -88,7 +94,7 @@ $(JAR): $(MANIFEST) $(RESOURCE_FILES) $(JAVA_SOURCES_FULL) \
-classpath $(JAR_DEPS_PATH) -encoding UTF-8 \
-d $(CLASS_DIR) -source 1.8 -target 1.8 -nowarn $(JAVA_SOURCES:%=$(JAVA_SOURCE_DIR)/%)
@for lib in $(JAR_DEPS_DIST); do unzip -oq $$lib -d $(CLASS_DIR); done
- @rm -rf $(UNUSED_JAR_CONTENTS)
+ @$(PRUNE_CMD)
@jar cfm $@-combined $(MANIFEST) -C $(CLASS_DIR) .
@java -jar $(JAVA_DEPS_JAR_DIR)/$(JARJAR_JAR) process jarjar.rules $@-combined $@
