fix: Makefile
Co-authored-by: cichy1173 <cichy1173@protonmail.com>
This commit is contained in:
		
							parent
							
								
									4c5d889b97
								
							
						
					
					
						commit
						103034719d
					
				
							
								
								
									
										17
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								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 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Wiktor
						Wiktor