forked from xerial/sqlite-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.package
117 lines (82 loc) · 3.61 KB
/
Makefile.package
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
RESOURCE_DIR=src/main/resources
NATIVE_DIR=$(RESOURCE_DIR)/native
RSYNC=rsync -av -e ssh --exclude=".svn"
WIN_SERVER=localhost
WIN_WORK=work/hg/sqlite-jdbc
WIN64_SERVER=localhost
WIN64_WORK=work/hg/sqlite-jdbc
MAC_SERVER=172.29.62.21
MAC_WORK=work/hg/sqlite-jdbc
MAC_TIGER_SERVER=172.16.153.128
MAC_TIGER_WORK=work/hg/sqlite-jdbc
LINUX_SERVER=hx02
LINUX_WORK=work/hg/sqlite-jdbc
AMD_SERVER=hx02
AMD_WORK=work/hg/sqlite-jdbc
BUILD_CMD = hg pull -u && make clean-native && make native
TEST_CMD = mvn test
all: compile test
.PHONY: compile test native clean
include VERSION
sqlite-version := sqlite-$(version)
LIB_DIR=target/dll/$(sqlite-version)
DLL_DIR=$(LIB_DIR)/native
DLL_WIN=$(DLL_DIR)/Windows/x86/sqlitejdbc.dll
DLL_WIN64=$(DLL_DIR)/Windows/amd64/sqlitejdbc.dll
DLL_MAC=$(DLL_DIR)/Mac/x86_64/libsqlitejdbc.jnilib
DLL_TIGER_MAC=$(DLL_DIR)/Mac/i386/libsqlitejdbc.jnilib
DLL_LINUX=$(DLL_DIR)/Linux/i386/libsqlitejdbc.so
DLL_AMD64=$(DLL_DIR)/Linux/amd64/libsqlitejdbc.so
LIB_PUREJAVA=$(LIB_DIR)/purejava/SQLite.class
$(LIB_PUREJAVA):
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(MAC_TIGER_WORK) && make purejava"
mkdir -p $(LIB_DIR)/purejava
scp $(MAC_TIGER_SERVER):./$(MAC_TIGER_WORK)/sqlitejdbc/build/org/sqlite/SQLite.class $(LIB_DIR)/purejava/
$(DLL_WIN):
ssh $(WIN_SERVER) "source .zprofile && cd $(WIN_WORK) && $(BUILD_CMD)"
mkdir -p $(DLL_DIR)/Windows
$(RSYNC) $(WIN_SERVER):./$(WIN_WORK)/$(DLL_DIR)/Windows/ $(DLL_DIR)/Windows/
$(DLL_WIN64):
ssh $(WIN64_SERVER) "source .zprofile && cd $(WIN64_WORK) && $(BUILD_CMD)"
mkdir -p $(DLL_DIR)/Windows
$(RSYNC) $(WIN64_SERVER):./$(WIN64_WORK)/$(DLL_DIR)/Windows/ $(DLL_DIR)/Windows/
$(DLL_MAC):
ssh $(MAC_SERVER) "source .zprofile && cd $(MAC_WORK) && $(BUILD_CMD)"
mkdir -p $(DLL_DIR)/Mac
$(RSYNC) $(MAC_SERVER):./$(MAC_WORK)/$(DLL_DIR)/Mac/ $(DLL_DIR)/Mac/
$(DLL_TIGER_MAC):
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(MAC_TIGER_WORK) && $(BUILD_CMD)"
mkdir -p $(DLL_DIR)/Mac
$(RSYNC) $(MAC_TIGER_SERVER):./$(MAC_TIGER_WORK)/$(DLL_DIR)/Mac/ $(DLL_DIR)/Mac/
$(DLL_LINUX):
ssh $(LINUX_SERVER) "source .zprofile && cd $(LINUX_WORK) && $(BUILD_CMD)"
mkdir -p $(DLL_DIR)/Linux/i386
$(RSYNC) $(LINUX_SERVER):./$(LINUX_WORK)/$(DLL_DIR)/Linux/i386/ $(DLL_DIR)/Linux/i386/
$(DLL_AMD64):
ssh $(AMD_SERVER) "source .zprofile && cd $(AMD_WORK) && $(BUILD_CMD)"
mkdir -p $(DLL_DIR)/Linux/amd64
$(RSYNC) $(AMD_SERVER):./$(AMD_WORK)/$(DLL_DIR)/Linux/amd64/ $(DLL_DIR)/Linux/amd64/
$(DLL_DIR):
mkdir -p $@
linux: $(DLL_LINUX) $(DLL_AMD64)
mac: $(DLL_MAC) $(DLL_TIGER_MAC)
native: $(DLL_DIR) $(DLL_WIN) $(DLL_WIN64) $(DLL_MAC) $(DLL_TIGER_MAC) $(DLL_LINUX) $(DLL_AMD64)
compile-native: native
cp -r $(DLL_DIR)/ $(RESOURCE_DIR)/native/
compile: compile-native $(LIB_PUREJAVA)
cp $(LIB_PUREJAVA) $(RESOURCE_DIR)/org/sqlite
test-native:
ssh $(WIN_SERVER) "source .zprofile && cd $(WIN_WORK) && $(TEST_CMD)"
ssh $(MAC_SERVER) "source .zprofile && cd $(MAC_WORK) && $(TEST_CMD)"
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(MAC_WORK) && $(TEST_CMD)"
ssh $(LINUX_SERVER) "source .zprofile && source /etc/profile.d/java.sh && cd $(LINUX_WORK) && $(TEST_CMD)"
ssh $(AMD_SERVER) "source .zprofile && cd $(AMD_WORK) && $(TEST_CMD)"
test:
ssh $(MAC_TIGER_SERVER) "source .zprofile && cd $(MAC_WORK) && $(TEST_CMD) -DargLine='-Dsqlite.purejava=true'"
release:
mvn release:prepare
mvn release:perform
release-xerial:
mvn release:perform -Dtag=sqlite-jdbc-$(version)
release-sourceforge:
mvn release:perform -Darguments="-P sourceforge" -Dtag=sqlite-jdbc-$(version)