Skip to content

Commit

Permalink
nes.mk: Use xxd instead of basenc
Browse files Browse the repository at this point in the history
This extends compatibility to systems that have a coreutils from before
2019, which is a lot of systems. xxd is technically a new dependency,
but it seems _very_ common so I'm treating it more like "ls" which is a
given.
  • Loading branch information
ejona86 committed Mar 7, 2020
1 parent ee48f79 commit 6b55ab1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nes.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ build/%.chrs/fake: %.chr | build
touch $@
split -x -b 16 $< build/$*.chrs/
build/%.rle: % rle-enc.awk | build
basenc --base16 -w2 $< | LC_ALL=C awk -f rle-enc.awk | basenc --base16 -d > $@
# 'basenc --base16 -w2' and 'basenc --base16 -d' would also work, but
# basenc isn't as widely available as xxd since it was added in
# coreutils 8.31
xxd -c1 -p $< | LC_ALL=C awk -f rle-enc.awk | xxd -r -p > $@

build/%.s: %.bin %.info Makefile | build
# Strip off the first two lines of header, which contain variable
Expand Down

0 comments on commit 6b55ab1

Please sign in to comment.