[sdk] don't overwrite version.mk, substitute REVISION instead
[sdk] don't overwrite version.mk, substitute REVISION instead


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31271 3c298f89-4303-0410-b956-a3cf2f4a3e73

--- a/include/version.mk
+++ b/include/version.mk
@@ -4,6 +4,9 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
+
+# Substituted by SDK, do not remove
+# REVISION:=x
 
 PKG_CONFIG_DEPENDS += \
 	CONFIG_VERSION_NUMBER \

--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -56,7 +56,7 @@
 		> $(SDK_BUILD_DIR)/feeds.conf.default
 	cat $(TOPDIR)/feeds.conf.default \
 		>> $(SDK_BUILD_DIR)/feeds.conf.default
-	echo REVISION:="$(REVISION)" > $(SDK_BUILD_DIR)/include/version.mk
+	$(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(SDK_BUILD_DIR)/include/version.mk
 	find $(SDK_BUILD_DIR) -name .git | $(XARGS) rm -rf
 	find $(SDK_BUILD_DIR) -name .svn | $(XARGS) rm -rf
 	find $(SDK_BUILD_DIR) -name CVS | $(XARGS) rm -rf

comments