From 103034719dde358c0567a7051d41028dc4acd3fd Mon Sep 17 00:00:00 2001 From: Wiktor <> Date: Wed, 28 May 2025 22:08:48 +0200 Subject: [PATCH] fix: Makefile Co-authored-by: cichy1173 --- Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ee53574..ea5f65e 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,22 @@ CONVERTER = python3 src/converter.py BLOCKLISTS = seo-nonsense reflink-spam satire mirror TARGET_FORMATS = adguard ublacklist -build: $(foreach blocklist, $(BLOCKLISTS), $(foreach targetformat, $(TARGET_FORMATS), dist/$(blocklist)/$(targetformat).txt)) +TARGETS = $(foreach blocklist, $(BLOCKLISTS), $(foreach targetformat, $(TARGET_FORMATS), dist/$(blocklist)/$(targetformat).txt)) -dist/%.txt: - @mkdir -p $(dir $@) && \ - $(CONVERTER) --inputfile src/$(firstword $(subst /, ,$*))-source.json --targetformat $(notdir $*) --outputfile $@ +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 +