summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-10-15 01:42:51 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2014-10-15 01:42:51 (GMT)
commit9ebd3cedf73178a73a06d94bd3c69ad604de8000 (patch)
tree17bd175aa4b836804283cebd99545123c5cfd38a
parent1389227aad9ae57de2296fff64e31eeff2693848 (diff)
downloadmxe-9ebd3cedf73178a73a06d94bd3c69ad604de8000.zip
mxe-9ebd3cedf73178a73a06d94bd3c69ad604de8000.tar.gz
mxe-9ebd3cedf73178a73a06d94bd3c69ad604de8000.tar.bz2
update: Add "UPDATE_DRYRUN" mode
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 332c520..fa66103 100644
--- a/Makefile
+++ b/Makefile
@@ -524,10 +524,11 @@ define UPDATE
$(info . $(1) $(2)),
$(info OLD $(1) $($(1)_VERSION) --> $(2) ignoring)),
$(info NEW $(1) $($(1)_VERSION) --> $(2))
- $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' '$(TOP_DIR)/src/$(1).mk'
- $(MAKE) -f '$(MAKEFILE)' 'update-checksum-$(1)' \
- || { $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $($(1)_VERSION)/' '$(TOP_DIR)/src/$(1).mk'; \
- exit 1; })),
+ $(if $(findstring undefined, $(origin UPDATE_DRYRUN)),
+ $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' '$(TOP_DIR)/src/$(1).mk'
+ $(MAKE) -f '$(MAKEFILE)' 'update-checksum-$(1)' \
+ || { $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $($(1)_VERSION)/' '$(TOP_DIR)/src/$(1).mk'; \
+ exit 1; }))),
$(info Unable to update version number of package $(1) \
$(newline)$(newline)$($(1)_UPDATE)$(newline)))