From 23f4072cc4a0591202da9c3b04e3a01cedf7767f Mon Sep 17 00:00:00 2001 From: Urban Wallasch Date: Wed, 31 Mar 2021 11:55:56 +0200 Subject: [PATCH] * Use wget timestamping feature to decide, if download is necessary. --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index da45a65..c520346 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,24 @@ TARGETS = edict enamdict kanjidic -#URL = http://ftp.monash.edu.au/pub/nihongo URL = http://ftp.edrdg.org/pub/Nihongo INSTDIR = /usr/share/gjiten/dics .PRECIOUS: %.gz -.PHONY: all clean distclean install +.PHONY: all clean distclean install update all: $(TARGETS) -%: %.gz - zcat $^ | recode EUC-JP..UTF-8 > $@ +.SECONDEXPANSION: + +$(TARGETS): $$@.gz + zcat $@.gz | recode EUC-JP..UTF-8 > $@ + +%.gz: update + wget -N $(URL)/$@ + +update: -%.gz: - wget $(URL)/$@ clean: -rm -fv $(TARGETS) -- 2.30.2