From: Urban Wallasch Date: Wed, 31 Mar 2021 09:55:56 +0000 (+0200) Subject: * Use wget timestamping feature to decide, if download is necessary. X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=HEAD;p=gjedict.git * Use wget timestamping feature to decide, if download is necessary. --- 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)