forked from MDSplus/mdsplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
237 lines (201 loc) · 5.69 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
#@(#)$RCSfile$ $Revision$
# @configure_input@
include @top_builddir@/Makefile.inc
srcdir=@srcdir@
builddir=@builddir@
VPATH=@srcdir@
# selfhelp target
@TARGET_SELFHELP@
HELP_DESCRIPTION = This is MDSplus build system, documented targets follow:
JAVA_APS = \
javamds \
javascope \
javatraverser \
javatraverser2 \
javatraverser2/java/mds/mdslib \
javadispatcher \
javadevices \
javaclient \
mdsobjects/java
MOTIF_APS = xmdsshr \
actions \
dwscope \
@IDLMDSWIDGETS@ \
mitdevices \
traverser
HDF5_APS = hdf5
D3D_PACKAGE = d3dshr
ifeq "@JAVA_ONLY@" "yes"
PARTS = javascope \
javatraverser \
javatraverser2 \
javadispatcher \
javadevices \
javaclient \
mdsobjects/java
else
PARTS = \
mdsshr \
treeshr \
tdishr \
tditest \
xtreeshr \
@MDSTCPIP@ \
mdslibidl \
mdsdcl \
@CAMSHR@ \
@REMCAM@ \
ccl \
servershr \
tcl \
@TDIC@ \
mdslib \
math \
wfevent \
setevent \
mdsmisc \
scripts \
rpm \
mdsobjects/cpp \
manpages \
@D3D_PACKAGE@ \
@JAVA_APS@ \
@MOTIF_APS@ \
@MDSSQL@ \
@IDLMDSEVENT@ \
@HDF5_APS@ \
@LV@ \
LabView \
@MACOSX@
@MINGW_TRUE@ PARTS += icons
@ENABLE_TESTS_TRUE@ PARTS += testing
endif
.PHONY: all $(PARTS)
all: ##@build build all active submodules
all: $(PARTS)
DIRECTORIES = $(sort @MAKEBINDIR@ @MAKELIBDIR@ @MAKESHLIBDIR@ @MAKEUIDDIR@)
$(PARTS): $(DIRECTORIES)
$(MAKE) -C $@
.PHONY: docs
docs: ##@docs build documentation using doxygen (ref to docs directory)
$(MAKE) -C docs install
clean_DIRS = $(addprefix clean_, $(PARTS))
.PHONY: clean
clean: ##@build recusively clean all built objects in submodules
clean: $(clean_DIRS) clean_TESTS clean_DOCS
.PHONY: $(clean_DIRS)
$(clean_DIRS):
$(MAKE) -C $(@:clean_%=%) clean
clean_DOCS: ##@docs clean generated documentation
$(MAKE) -C docs clean
.PHONY: distclean
distclean: ##@build make source directory look like original sources
@cpwd=$$(pwd); \
cd @top_srcdir@; \
if [ -r .git ]; \
then \
git clean -x -f -d -q; \
else \
if [ "$$(pwd)" == "$$cpwd" ]; \
then make full_clean > /dev/null; \
fi; \
rm -Rf ./mdsobjects/python/build; \
fi; \
cd $$cpwd
# Testing
.PHONY: tests
tests: ##@tests recursively perform tests in submodules
@ENABLE_TESTS_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -C testing all tests
@ENABLE_TESTS_FALSE@ @echo "Tests disabled"
.PHONY: tests-valgrind
tests-valgrind: ##@tests recursively perform tests using valgrind tool
@ENABLE_TESTS_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -C testing all tests-valgrind
@ENABLE_TESTS_FALSE@ @echo "Tests disabled"
.PHONY: $(clean_TESTS)
clean_TESTS: ##@tests clean all tests results and compiled tests objects
@ENABLE_TESTS_TRUE@ $(MAKE) -C testing tests-clean
.PHONY: full_clean
full_clean: ##@build perform deep clean of build directories
full_clean: clean
@rm -Rf bin bin64 bin32 bin_x86 bin_x86_64 etc \
lib lib64 lib32 java uid uid64 uid32 \
config.cache config.log config.status aclocal.m4 \
include/stamp-h1 autom4te.cache \
$$(find . -name '.deps') \
`find . -name '*.in' | \
$(AWK) '{print substr($$1,0,length($$1)-3)}'`
.PHONY: depend
depend:
cdir=`pwd`;\
set -e; for dir in $(PARTS) ; do\
cd $${dir}; $${MAKE:=make} depend > /dev/null 2> /dev/null; cd $$cdir;\
done
MISC_PARTS = tdi idl trees setup.sh setup.csh ChangeLog mdsplus.ico include mdsobjects/python desktop pixmaps matlab php epics xml
install_DIRS = $(addprefix install_, $(PARTS))
$(install_DIRS):
$(MAKE) -C $(@:install_%=%) install
.PHONY: install
install: ##@build build and install active modules to prefix directory
install: $(install_DIRS)
$(MKDIR_P) $(prefix)/local/tdi
$(MKDIR_P) $(prefix)/java
- find $(prefix)/java -name '*.class' -delete #### No need to include class files
tar -C ${top_srcdir} \
--exclude='.gitignore' \
--exclude='*.pyc' \
--exclude=__pycache__ \
--exclude=python/build \
--exclude=tdi/*Devices/build \
--exclude='*egg-info' \
--exclude='*\.in' \
--exclude='Makefile\.*' \
-cf - $(MISC_PARTS) | (cd $(exec_prefix); tar -xf -)
find . -name '_version\.py' -not -path "./$(realpath --relative-to=$(pwd) $(exec_prefix))/*" -exec cp {} $(exec_prefix)/{} \;
tar -C ${top_builddir} -cf - include/config.h | (cd $(exec_prefix); tar -xf -) ## TODO: remove this and config.h from headers ...
if [ ! -z "$$MDSPLUS_VERSION" ]; then echo "mdsplus_version='$$MDSPLUS_VERSION'" > $(exec_prefix)/mdsobjects/python/mdsplus_version.py; fi
$(INSTALL) ${top_srcdir}/MDSplus-License.txt ${top_srcdir}/MDSplus-License.rtf $(exec_prefix)
(cd $(exec_prefix); chmod -R 755 $(MISC_PARTS))
.PHONY: tests-envdump
tests-envdump:
cd mdsobjects/python/tests&&(\
make test-envdump;\
cd ../../..;)
test-env:
cd mdsobjects/python/tests&&(\
make test-env;\
cd ../../..;)
@HAVE_WINE_TRUE@wineconsole:
@HAVE_WINE_TRUE@ cd mdsobjects/python/tests&&(\
@HAVE_WINE_TRUE@ make wineconsole;\
@HAVE_WINE_TRUE@ cd ../../..;)
# Interdependent directories:
actions: mdsshr tdishr treeshr xmdsshr mdstcpip servershr
camshr: mdsdcl
ccl: camshr mdsshr mdsdcl
tcl: mdsshr treeshr tdishr mdstcpip servershr mdsdcl
dwscope: xmdsshr
javadevices: javatraverser
javadispatcher: javascope javatraverser
javamds: mdstcpip
javatraverser: javascope
math: mdsshr
mdsdcl: mdsshr
mdslib: mdstcpip
mdslibidl: tdishr
mdsmisc: tdishr xtreeshr
mdsobjects/cpp: mdstcpip
mdsobjects/java: javascope
mdstcpip: tdishr
mitdevices: mdsshr tdishr treeshr xmdsshr
remcam: mdstcpip
servershr: mdsdcl tdishr treeshr mdsshr mdstcpip
setevent: mdsshr
tdic: mdstcpip
tdishr: mdsshr treeshr
tditest: tdishr
traverser: xmdsshr
treeshr: mdsshr
wfevent: tdishr mdsshr
xmdsshr: tdishr
xtreeshr: tdishr
am--refresh: