treewide: combine VERSION_SED and VERSION_SED_SCRIPT
authorPhilip Prindeville <philipp@redfish-solutions.com>
Thu, 25 Jan 2018 00:33:21 +0000 (17:33 -0700)
committerJo-Philipp Wich <jo@mein.io>
Fri, 2 Feb 2018 12:59:34 +0000 (13:59 +0100)
We don't need two versions of this.  The escaping quotes
is so that the sed commands aren't misinterpreted by shell;
it has nothing to do with the contents of the file, thus
one version is adequate.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
include/version.mk
package/base-files/Makefile

index 6c6eb75ff66d2e6209648673cc7e89c8b79b162f..ab427ecba89746ce8ebf4de24d6d4f1e1cd21082 100644 (file)
@@ -85,7 +85,7 @@ $(subst &,\&,$(subst $(comma),\$(comma),$(subst ','\'',$(subst \,\\,$(1)))))
 endef
 #'
 
-VERSION_SED:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \
+VERSION_SED_SCRIPT:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \
        -e 's,%V,$(call sed_escape,$(VERSION_NUMBER)),g' \
        -e 's,%v,\L$(call sed_escape,$(subst $(space),_,$(VERSION_NUMBER))),g' \
        -e 's,%C,$(call sed_escape,$(VERSION_CODE)),g' \
@@ -104,4 +104,3 @@ VERSION_SED:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \
        -e 's,%P,$(call sed_escape,$(VERSION_PRODUCT)),g' \
        -e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g'
 
-VERSION_SED_SCRIPT:=$(VERSION_SED)
index ed3448094875d67152ccaf9d6707f1a290a12d65..ab21213b51f866223e37aaffa58c6b9c1ee82ae5 100644 (file)
@@ -137,7 +137,7 @@ define Package/base-files/install
                fi; \
        )
 
-       $(VERSION_SED) \
+       $(VERSION_SED_SCRIPT) \
                $(1)/etc/banner \
                $(1)/etc/openwrt_version \
                $(1)/usr/lib/os-release
@@ -194,7 +194,7 @@ define Package/base-files/install
        $(if $(CONFIG_CLEAN_IPKG),, \
                mkdir -p $(1)/etc/opkg; \
                $(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
-               $(VERSION_SED) $(1)/etc/opkg/distfeeds.conf)
+               $(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
 endef
 
 ifneq ($(DUMP),1)