-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
95 lines (72 loc) · 2.42 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
#
# Copyright (c) 2013 Citrix Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
XUI=${DESTDIR}/usr/lib/xui
BUILT=built
IDL_GENSRC_DIR=${BUILT}/script/services
DOJO=dojo-1.7.12
RPCGEN=xc-rpcgen
IDLS= xenmgr.xml \
xenmgr_vm.xml \
xenmgr_host.xml \
vm_nic.xml \
vm_disk.xml \
input_daemon.xml \
ctxusb_daemon.xml \
xenvm.xml \
updatemgr.xml \
network.xml \
network_daemon.xml \
network_domain.xml \
xcpmd.xml
JS_SRC=$(shell find widgets -type f -print )
DIST_SRC=$(shell find dist -type f -print )
IDL_GENSRC=${IDLS:%.xml=${IDL_GENSRC_DIR}/%_client.js}
all: built.stamp
# to maintain compatability with the existing relative paths we run two directories down,
# we don't need this as we can run our dojo binary from anywhere.
built.stamp: build/xenclient.profile.js ${JS_SRC} ${IDL_GENSRC} ${DIST_SRC}
mkdir -p a/b/c
mkdir -p ${BUILT}
cp -dr dist/. ${BUILT}
rm -rf dist/lib
mkdir -p dist/lib
(cd a/b/c && ${DOJO} profile="../../../build/xenclient.profile.js" --release --bin java )
mkdir -p dist/lib
cp -dr dist/lib/. ${BUILT}/lib
rm -rf dist/lib
find ${BUILT} -name '*.uncompressed.js' -exec rm '{}' ';'
find ${BUILT} -name '*.commented.css' -exec rm '{}' ';'
touch $@
install:
install -m 0755 -d ${XUI}
cp -dr ${BUILT}/. ${XUI}
rm -rf ${XUI}/lib/citrix/common/templates
rm -rf ${XUI}/lib/citrix/xenclient/templates
# Remove unused themes
rm -rf ${XUI}/lib/dijit/themes/claro
rm -rf ${XUI}/lib/dijit/themes/nihilo
rm -rf ${XUI}/lib/dijit/themes/soria
rm -rf ${XUI}/lib/build-report.txt
clean:
rm -f built.stamp
rm -rf dist/lib
rm -rf ${BUILT}
${IDL_GENSRC_DIR}/%_client.js: ${STAGING_IDLDATADIR}/%.xml
mkdir -p ${IDL_GENSRC_DIR}
${RPCGEN} --templates-dir=${STAGING_RPCGENDATADIR_NATIVE} --javascript --client -o ${IDL_GENSRC_DIR} $< || rm -f $@