cm verison cleanup, modversion legacy support

Change-Id: I2af5640ff319bb5861df08338e612c5eab3c6831
diff --git a/config/common.mk b/config/common.mk
index 9789a22..080d25d 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -100,19 +100,19 @@
 PRODUCT_BUILD_PROP_OVERRIDES += BUILD_DISPLAY_ID=IML74K
 
 ifdef CM_NIGHTLY
-    PRODUCT_PROPERTY_OVERRIDES += \
-        ro.cm.version=$(PRODUCT_VERSION_MAJOR)-$(shell date +%m%d%Y)-NIGHTLY-$(PRODUCT_DEVICE)
+    CM_VERSION :=$(PRODUCT_VERSION_MAJOR)-$(shell date +%m%d%Y)-NIGHTLY-$(PRODUCT_DEVICE)
 else
     ifdef CM_SNAPSHOT
-        PRODUCT_PROPERTY_OVERRIDES += \
-            ro.cm.version=$(PRODUCT_VERSION_MAJOR)-$(shell date +%m%d%Y)-SNAPSHOT-$(PRODUCT_DEVICE)$(CM_EXTRAVERSION)
+        CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date +%m%d%Y)-SNAPSHOT-$(PRODUCT_DEVICE)$(CM_EXTRAVERSION)
     else
         ifdef CM_RELEASE
-            PRODUCT_PROPERTY_OVERRIDES += \
-                ro.cm.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(PRODUCT_DEVICE)
+            CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(PRODUCT_DEVICE)
         else
-            PRODUCT_PROPERTY_OVERRIDES += \
-                ro.cm.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(PRODUCT_DEVICE)-KANG
+            CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(PRODUCT_DEVICE)-KANG
         endif
     endif
 endif
+
+PRODUCT_PROPERTY_OVERRIDES += \
+  ro.cm.version=$(CM_VERSION) \
+  ro.modversion=$(CM_VERSION)
\ No newline at end of file