[openwrt/openwrt] treewide: combine VERSION_SED and VERSION_SED_SCRIPT
LEDE Commits
lede-commits at lists.infradead.org
Fri Feb 2 04:59:50 PST 2018
jow pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/ff8e9a4ecbe70564c8649ea4ed69f28bec77dfa7
commit ff8e9a4ecbe70564c8649ea4ed69f28bec77dfa7
Author: Philip Prindeville <philipp at redfish-solutions.com>
AuthorDate: Wed Jan 24 17:33:21 2018 -0700
treewide: combine VERSION_SED and VERSION_SED_SCRIPT
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 at redfish-solutions.com>
---
include/version.mk | 3 +--
package/base-files/Makefile | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/version.mk b/include/version.mk
index 6c6eb75..ab427ec 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -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)
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index ed34480..ab21213 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -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)
More information about the lede-commits
mailing list