Debian Codegraph @

gen/Makefile

raw
1 CURL = curl --silent
2 GHC = stack exec ghc --
3 #GHC = ghc
4
5 target1 = ../src/Data/Char/Properties/UnicodeBlocks.hs
6 target2 = ../src/Data/Char/Properties/UnicodeCharProps.hs
7
8 targets = $(target1) $(target2)
9
10 targetDir = $(shell dirname $(target1))
11
12 all : $(targets)
13
14 new :
15 rm -f *.txt
16 $(MAKE) all
17
18 Blocks.txt :
19 $(CURL) http://www.unicode.org/Public/UNIDATA/Blocks.txt > $@
20
21 UnicodeData.txt :
22 $(CURL) http://www.unicode.org/Public/UNIDATA/UnicodeData.txt > $@
23
24 $(target1) : Blocks.txt ./genBlocks
25 [ -d $(targetDir) ] || mkdir -p $(targetDir)
26 ./genBlocks > $@
27
28 $(target2) : UnicodeData.txt ./genCharProps
29 [ -d $(targetDir) ] || mkdir -p $(targetDir)
30 ./genCharProps > $@
31
32 ./genBlocks : GenBlocks.hs
33 $(GHC) -Wall --make -o $@ $<
34
35 ./genCharProps : GenCharProps.hs
36 $(GHC) -Wall --make -o $@ $<
37
38 clean :
39 rm -f $(targets) ./genBlocks ./genCharProps *.hi *.o
40
41 .PHONY : all new clean