24 lines
624 B
Makefile
24 lines
624 B
Makefile
CONVERTER = python3 src/converter.py
|
|
BLOCKLISTS = seo-nonsense reflink-spam satire mirror
|
|
TARGET_FORMATS = adguard ublacklist
|
|
|
|
TARGETS = $(foreach blocklist, $(BLOCKLISTS), $(foreach targetformat, $(TARGET_FORMATS), dist/$(blocklist)/$(targetformat).txt))
|
|
|
|
build: $(TARGETS)
|
|
|
|
dist/%/adguard.txt: src/%-source.json
|
|
mkdir -p dist/$*
|
|
$(CONVERTER) --inputfile src/$*-source.json --targetformat adguard --outputfile $@
|
|
|
|
dist/%/ublacklist.txt: src/%-source.json
|
|
mkdir -p dist/$*
|
|
$(CONVERTER) --inputfile src/$*-source.json --targetformat ublacklist --outputfile $@
|
|
|
|
clean:
|
|
rm -rf dist/*
|
|
|
|
all: build
|
|
|
|
.PHONY: build clean all
|
|
|