-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (37 loc) · 1.59 KB
/
Makefile
File metadata and controls
52 lines (37 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: prof clean json clean_json atom code run json-examples install
all:
stack build
run:
stack build && stack exec test-owm
json: auto-src/Weather.hs auto-src/Forecast.hs auto-src/ForecastDaily.hs
json-examples:
stack runhaskell GetJsonExamples.hs
clean:
stack clean
prof:
stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"
install:
sed 's/module Weather/module Network.Owm.Internal.Weather/' auto-src/Weather.hs > src/Network/Owm/Internal/Weather.hs; \
sed 's/module Forecast/module Network.Owm.Internal.Forecast/' auto-src/Forecast.hs > src/Network/Owm/Internal/Forecast.hs; \
sed 's/module ForecastDaily/module Network.Owm.Internal.ForecastDaily/' auto-src/ForecastDaily.hs > src/Network/Owm/Internal/ForecastDaily.hs
auto-src/Weather.hs:
cd auto-src/; json-autotype -tWeather ../json/Weather*.json -o Weather.hs; \
stack runhaskell Weather.hs ../json/Weather*.json
auto-src/Forecast.hs:
cd auto-src/; json-autotype -tForecast ../json/Forecast*.json -o Forecast.hs; \
stack runhaskell Forecast.hs ../json/Forecast*.json
auto-src/Station.hs:
cd auto-src/; json-autotype -tStation ../json/Station*.json -o Station.hs; \
stack runhaskell Station.hs ../json/Station*.json
auto-src/ForecastDaily.hs:
cd auto-src/; json-autotype -tForecastDaily ../json/ForecastDaily*.json -o ForecastDaily.hs; \
stack runhaskell ForecastDaily.hs ../json/ForecastDaily*.json
city_list.txt:
wget http://openweathermap.org/help/city_list.txt
clean_json:
rm auto-src/*.hs
atom:
stack exec atom .
code:
stack build stylish-haskell hlint intero hoogle && \
zsh -c -i "code ."