This repository has been archived by the owner on Oct 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
313 lines (276 loc) · 15.2 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
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
#####################################################################################
# File: Makefile
#
# Copyright (C) 2005-2012 Ollivier, Siso-Nadal, Swain et al.
#
# This program comes with ABSOLUTELY NO WARRANTY.
# This is free software, and you are welcome to redistribute it
# under certain conditions. See file LICENSE.TXT for details.
#
# Synopsys: Makefile for Facile application
#
#####################################################################################
do_nothing:
@echo "To make a tarball, try 'make tarball'"
@echo "To run all testcases, try 'make test'"
RELEASE = RELEASE_0V53
RELEASE_FILES = Makefile *.TXT ode_event.m *.pl modules/*.pm test/examples/*/*.eqn test/examples/*/*Script.m
TARBALL_DIR = facile_$(RELEASE)
tarball:
mkdir -p $(TARBALL_DIR)
cp --parents -p $(RELEASE_FILES) $(TARBALL_DIR)
rm -f $(TARBALL_DIR).tar.gz
tar -czf $(TARBALL_DIR).tar.gz $(TARBALL_DIR)
rm -rf $(TARBALL_DIR)
group = swainlab
read_permissions :
chmod 770 `pwd`
find . -type 'd' | xargs chmod 770
find . -name 'Makefile' | xargs chmod 440
find . -name '*.TXT' | xargs chmod 440
find . -name '*.pl' | xargs chmod 550
find . -name '*.pm' | xargs chmod 440
find . -name '*.eqn' | xargs chmod 440
find . -name '*.m' | xargs chmod 440
find . -name '*.ma' | xargs chmod 440
find . -name '*.c' | xargs chmod 440
find . -name '*.log' | xargs chmod 440
chgrp -R $(group) .
write_permissions :
chmod 770 `pwd`
find . -type 'd' | xargs chmod 770
find . -name 'Makefile' | xargs chmod 640
find . -name '*.TXT' | xargs chmod 640
find . -name '*.pl' | xargs chmod 750
find . -name '*.pm' | xargs chmod 640
find . -name '*.eqn' | xargs chmod 640
find . -name '*.m' | xargs chmod 640
find . -name '*.ma' | xargs chmod 640
find . -name '*.c' | xargs chmod 640
find . -name '*.log' | xargs chmod 640
chgrp -R $(group) .
module_tests = \
test/modules/Node.log \
test/modules/NodeList.log \
test/modules/Variable.log \
test/modules/VariableList.log \
test/modules/Reaction.log \
test/modules/ReactionList.log \
test/modules/Model.log \
test/modules/Expression.log \
general_tests = \
test/examples/testMatlab/testMatlab.log \
test/examples/testStoch/GTPase.log \
test/examples/testStoch/DynRates.log \
test/examples/repression/repression.log \
test/examples/michaelis_menten/michaelis_menten.log \
test/examples/poisson/poisson.log \
test/examples/config/config.log \
test/examples/steady_state/steady_state.log \
test/examples/steady_state/G437_I00.log \
test/examples/steady_state/G437_I43.log \
test/examples/sbml/michaelis_menten.log
auto_tests = \
test/examples/cornish/cornish.log \
test/examples/dimerization/dimerization.log \
test/examples/Markevich/Markevich.log \
test/examples/loop_and_chain/loop_and_chain.log \
test/examples/moiety_repeated_velocity/moiety_repeated_velocity.log \
test/examples/PKC/PKC.log \
test: test_modules test_general test_auto
test_modules : $(module_tests)
test_general : $(general_tests)
test_auto : $(auto_tests)
#-------------------------------------------------------------------------------------
# MODULE TESTS
#-------------------------------------------------------------------------------------
test/modules/%.log : FORCE
@echo "Running $* testcase..."
-rm -f test/modules/$*.log
-perl -Imodules -M$* -e '$*::run_testcases()' 2>&1 | tee -a test/modules/$*.log
-bzr diff $@
#-------------------------------------------------------------------------------------
# GENERAL FUNCTIONALITY TESTS
#-------------------------------------------------------------------------------------
test/examples/testMatlab/testMatlab.log : FORCE
cd $(@D); rm -f testMatlab.log testMatlabScript.log testMatlabDriver.m testMatlab_odes.m testMatlab_r.m testMatlab_s.m testMatlab.ma
./facile.pl -P -m -t 5.0 -k 1.0 -v "[t0 tf]" -o $(@D)/testMatlab $(@D)/testMatlab.eqn 2>&1 | tee -a $(@D)/testMatlab.log
@echo "***********************************************************************************************"
@echo "PLEASE VIEW MATLAB RESULTS, THEN TYPE EXIT AND INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
# cd $(@D); matlab -nodesktop -nosplash -logfile testMatlabScript.log -r testMatlabScript 2>&1 | tee -a testMatlab.log
-bzr diff $(@D)/testMatlab.log
-bzr diff $(@D)/testMatlabScript.log
-bzr diff $(@D)/testMatlabDriver.m
-bzr diff $(@D)/testMatlab_odes.m
-bzr diff $(@D)/testMatlab_r.m
-bzr diff $(@D)/testMatlab_s.m
./facile.pl -M -t 5.0 -k 1.0 -v "[t0 tf]" -o $(@D)/testMatlab $(@D)/testMatlab.eqn 2>&1 | tee -a $(@D)/testMatlab.log
-bzr diff $(@D)/testMatlab.ma
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/testMatlab/testMatlab_misc.log : FORCE
cd $(@D); rm -f testMatlab_misc.log testMatlab_miscScript.log testMatlab_miscDriver.m testMatlab_misc_odes.m testMatlab_misc_r.m testMatlab_misc_s.m
./facile.pl -m -o $(@D)/testMatlab_misc $(@D)/testMatlab_misc.eqn 2>&1 | tee -a $(@D)/testMatlab_misc.log
@echo "***********************************************************************************************"
@echo "PLEASE VIEW MATLAB RESULTS, THEN TYPE EXIT AND INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
# cd $(@D); matlab -nodesktop -nosplash -logfile testMatlab_miscScript.log -r testMatlab_miscScript 2>&1 | tee -a testMatlab_misc.log
-bzr diff $(@D)/testMatlab_misc.log
-bzr diff $(@D)/testMatlab_miscScript.log
-bzr diff $(@D)/testMatlab_miscDriver.m
-bzr diff $(@D)/testMatlab_misc_odes.m
-bzr diff $(@D)/testMatlab_misc_r.m
-bzr diff $(@D)/testMatlab_misc_s.m
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/steady_state/%.log : FORCE
cd $(@D); rm -f $*.log $*Script.log $*Driver.m $*_odes.m $*_r.m $*_s.m
./facile.pl -m -P -o $(@D)/$* $(@D)/$*.eqn 2>&1 | tee -a $(@D)/$*.log
@echo "***********************************************************************************************"
@echo "PLEASE VIEW MATLAB RESULTS, THEN TYPE EXIT AND INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
# cd $(@D); matlab -nodesktop -nosplash -logfile $*Script.log -r $*Script 2>&1 | tee -a $*.log
-bzr diff $(@D)/$*.log
-bzr diff $(@D)/$*Script.log
-bzr diff $(@D)/$*Driver.m
-bzr diff $(@D)/$*_odes.m
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/testStoch/GTPase.log : FORCE
cd $(@D); rm -f GTPase.log GTPase.seqn GTPase_convert.m
./facile.pl -s -o $(@D)/GTPase $(@D)/GTPase.eqn 2>&1 | tee -a $(@D)/GTPase.log
@echo "Please inspect differences in file output for problems."
-bzr diff $(@D)/GTPase.log
-bzr diff $(@D)/GTPase.seqn
-bzr diff $(@D)/GTPase_convert.m
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/testStoch/DynRates.log : FORCE
cd $(@D); rm -f DynRates.log DynRates.seqn DynRates_convert.m
./facile.pl -s -o $(@D)/DynRates $(@D)/DynRates.eqn 2>&1 | tee -a $(@D)/DynRates.log
@echo "Please inspect differences in file output for problems."
-bzr diff $(@D)/DynRates.log
-bzr diff $(@D)/DynRates.seqn
-bzr diff $(@D)/DynRates_convert.m
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/repression/repression.log : FORCE
cd $(@D); rm -f repression.log repression.seqn repression_convert.m
./facile.pl -s -o $(@D)/repression $(@D)/repression.eqn 2>&1 | tee -a $(@D)/repression.log
@echo "Please inspect differences in file output for problems."
-bzr diff $(@D)/repression.log
-bzr diff $(@D)/repression.seqn
-bzr diff $(@D)/repression_convert.m
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/michaelis_menten/michaelis_menten.log : FORCE
cd $(@D); rm -f michaelis_menten.log michaelis_menten.ma
./facile.pl -L $(@D)/michaelis_menten.eqn 2>&1 | tee -a $(@D)/michaelis_menten.log
./facile.pl -M $(@D)/michaelis_menten.eqn 2>&1 | tee -a $(@D)/michaelis_menten.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/michaelis_menten.log
-bzr diff $(@D)/michaelis_menten.ma
-bzr diff $(@D)/michaelis_menten.maple
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/poisson/poisson.log : FORCE
cd $(@D); rm -f poisson.log
./facile.pl -P --octave --solver=lsode --split --extern --factor $(@D)/poisson.eqn 2>&1 | tee -a $(@D)/poisson.log
cd $(@D); octave --interactive --persist poissonScript.m 2>&1 | tee -a poisson.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/poisson.log
-bzr diff $(@D)/poissonDriver.m
-bzr diff $(@D)/poisson_odes.m
-bzr diff $(@D)/poisson_ivals.m
-bzr diff $(@D)/poisson_rates.m
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/config/config.log : FORCE
cd $(@D); rm -f config.log configDriver.m config_odes.m config_ode_event.m config_r.m config_s.m
./facile.pl -m $(@D)/config.eqn --extern 2>&1 | tee -a $(@D)/config.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/config.log
-bzr diff $(@D)/configDriver.m
-bzr diff $(@D)/config_odes.m
-bzr diff $(@D)/config_ode_event.m
-bzr diff $(@D)/config_r.m
-bzr diff $(@D)/config_s.m
@echo "If there are no problems, you are now ready to commit source code and log files"
# AUTO/MOEITY TESTCASES
test/examples/cornish/cornish.log : FORCE
cd $(@D); rm -f cornish.log cornish.c cornish.ma
./facile.pl -a -o $(@D)/cornish $(@D)/cornish.eqn 2>&1 | tee -a $(@D)/cornish.log
./facile.pl $(@D)/cornish.eqn 2>&1 | tee -a $(@D)/cornish.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/cornish.log
-bzr diff $(@D)/cornish.c
-bzr diff $(@D)/cornish.ma
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/dimerization/dimerization.log : FORCE
cd $(@D); rm -f dimerization.log dimerization.c dimerization.ma
./facile.pl -a -o $(@D)/dimerization $(@D)/dimerization.eqn 2>&1 | tee -a $(@D)/dimerization.log
./facile.pl $(@D)/dimerization.eqn 2>&1 | tee -a $(@D)/dimerization.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/dimerization.log
-bzr diff $(@D)/dimerization.c
-bzr diff $(@D)/dimerization.ma
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/Markevich/Markevich.log : FORCE
cd $(@D); rm -f Markevich.log Markevich.c Markevich.ma
./facile.pl -a -o $(@D)/Markevich $(@D)/Markevich.eqn 2>&1 | tee -a $(@D)/Markevich.log
./facile.pl $(@D)/Markevich.eqn 2>&1 | tee -a $(@D)/Markevich.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/Markevich.log
-bzr diff $(@D)/Markevich.c
-bzr diff $(@D)/Markevich.ma
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/loop_and_chain/loop_and_chain.log : FORCE
cd $(@D); rm -f loop_and_chain.log loop_and_chain.c loop_and_chain.ma
./facile.pl -a -o $(@D)/loop_and_chain $(@D)/loop_and_chain.eqn 2>&1 | tee -a $(@D)/loop_and_chain.log
./facile.pl $(@D)/loop_and_chain.eqn 2>&1 | tee -a $(@D)/loop_and_chain.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/loop_and_chain.log
-bzr diff $(@D)/loop_and_chain.c
-bzr diff $(@D)/loop_and_chain.ma
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/moiety_repeated_velocity/moiety_repeated_velocity.log : FORCE
cd $(@D); rm -f moiety_repeated_velocity.log moiety_repeated_velocity.c moiety_repeated_velocity.ma
./facile.pl -a -o $(@D)/moiety_repeated_velocity $(@D)/moiety_repeated_velocity.eqn 2>&1 | tee -a $(@D)/moiety_repeated_velocity.log
./facile.pl $(@D)/moiety_repeated_velocity.eqn 2>&1 | tee -a $(@D)/moiety_repeated_velocity.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
@echo "WARNING: The reference C file is NOT correct"
-bzr diff $(@D)/moiety_repeated_velocity.log
-bzr diff $(@D)/moiety_repeated_velocity.c
-bzr diff $(@D)/moiety_repeated_velocity.ma
@echo "If there are no problems, you are now ready to commit source code and log files"
test/examples/PKC/PKC.log : FORCE
cd $(@D); rm -f PKC.log PKC.c PKC.ma
./facile.pl -a -o $(@D)/PKC $(@D)/PKC.eqn 2>&1 | tee -a $(@D)/PKC.log
./facile.pl $(@D)/PKC.eqn 2>&1 | tee -a $(@D)/PKC.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/PKC.log
-bzr diff $(@D)/PKC.c
-bzr diff $(@D)/PKC.ma
@echo "If there are no problems, you are now ready to commit source code and log files"
# SBML testcase
test/examples/sbml/michaelis_menten.log : FORCE
cd $(@D); rm -f michaelis_menten.log michaelis_menten.ma
./facile.pl -S $(@D)/michaelis_menten.eqn 2>&1 | tee -a $(@D)/michaelis_menten.log
@echo "***********************************************************************************************"
@echo "PLEASE INSPECT DIFFERENCES IN FILE OUTPUT FOR PROBLEMS."
@echo "***********************************************************************************************"
-bzr diff $(@D)/michaelis_menten.log
-bzr diff $(@D)/michaelis_menten.sbml
@echo "If there are no problems, you are now ready to commit source code and log files"
FORCE: