aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2018-03-14 10:35:26 +0100
committerMarc André Tanner <mat@brain-dump.org>2018-03-14 12:11:53 +0100
commit85919f6b75fda1f65352b7f97334601ce0c0b4c8 (patch)
tree256ed613aef1f8ca98c4d449f4a58e434bcb25b7 /Makefile
parent43e565370052c1d958afa33456cef01b1b13964d (diff)
downloadvis-85919f6b75fda1f65352b7f97334601ce0c0b4c8.tar.gz
vis-85919f6b75fda1f65352b7f97334601ce0c0b4c8.tar.xz
build: try to use POSIX tools/options for vis-single target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2026c24..b644403 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,7 @@ LDFLAGS_VIS = $(LDFLAGS_AUTO) $(LDFLAGS_TERMKEY) $(LDFLAGS_CURSES) $(LDFLAGS_ACL
$(LDFLAGS_SELINUX) $(LDFLAGS_TRE) $(LDFLAGS_LUA) $(LDFLAGS_LPEG) $(LDFLAGS_STD)
STRIP?=strip
+TAR?=tar
all: $(ELF)
@@ -72,9 +73,10 @@ vis-single-payload.inc: $(EXECUTABLES) lua/*
echo '#ifndef VIS_SINGLE_PAYLOAD_H' > $@
echo '#define VIS_SINGLE_PAYLOAD_H' >> $@
echo 'static unsigned char vis_single_payload[] = {' >> $@
- tar --mtime='2014-07-15 01:23Z' --owner=0 --group=0 --numeric-owner --mode='a+rX-w' -c \
+ $(TAR) --mtime='2014-07-15 01:23Z' --owner=0 --group=0 --numeric-owner --mode='a+rX-w' -c \
$(EXECUTABLES) $$(find lua -name '*.lua' | LC_ALL=C sort) | xz -T 1 | \
- od -t x1 -A none -v | sed 's/\([0-9a-f]\+\)/0x\1,/g;$$s/,$$/ };/' >> $@
+ od -t x1 -v | sed -e 's/^[0-9a-fA-F]\{1,\}//g' -e 's/\([0-9a-f]\{2\}\)/0x\1,/g' >> $@
+ echo '};' >> $@
echo '#endif' >> $@
vis-single: vis-single.c vis-single-payload.inc