This repository has been archived by the owner on Dec 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
84 lines (65 loc) · 2.38 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
NUGET=/Library/Frameworks/Mono.framework/Commands/nuget
ifeq ($(wildcard $(NUGET)),)
NUGET=nuget
endif
XBUILD=/Library/Frameworks/Mono.framework/Commands/xbuild
ifeq ($(wildcard $(XBUILD)),)
XBUILD=xbuild
endif
MONO=/Library/Frameworks/Mono.framework/Commands/mono
ifeq ($(wildcard $(MONO)),)
MONO=mono
endif
default: all
@:
all:
$(NUGET) restore
@$(MAKE) -C MonkeyWrench generate-assembly-info
$(XBUILD) /verbosity:quiet /nologo
clean:
$(XBUILD) /target:clean
rm -f MonkeyWrench/AssemblyInfo.cs
wsdl:
$(MAKE) -C MonkeyWrench.Web.WebService $@
build: all
$(MONO) --debug MonkeyWrench.Builder/bin/Debug/MonkeyWrench.Builder.exe
schedule update: all
$(MONO) --debug MonkeyWrench.Scheduler/bin/Debug/MonkeyWrench.Scheduler.exe
web:
scripts/web.sh
generate:
$(MAKE) -C MonkeyWrench.DataClasses $@
clean-large-objects compress-files execute-deletion-directives move-files-to-file-system move-files-to-database: all
$(MONO) --debug MonkeyWrench.Database.Manager/bin/Debug/MonkeyWrench.Database.Manager.exe --$@
RELEASE_FILENAME=releases/MonkeyWrench.`grep AssemblyVersion MonkeyWrench/AssemblyInfo.cs | awk -F'\"' '{print $$2}'`.zip
release: all
@mkdir -p releases
rm -f $(RELEASE_FILENAME)
zip -j -9 $(RELEASE_FILENAME) class/lib/* scripts/build
#
# Test targets:
# test or tests: make the test binary
# run-test or run-tests: run the tests
# test-db-psql: check the test database with psql
# test-web: starts up xsp2 on localhost:8123 allowing you to view the current state of the test database
#
tests test: all
$(MAKE) -C MonkeyWrench.Test $@
run-test run-tests: tests
# git creates read-only files, which managed code can't delete (an UnauthorizedException is thrown)
# delete any test directories right away
rm -Rf /tmp/MonkeyWrench.Test
$(MONO) --debug MonkeyWrench.Test/bin/Debug/MonkeyWrench.Test.exe
test-db-start:
PGPORT=5678 PGDATA=/tmp/MonkeyWrench.Test/db/data/db/data pg_ctl start -w
test-db-stop:
-PGPORT=5678 PGDATA=/tmp/MonkeyWrench.Test/db/data/db/data pg_ctl stop
test-db-psql:
$(MAKE) test-db-start
-(PGPORT=5678 psql --user builder --db builder)
-$(MAKE) test-db-stop
test-web:
$(MAKE) test-db-start
-MONKEYWRENCH_CONFIG_FILE=/tmp/MonkeyWrench.Test/MonkeyWrench.xml MONO_OPTIONS=--debug xsp2 --port 8123 --root $(PWD) --applications /WebServices:$(PWD)/MonkeyWrench.Web.WebService/,/:$(PWD)/MonkeyWrench.Web.UI
#>> /tmp/MonkeyWrench.Test/xsp2.log 2>&1
-$(MAKE) test-db-stop