-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Makefile
141 lines (116 loc) · 6.51 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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
VERSION = $(shell git describe --abbrev=0 --tags)
GITREV = $(shell git describe --tags)
all: clean stripdb full enUS koKR frFR deDE zhCN esES ruRU full-tbc enUS-tbc koKR-tbc frFR-tbc deDE-tbc zhCN-tbc esES-tbc ruRU-tbc full-wotlk enUS-wotlk koKR-wotlk frFR-wotlk deDE-wotlk zhCN-wotlk esES-wotlk ruRU-wotlk
clean:
rm -rfv release
stripdb:
toolbox/compressdb.sh
full:
$(eval LOCALE := $(shell echo $@))
@echo "===== building ${LOCALE} ====="
mkdir -p release/$@/pfQuest/
cp -rf compat db img init *.toc *.lua LICENSE README.md release/$@/pfQuest/
# generate new toc file
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest/pfQuest.toc
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest/pfQuest-tbc.toc
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest/pfQuest-wotlk.toc
echo $(GITREV) > release/$@/pfQuest/gitrev.txt
# remove tbc data
find release/$@/pfQuest -name "*-tbc*" -exec rm {} \;
( cd release/$@; zip -qr ../[email protected] pfQuest )
full-tbc:
$(eval LOCALE := $(shell echo $@))
@echo "===== building ${LOCALE} ====="
mkdir -p release/$@/pfQuest-tbc/
cp -rf compat db img init *.toc *.lua LICENSE README.md release/$@/pfQuest-tbc/
# generate new toc file
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest-tbc/pfQuest.toc
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest-tbc/pfQuest-tbc.toc
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest-tbc/pfQuest-wotlk.toc
echo $(GITREV) > release/$@/pfQuest-tbc/gitrev.txt
( cd release/$@; zip -qr ../[email protected] pfQuest-tbc )
full-wotlk:
$(eval LOCALE := $(shell echo $@))
@echo "===== building ${LOCALE} ====="
mkdir -p release/$@/pfQuest-wotlk/
cp -rf compat db img init *.toc *.lua LICENSE README.md release/$@/pfQuest-wotlk/
# generate new toc file
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest-wotlk/pfQuest.toc
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest-wotlk/pfQuest-tbc.toc
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
echo $(GITREV) > release/$@/pfQuest-wotlk/gitrev.txt
( cd release/$@; zip -qr ../[email protected] pfQuest-wotlk )
enUS koKR frFR deDE zhCN esES ruRU:
$(eval LOCALE := $(shell echo $@))
@echo "===== building ${LOCALE} ====="
mkdir -p release/$@/pfQuest/init release/$@/pfQuest/db/enUS release/$@/pfQuest/db/${LOCALE}
cp -rf compat img release/$@/pfQuest/
cp -f $(shell ls db/*.lua | grep -v "\-tbc") release/$@/pfQuest/db
cp -f $(shell ls db/enUS/*.lua | grep -v "\-tbc") release/$@/pfQuest/db/enUS
cp -f $(shell ls db/${LOCALE}/*.lua | grep -v "\-tbc") release/$@/pfQuest/db/${LOCALE}
cp -f *.lua LICENSE README.md release/$@/pfQuest/
cp -f init/addon.xml init/data.xml init/enUS.xml init/${LOCALE}.xml release/$@/pfQuest/init
cp -f pfQuest.toc release/$@/pfQuest/pfQuest.toc
# generate new toc file
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest/pfQuest.toc
sed -i '/init\\/d' release/$@/pfQuest/pfQuest.toc
sed -i '/^[[:space:]]*$$/d' release/$@/pfQuest/pfQuest.toc
/bin/echo 'init\data.xml' >> release/$@/pfQuest/pfQuest.toc
/bin/echo 'init\enUS.xml' >> release/$@/pfQuest/pfQuest.toc
/bin/echo 'init\$(LOCALE).xml' >> release/$@/pfQuest/pfQuest.toc
/bin/echo 'init\addon.xml' >> release/$@/pfQuest/pfQuest.toc
echo $(GITREV) > release/$@/pfQuest/gitrev.txt
( cd release/$@; zip -qr ../[email protected] pfQuest )
enUS-tbc koKR-tbc frFR-tbc deDE-tbc zhCN-tbc esES-tbc ruRU-tbc:
$(eval LOCALE := $(shell echo $@ | sed 's/-tbc//g'))
@echo "===== building ${LOCALE} ====="
mkdir -p release/$@/pfQuest-tbc/init release/$@/pfQuest-tbc/db/enUS release/$@/pfQuest-tbc/db/${LOCALE}
cp -rf compat img release/$@/pfQuest-tbc/
cp -f $(shell ls db/*.lua) release/$@/pfQuest-tbc/db
cp -f $(shell ls db/enUS/*.lua) release/$@/pfQuest-tbc/db/enUS
cp -f $(shell ls db/${LOCALE}/*.lua) release/$@/pfQuest-tbc/db/${LOCALE}
cp -f *.lua LICENSE README.md release/$@/pfQuest-tbc/
cp -f init/addon.xml init/data.xml init/data-tbc.xml init/enUS.xml init/enUS-tbc.xml init/${LOCALE}.xml init/${LOCALE}-tbc.xml release/$@/pfQuest-tbc/init
cp -f pfQuest-tbc.toc release/$@/pfQuest-tbc/pfQuest-tbc.toc
# generate new toc file
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest-tbc/pfQuest-tbc.toc
sed -i '/init\\/d' release/$@/pfQuest-tbc/pfQuest-tbc.toc
sed -i '/^[[:space:]]*$$/d' release/$@/pfQuest-tbc/pfQuest-tbc.toc
/bin/echo 'init\data.xml' >> release/$@/pfQuest-tbc/pfQuest-tbc.toc
/bin/echo 'init\data-tbc.xml' >> release/$@/pfQuest-tbc/pfQuest-tbc.toc
/bin/echo 'init\enUS.xml' >> release/$@/pfQuest-tbc/pfQuest-tbc.toc
/bin/echo 'init\enUS-tbc.xml' >> release/$@/pfQuest-tbc/pfQuest-tbc.toc
/bin/echo 'init\$(LOCALE).xml' >> release/$@/pfQuest-tbc/pfQuest-tbc.toc
/bin/echo 'init\${LOCALE}-tbc.xml' >> release/$@/pfQuest-tbc/pfQuest-tbc.toc
/bin/echo 'init\addon.xml' >> release/$@/pfQuest-tbc/pfQuest-tbc.toc
echo $(GITREV) > release/$@/pfQuest-tbc/gitrev.txt
( cd release/$@; zip -qr ../[email protected] pfQuest-tbc )
enUS-wotlk koKR-wotlk frFR-wotlk deDE-wotlk zhCN-wotlk esES-wotlk ruRU-wotlk:
$(eval LOCALE := $(shell echo $@ | sed 's/-wotlk//g'))
@echo "===== building ${LOCALE} ====="
mkdir -p release/$@/pfQuest-wotlk/init release/$@/pfQuest-wotlk/db/enUS release/$@/pfQuest-wotlk/db/${LOCALE}
cp -rf compat img release/$@/pfQuest-wotlk/
cp -f $(shell ls db/*.lua) release/$@/pfQuest-wotlk/db
cp -f $(shell ls db/enUS/*.lua) release/$@/pfQuest-wotlk/db/enUS
cp -f $(shell ls db/${LOCALE}/*.lua) release/$@/pfQuest-wotlk/db/${LOCALE}
cp -f *.lua LICENSE README.md release/$@/pfQuest-wotlk/
cp -f init/addon.xml init/data.xml init/data-tbc.xml init/enUS.xml init/enUS-tbc.xml init/${LOCALE}.xml init/${LOCALE}-tbc.xml release/$@/pfQuest-wotlk/init
cp -f pfQuest-wotlk.toc release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
# generate new toc file
sed -i "s/GIT/$(VERSION)/g" release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
sed -i '/init\\/d' release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
sed -i '/^[[:space:]]*$$/d' release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
/bin/echo 'init\data.xml' >> release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
/bin/echo 'init\data-tbc.xml' >> release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
/bin/echo 'init\enUS.xml' >> release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
/bin/echo 'init\enUS-tbc.xml' >> release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
/bin/echo 'init\$(LOCALE).xml' >> release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
/bin/echo 'init\${LOCALE}-tbc.xml' >> release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
/bin/echo 'init\addon.xml' >> release/$@/pfQuest-wotlk/pfQuest-wotlk.toc
echo $(GITREV) > release/$@/pfQuest-wotlk/gitrev.txt
( cd release/$@; zip -qr ../[email protected] pfQuest-wotlk )
database:
$(MAKE) -C toolbox/ all
rebuild: database all
locales:
toolbox/find_locales.sh