-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (43 loc) · 1.36 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
SHELL:=/bin/bash
build:
lein compile | grep -v 'at clojure.'
test:
lein test | grep -v 'at clojure.' | grep -v '^ clojure\.'
run:
lein run $(ARGS)
reflections:
lein clean
lein compile | sed 's|Reflection warning, ||' | sed "s| can't be resolved\\.||"
todo:
grep 'TODO' -nR */ || true
grep 'FIXME' -nR */ || true
grep 'XXX' -nR */ || true
clean: pkg-clean
PROJNAME := mccormack_t_HW4
PACKAGE_FILE := "$(PROJNAME).tar.gz"
PKGDIR := "pkg/$(PROJNAME)"
pkg: pkg-clean
mkdir -p "$(PKGDIR)/"
cp README-CS4300 "$(PKGDIR)/README.txt"
cp -r src/ "$(PKGDIR)/src"
cp -r test/ "$(PKGDIR)/test"
cp project.clj run.sh Makefile "$(PKGDIR)/"
find ./pkg -name '*~' -delete
tar -czf "$(PACKAGE_FILE)" --directory pkg/ "$(PROJNAME)/"
pkg-clean:
rm -f "$(PROJNAME).tar.gz"
rm -rf pkg
lein clean
CCIS_MACHINE := timepilot.ccs.neu.edu
clean-deploy:
ssh $(CCIS_MACHINE) 'rm -rf ~/private/CS4300-deploy'
deploy-ready: clean-deploy
ssh $(CCIS_MACHINE) 'ls -ld ~/private/ | grep drwx------ &>/dev/null'
ssh $(CCIS_MACHINE) 'mkdir -p ~/private/CS4300-deploy'
deploy: pkg deploy-ready
scp $(PACKAGE_FILE) deploy-test.sh '$(CCIS_MACHINE):~/private/CS4300-deploy/'
ssh $(CCIS_MACHINE) 'cd ~/private/CS4300-deploy && tar -xzf $(PACKAGE_FILE)'
test-deploy: deploy
ssh -X $(CCIS_MACHINE) '~/private/CS4300-deploy/deploy-test.sh'
.PHONY: pkg build test run todo deploy doc
.SILENT: