-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.in
181 lines (149 loc) · 5.01 KB
/
Makefile.in
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#
# piLite Makefile
#
INSTALLDIR = <installdir>
HOMEDIR = <homedir>
################################
INSTALL = /usr/bin/install
SERVERDIR =server
CLIENTDIR =client
BINDIR =bin
LIBDIR =lib
EXAMPLESDIR =examples
PILITEWORKDIR = .piLite
PILITECONFDIR = conf
PILITE_CLIENT_BIN = \
pilot-job-cancel \
pilot-job-cleanup \
pilot-job-get-output \
pilot-job-list \
pilot-job-status \
pilot-job-submit \
pilot-job-get-monitor \
PILITE_CLIENT_LIB = \
PilotCheckParams.pm \
PILITE_CLIENT_CONF = \
pilite.conf \
PILITE_SERVER_BIN = \
job_cancel.pl \
job_cleanup.pl \
job_execute.pl \
job_prepare_dir.pl \
job_status.pl \
all: install-client
check-installdir:
@( if [ ! -d $(INSTALLDIR) ] ; then \
mkdir $(INSTALLDIR) ;\
echo " mkdir $(INSTALLDIR)" ;\
fi )
install-client-bin:
@echo "piLite client: installing binary files to directory: $(INSTALLDIR)/"
@( for file in $(PILITE_CLIENT_BIN) ; do \
$(INSTALL) -m 0755 $(CLIENTDIR)/$(BINDIR)/$$file $(INSTALLDIR)/ ;\
echo " $$file" ;\
done )
@echo "Done"
install-client-lib:
@echo "piLite client: installing lib files to directory: $(INSTALLDIR)/"
@( for file in $(PILITE_CLIENT_LIB) ; do \
$(INSTALL) -m 0644 $(CLIENTDIR)/$(LIBDIR)/$$file $(INSTALLDIR)/ ;\
echo " $$file" ;\
done )
@echo "Done"
install-client-conf:
@echo "piLite client: preparing working directory: $(HOMEDIR)/$(PILITEWORKDIR)"
@( if [ ! -d $(HOMEDIR)/$(PILITEWORKDIR) ] ; then \
mkdir $(HOMEDIR)/$(PILITEWORKDIR) ;\
echo " mkdir $(HOMEDIR)/$(PILITEWORKDIR)" ;\
fi )
@echo "Done"
@echo "piLite client: preparing conf directory: $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)"
@( if [ ! -d $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR) ] ; then \
mkdir $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR) ;\
echo " mkdir $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)" ;\
fi )
@echo "Done"
@echo "piLite client: installing conf files to directory: $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)"
@( for file in $(PILITE_CLIENT_CONF) ; do \
$(INSTALL) -m 0644 $(CLIENTDIR)/$(EXAMPLESDIR)/$$file $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)/ ;\
echo " $$file" ;\
done )
@echo "Done"
install-client: check-installdir install-client-bin install-client-lib install-client-conf
install: install-client
clean-client-bin:
@echo "piLite client: removing bin files:"
@( for file in $(PILITE_CLIENT_BIN) ; do \
if [ -e $(INSTALLDIR)/$$file ] ; then \
rm -f $(INSTALLDIR)/$$file ;\
echo " rm $(INSTALLDIR)/$$file" ;\
fi ;\
done )
@echo "Done"
clean-client-lib:
@echo "piLite client: removing lib files:"
@( for file in $(PILITE_CLIENT_LIB) ; do \
if [ -e $(INSTALLDIR)/$$file ] ; then \
rm -f $(INSTALLDIR)/$$file ;\
echo " rm $(INSTALLDIR)/$$file" ;\
fi ;\
done )
@echo "Done"
clean-client-conf:
@echo "piLite client: removing conf files:"
@( for file in $(PILITE_CLIENT_CONF) ; do \
if [ -e $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)/$$file ] ; then \
rm -f $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)/$$file ;\
echo " rm $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)/$$file" ;\
fi ;\
done )
@echo "Done"
clean-client-workdir:
@echo "piLite client: removing working directory: $(HOMEDIR)/$(PILITEWORKDIR)"
@( if [ -d $(HOMEDIR)/$(PILITEWORKDIR) ] ; then \
rm -rf $(HOMEDIR)/$(PILITEWORKDIR) ;\
echo " rm -r $(HOMEDIR)/$(PILITEWORKDIR)" ;\
fi )
@echo "Done"
clean-client-only-prog: clean-client-bin clean-client-lib
clean-client-all: clean-client-bin clean-client-lib clean-client-conf clean-client-workdir
clean-client: clean-client-only-prog
install-server-bin:
@echo "piLite server: installing binary files to directory: $(INSTALLDIR)"
@( for file in $(PILITE_SERVER_BIN) ; do \
$(INSTALL) -m 0755 $(SERVERDIR)/$(BINDIR)/$$file $(INSTALLDIR)/ ;\
echo " $$file" ;\
done )
@echo "Done"
install-server-workdir:
@echo "piLite server: preparing working directory: $(HOMEDIR)/$(PILITEWORKDIR)"
@( if [ ! -d $(HOMEDIR)/$(PILITEWORKDIR) ] ; then \
mkdir $(HOMEDIR)/$(PILITEWORKDIR) ;\
echo " mkdir $(HOMEDIR)/$(PILITEWORKDIR)" ;\
fi )
@echo "Done"
@echo "piLite server: preparing conf directory for logs: $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)"
@( if [ ! -d $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR) ] ; then \
mkdir $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR) ;\
echo " mkdir $(HOMEDIR)/$(PILITEWORKDIR)/$(PILITECONFDIR)" ;\
fi )
@echo "Done"
install-server: install-server-bin install-server-workdir
clean-server-workdir:
@echo "piLite server: removing working directory: $(HOMEDIR)/$(PILITEWORKDIR)"
@( if [ -d $(HOMEDIR)/$(PILITEWORKDIR) ] ; then \
rm -rf $(HOMEDIR)/$(PILITEWORKDIR) ;\
echo " rm -r $(HOMEDIR)/$(PILITEWORKDIR)" ;\
fi )
@echo "Done"
clean-server-only-prog:
@echo "piLite server: removing bin files:"
@( for file in $(PILITE_SERVER_BIN) ; do \
if [ -e $(INSTALLDIR)/$$file ] ; then \
rm -f $(INSTALLDIR)/$$file ;\
echo " rm $(INSTALLDIR)/$$file" ;\
fi ;\
done )
@echo "Done"
clean-server-all: clean-server-only-prog clean-server-workdir
clean-server: clean-server-only-prog