-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
61 lines (46 loc) · 1.3 KB
/
Makefile
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
53
54
55
56
57
58
59
60
61
SMBCOMMAND = "lcd _build; prompt; recurse; mput *"
LOGDIR = _logs # underscore means Generate.hs won't copy them to the server!
SMBLOGSCOMMAND = "lcd $(LOGDIR); prompt; mget *"
### Authentication file ###
#
# If the text file
AUTHFILE = _authsmb.txt
# is found, it will be used by smbclient for authentication. It should
# contain the lines
#
# username = $yourUsername
# password = $yourPassword
#
# (no spaces at the beginning of the lines).
#
# If the file is not present, you will be asked for your credentials
# instead.
ifneq ($(wildcard $(AUTHFILE)),)
AUTHSTRING = -A $(AUTHFILE)
else
AUTHSTRING =
endif
###########################
default: local
local:
runghc Generate101.hs
runghc GenerateNews.hs
runghc Generate.hs
compile:
cabal build --builddir _dist
local-compiled:
`cabal list-bin --builddir _dist Generate101`
`cabal list-bin --builddir _dist GenerateNews`
`cabal list-bin --builddir _dist Generate`
deploy auto-deploy: local-compiled
smbclient //msp.cis.strath.ac.uk/msp -d 0 $(AUTHSTRING) -c $(SMBCOMMAND)
get-logs:
@echo "Storing logs in the $(LOGDIR) directory"
mkdir -p $(LOGDIR)
smbclient //msp.cis.strath.ac.uk/msp-logs $(AUTHSTRING) -c $(SMBLOGSCOMMAND)
upload:
git add --all
git commit
git push
install-deps:
cabal install --only-dependencies