Created
October 9, 2024 09:06
-
-
Save lucmann/3a30f9cc06bb8773a77aa5ccc945c3e5 to your computer and use it in GitHub Desktop.
Convert json to svg by a tool named bit-field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRCS := $(wildcard *.json) | |
OBJS := $(patsubst %.json,%.svg, $(SRCS)) | |
all: $(OBJS) | |
$(OBJS): %.svg: %.json | |
npx bit-field --hspace 1800 --lanes $(shell echo $< | grep -o -E '[0-9]*') --vflip --hflip -i $< > $@ | |
clean: | |
rm -f $(OBJS) | |
.PHONY: all clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At first, I'd like to define a function variable like this
and the command in the rule will looks like
Unfortunately, it doesn't work.