Merge "Remove uses of $(shell)"
am: d4118f22f6
Change-Id: I44f646cea23a3c1174dc7f432ff7e97bc948e6fc
diff --git a/baksmali/Android.mk b/baksmali/Android.mk
index a5ee9ab..feaff1d 100644
--- a/baksmali/Android.mk
+++ b/baksmali/Android.mk
@@ -38,16 +38,10 @@
LOCAL_STATIC_JAVA_LIBRARIES := \
dexlib2
-#read in the version number
-BAKSMALI_VERSION := $(shell cat $(LOCAL_PATH)/../build.gradle | \
- grep -o -e "^version = '\(.*\)'" | grep -o -e "[0-9.]\+")
-
-BAKSMALI_VERSION := $(BAKSMALI_VERSION)-aosp
-
#create a new baksmali.properties file using the correct version
-$(intermediates)/resources/baksmali.properties:
+$(intermediates)/resources/baksmali.properties: $(LOCAL_PATH)/../build.gradle
$(hide) mkdir -p $(dir $@)
- $(hide) echo "application.version=$(BAKSMALI_VERSION)" > $@
+ $(hide) echo "application.version=$$(grep -o -e "^version = '\(.*\)'" $< | grep -o -e "[0-9.]\+")-aosp" >$@
LOCAL_JAVA_RESOURCE_FILES := $(intermediates)/resources/baksmali.properties
diff --git a/smali/Android.mk b/smali/Android.mk
index 40bd640..016707d 100644
--- a/smali/Android.mk
+++ b/smali/Android.mk
@@ -44,16 +44,10 @@
antlr-runtime \
dexlib2
-#read in the version number
-SMALI_VERSION := $(shell cat $(LOCAL_PATH)/../build.gradle | \
- grep -o -e "^version = '\(.*\)'" | grep -o -e "[0-9.]\+")
-
-SMALI_VERSION := $(SMALI_VERSION)-aosp
-
#create a new smali.properties file using the correct version
-$(intermediates)/resources/smali.properties:
+$(intermediates)/resources/smali.properties: $(LOCAL_PATH)/../build.gradle
$(hide) mkdir -p $(dir $@)
- $(hide) echo "application.version=$(SMALI_VERSION)" > $@
+ $(hide) echo "application.version=$$(grep -o -e "^version = '\(.*\)'" $< | grep -o -e "[0-9.]\+")-aosp" >$@
LOCAL_JAVA_RESOURCE_FILES := $(intermediates)/resources/smali.properties