diff options
author | Sungbo Eo <mans0n@gorani.run> | 2021-12-05 02:08:48 +0900 |
---|---|---|
committer | Sungbo Eo <mans0n@gorani.run> | 2021-12-12 14:05:55 +0900 |
commit | 446da706690a239dc7a454102db0b0a3b3a9d1ed (patch) | |
tree | 5d5de47276b335b94e28bd43bb6f0daf66acd157 /include | |
parent | 3b20eb185b2a45681fa9e2d31b9844458d5a72d2 (diff) | |
download | upstream-446da706690a239dc7a454102db0b0a3b3a9d1ed.tar.gz upstream-446da706690a239dc7a454102db0b0a3b3a9d1ed.tar.bz2 upstream-446da706690a239dc7a454102db0b0a3b3a9d1ed.zip |
build: image: improve zip build recipe
* clean before build
* specify executable path
* allow adding extra options for zip
* use basename of $@
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Diffstat (limited to 'include')
-rw-r--r-- | include/image-commands.mk | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk index 97176f7d7b..913e1c2411 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -524,12 +524,14 @@ define Build/xor-image endef define Build/zip + rm -rf $@.tmp mkdir $@.tmp - mv $@ $@.tmp/$(1) + mv $@ $@.tmp/$(word 1,$(1)) - zip -j -X \ + $(STAGING_DIR_HOST)/bin/zip -j -X \ $(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \ - $@ $@.tmp/$(if $(1),$(1),$@) + $(wordlist 2,$(words $(1)),$(1)) \ + $@ $@.tmp/$(if $(word 1,$(1)),$(word 1,$(1)),$$(basename $@)) rm -rf $@.tmp endef |