git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9fbe7cd
)
tools: make functions for common file creation
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 4 Jun 2017 21:53:35 +0000
(23:53 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 11 Jun 2017 00:49:19 +0000
(
02:49
+0200)
Identical results.
Makefile
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index 0dbde306c6d4436f3a083fe24f6242eba377bcf2..8ff1638367ccc9d73f8362f3f791649309c08a90 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-4,55
+4,58
@@
more: all data/digraphs-xorg.inc.pl
download: data/DerivedAge.txt data/rfc1345.txt data/xorg-compose data/countryInfo.txt data/browser/caniuse data/browser/usage-wm.tsv data/xcolors data/unicode-sampler
.PHONY: download
download: data/DerivedAge.txt data/rfc1345.txt data/xorg-compose data/countryInfo.txt data/browser/caniuse data/browser/usage-wm.tsv data/xcolors data/unicode-sampler
.PHONY: download
+# atomically create file by command
+cmdsave = @echo $1 $2 \>$@; $1 $2 | sponge $@
+# download git checkout
+gitsave = @echo git pull or clone $@; \
+ [ -r $@/.git ] && cd $@ && git pull --ff-only || true; \
+ [ -e $@ ] || git clone "$1" $@
+
sitemap.xml: tools/mksitemap
sitemap.xml: tools/mksitemap
- $
< | sponge $@
+ $
(call cmdsave,$<)
data/DerivedAge.txt:
tools/wget-ifmodified http://www.unicode.org/Public/UNIDATA/$(@F) $@
data/unicode-age.inc.pl: tools/mkcharver data/DerivedAge.txt
data/DerivedAge.txt:
tools/wget-ifmodified http://www.unicode.org/Public/UNIDATA/$(@F) $@
data/unicode-age.inc.pl: tools/mkcharver data/DerivedAge.txt
- $
< $(word 2,$^) | sponge $@
+ $
(call cmdsave,$^)
data/rfc1345.txt:
tools/wget-ifmodified http://www.ietf.org/rfc/$(@F) $@
data/digraphs-rfc.inc.pl: tools/mkdigraphs-rfc data/rfc1345.txt
data/rfc1345.txt:
tools/wget-ifmodified http://www.ietf.org/rfc/$(@F) $@
data/digraphs-rfc.inc.pl: tools/mkdigraphs-rfc data/rfc1345.txt
- $
< $(word 2,$^) | sponge $@
+ $
(call cmdsave,$^)
data/digraphs-shiar.inc.pl: tools/mkdigraphs-shiar shiar.inc.txt
data/digraphs-shiar.inc.pl: tools/mkdigraphs-shiar shiar.inc.txt
- $
< $(word 2,$^) | sponge $@
+ $
(call cmdsave,$^)
data/xorg-compose:
tools/wget-ifmodified http://cgit.freedesktop.org/xorg/lib/libX11/plain/nls/en_US.UTF-8/Compose.pre $@
data/digraphs-xorg.inc.pl: tools/mkdigraphs-xorg data/xorg-compose
data/xorg-compose:
tools/wget-ifmodified http://cgit.freedesktop.org/xorg/lib/libX11/plain/nls/en_US.UTF-8/Compose.pre $@
data/digraphs-xorg.inc.pl: tools/mkdigraphs-xorg data/xorg-compose
- $
< $(word 2,$^) | sponge $@
+ $
(call cmdsave,$^)
data/digraphs-vim.inc.pl: tools/mkdigraphs-vim
data/digraphs-vim.inc.pl: tools/mkdigraphs-vim
- $
< | sponge $@
+ $
(call cmdsave,$<)
data/digraphs.inc.pl: tools/mkdigraphlist data/digraphs-rfc.inc.pl data/digraphs-vim.inc.pl data/digraphs-shiar.inc.pl data/unicode-char.inc.pl
data/digraphs.inc.pl: tools/mkdigraphlist data/digraphs-rfc.inc.pl data/digraphs-vim.inc.pl data/digraphs-shiar.inc.pl data/unicode-char.inc.pl
- $
< | sponge $@
+ $
(call cmdsave,$<)
data/unicode-char.inc.pl: tools/mkcharinfo data/digraphs-rfc.inc.pl data/digraphs-shiar.inc.pl data/unicode-age.inc.pl unicode-table.inc.pl
data/unicode-char.inc.pl: tools/mkcharinfo data/digraphs-rfc.inc.pl data/digraphs-shiar.inc.pl data/unicode-age.inc.pl unicode-table.inc.pl
- $
< | sponge $@
+ $
(call cmdsave,$<)
data/font/%.inc.pl: tools/mkttfinfo data/font/%.ttf
data/font/%.inc.pl: tools/mkttfinfo data/font/%.ttf
- $
< $(word 2,$^) $@
|| true
+ $
(call cmdsave,$^)
|| true
data/unicode-sampler:
data/unicode-sampler:
- @echo git pull or clone $@
- @[ -r $@/.git ] && cd $@ && git pull --ff-only || true
- @[ -e $@ ] || git clone git://git.shiar.nl/unicode-sampler $@
+ $(call gitsave,git://git.shiar.nl/unicode-sampler)
data/xcolors/themes: data/xcolors
data/xcolors:
data/xcolors/themes: data/xcolors
data/xcolors:
- @echo git pull or clone $@
- @[ -r $@/.git ] && cd $@ && git pull --ff-only || true
- @[ -e $@ ] || git clone https://github.com/tlatsas/xcolors $@
+ $(call gitsave,https://github.com/tlatsas/xcolors)
data/termcol-xcolor.inc.pl: tools/mktermcol-xcolor data/xcolors/themes
data/termcol-xcolor.inc.pl: tools/mktermcol-xcolor data/xcolors/themes
- $
< $(word 2,$^)/* | sponge $@
+ $
(call cmdsave,$^/*)
.SECONDARY:
data/font/%.ttf:
.SECONDARY:
data/font/%.ttf:
@@
-88,30
+91,28
@@
data/font/all-other: data/font/unifont.inc.pl data/font/code2000.inc.pl data/fon
# $< --headless unifont_upper.ttf >>$@
data/unicode-cover.inc.pl: tools/mkfontinfo data/font $(patsubst data/font/%.ttf,data/font/%.inc.pl,$(wildcard data/font/*.ttf))
# $< --headless unifont_upper.ttf >>$@
data/unicode-cover.inc.pl: tools/mkfontinfo data/font $(patsubst data/font/%.ttf,data/font/%.inc.pl,$(wildcard data/font/*.ttf))
- $
< | sponge $@
+ $
(call cmdsave,$<)
data/countryInfo.txt:
tools/wget-ifmodified http://download.geonames.org/export/dump/$(@F) $@
data/countries.inc.pl: tools/mkcountries-geonames data/countryInfo.txt
data/countryInfo.txt:
tools/wget-ifmodified http://download.geonames.org/export/dump/$(@F) $@
data/countries.inc.pl: tools/mkcountries-geonames data/countryInfo.txt
- $
< $(word 2,$^) | sponge $@
+ $
(call cmdsave,$^)
data/browser: data/browser/support.inc.pl data/browser/usage-wm.inc.pl
data/browser/caniuse/data.json: data/browser/caniuse
data/browser/caniuse:
data/browser: data/browser/support.inc.pl data/browser/usage-wm.inc.pl
data/browser/caniuse/data.json: data/browser/caniuse
data/browser/caniuse:
- @echo git pull or clone $@
- @[ -r $@/.git ] && cd $@ && git pull --ff-only || true
- @[ -e $@ ] || git clone https://github.com/Fyrd/caniuse.git $@
+ $(call gitsave,https://github.com/Fyrd/caniuse.git)
data/browser/support.inc.pl: tools/mkcaniuse data/browser/caniuse/data.json
data/browser/support.inc.pl: tools/mkcaniuse data/browser/caniuse/data.json
- $
< $(word 2,$^) | sponge $@
+ $
(call cmdsave,$^)
data/browser/usage-wm.tsv:
tools/wget-ifmodified https://analytics.wikimedia.org/datasets/periodic/reports/metrics/browser/all_sites_by_browser_family_and_major_percent.tsv $@
data/browser/usage-wm.inc.pl: tools/mkusage-wikimedia data/browser/usage-wm.tsv
data/browser/usage-wm.tsv:
tools/wget-ifmodified https://analytics.wikimedia.org/datasets/periodic/reports/metrics/browser/all_sites_by_browser_family_and_major_percent.tsv $@
data/browser/usage-wm.inc.pl: tools/mkusage-wikimedia data/browser/usage-wm.tsv
- $
< $(word 2,$^) | sponge $@
+ $
(call cmdsave,$^)
clean:
-rm data/digraphs.inc.pl
clean:
-rm data/digraphs.inc.pl
@@
-125,5
+126,5
@@
clean:
.SECONDEXPANSION:
data/writing-latn.inc.pl: tools/perlinc-static $$(@F)
.SECONDEXPANSION:
data/writing-latn.inc.pl: tools/perlinc-static $$(@F)
- $
< $(word 2,$^) | sponge $@
+ $
(call cmdsave,$^)