Removed Parallel::Forkmanager in modelfit
[PsN.git] / Makefile
blob28574f65317125c8ab367bd43ee823456f9e6cd6
1 DIAGRAMS=llp.dia tool.dia model.dia output.dia data.dia xrsl_file.dia fcon.dia nonmem.dia moshog_client.dia
3 DIAGRAMS=$(addprefix diagrams/,$(DIAGRAMS))
5 BIN=bootstrap cdd execute llp scm
7 HTML_STUBS=_synopsis.php _description.php _options.php _examples.php
9 DOCUMENTS=$(foreach pre,$(BIN),$(foreach suff,$(HTML_STUBS),$(addprefix html/$(pre),$(suff))))
11 DIA2CODE=/home/pontus/code/dia2code/dia2code/dia2code
12 FILLSCRIPT=perl ./bin/fill_diacode.pl
13 DIRPM=libgen/
14 DIRSUBS=lib/
15 PERLDIRS=-I/home/pontus/perl
16 LIBFILES=debug.pm \
17 ui.pm \
18 status_bar.pm \
19 nonmem.pm \
20 moshog_client.pm \
21 file.pm \
22 data/individual.pm \
23 data.pm \
24 output/problem/subproblem.pm \
25 output/problem.pm \
26 output.pm \
27 grid/nordugrid/xrsl_file.pm \
28 fcon.pm \
29 table_file.pm \
30 extra_data.pm \
31 model/problem/record/option.pm \
32 model/problem/record/init_option.pm \
33 model/problem/record/theta_option.pm \
34 model/problem/record.pm \
35 model/problem/code_record.pm \
36 model/problem/init_record.pm \
37 model/problem/abbreviated.pm \
38 model/problem/aes.pm \
39 model/problem/aesinit.pm \
40 model/problem/contr.pm \
41 model/problem/covariance.pm \
42 model/problem/data.pm \
43 model/problem/des.pm \
44 model/problem/error.pm \
45 model/problem/estimation.pm \
46 model/problem/infn.pm \
47 model/problem/input.pm \
48 model/problem/msfi.pm \
49 model/problem/mix.pm \
50 model/problem/model.pm \
51 model/problem/nonparametric.pm \
52 model/problem/omega.pm \
53 model/problem/pk.pm \
54 model/problem/problem.pm \
55 model/problem/pred.pm \
56 model/problem/scatter.pm \
57 model/problem/sigma.pm \
58 model/problem/simulation.pm \
59 model/problem/subroutine.pm \
60 model/problem/table.pm \
61 model/problem/theta.pm \
62 model/problem/tol.pm \
63 model/cwres_module.pm \
64 model/problem.pm \
65 model/shrinkage_module.pm \
66 model/nonparametric_module.pm \
67 model.pm \
68 tool.pm \
69 tool/modelfit.pm \
70 tool/llp.pm \
71 tool/cdd.pm \
72 tool/cdd/jackknife.pm \
73 tool/mc.pm \
74 tool/bootstrap.pm \
75 tool/scm/config_file.pm \
76 tool/scm.pm \
77 tool/xv_step.pm \
78 tool/xv.pm \
80 PERLFILES=$(addprefix lib/,$(LIBFILES))
82 RELFILES=$(addprefix PsN-Source/lib/,$(LIBFILES)) \
83 $(addprefix PsN-Source/, \
84 lib/PsN_template.pm \
85 lib/common_options.pm \
86 lib/psn.conf \
87 lib/OSspecific.pm \
88 lib/hotkey.pm \
89 lib/ext/Math/SigFigs.pm \
90 lib/ext/Math/MatrixReal.pm \
91 lib/ext/Statistics/Distributions.pm \
92 lib/ext/Parallel/ForkManager.pm \
93 lib/ext/Config/Tiny.pm \
94 lib/ext/Color/Output.pm \
95 lib/ext/File/HomeDir.pm \
96 lib/ext/IPC/Run3.pm \
97 lib/matlab/bca.m \
98 lib/matlab/histograms.m \
99 lib/matlab/profiles.m \
100 lib/R-scripts/llp.R \
101 lib/R-scripts/cdd.R \
102 lib/R-scripts/bootstrap.R \
103 bin/execute \
104 bin/cdd \
105 bin/mc_cdd \
106 bin/mcs \
107 bin/llp \
108 bin/scm \
109 bin/bootstrap \
110 bin/sumo \
111 bin/single_valued_columns \
112 bin/check_termination \
113 bin/create_extra_data_model \
114 bin/create_cont_model \
115 bin/create_cont_data \
116 bin/create_subsets \
117 bin/unwrap_data \
118 bin/data_stats \
119 bin/gam42toconf \
120 setup.pl \
121 README.txt )
123 GENFILES=$(addprefix libgen/,$(LIBFILES))
125 all: libgen $(PERLFILES)
127 .PRECIOUS: $(GENFILES)
129 libgen:
130 @ mkdir -p libgen
132 lib/%.pm: libgen/%.pm lib/%_subs.pm
133 @ cp libgen/$*.pm libgen/$*_temp.pm
134 @ $(FILLSCRIPT) libgen/$*_temp.pm lib/$*_subs.pm
135 @ cp libgen/$*_temp.pm $@
136 @ perl $(PERLDIRS) -I./$(@D) -I./lib -c $@ -W -t -T|| (rm $@ && false)
138 .PHONY : clean
140 clean:
141 @-rm -rf $(PERLFILES) $(DOCUMENTS) libgen PsN-Source
143 libgen/debug.pm : diagrams/debug.dia
144 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/debug.dia
146 libgen/ui.pm : diagrams/ui.dia
147 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/ui.dia
149 libgen/status_bar.pm : diagrams/status_bar.dia
150 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/status_bar.dia
152 libgen/nonmem.pm : diagrams/nonmem.dia
153 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/nonmem.dia
155 libgen/moshog_client.pm : diagrams/moshog_client.dia
156 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/moshog_client.dia
158 libgen/file.pm : diagrams/file.dia
159 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/file.dia
161 libgen/tool/modelfit.pm : diagrams/modelfit.dia
162 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/modelfit.dia
164 libgen/tool/llp.pm : diagrams/llp.dia
165 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/llp.dia
167 libgen/tool/cdd/jackknife.pm libgen/tool/cdd.pm : diagrams/cdd.dia
168 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/cdd.dia
170 libgen/tool/mc.pm : diagrams/mc.dia
171 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/mc.dia
173 libgen/tool/bootstrap.pm : diagrams/bootstrap.dia
174 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/bootstrap.dia
176 libgen/tool/scm/config_file.pm libgen/tool/scm.pm : diagrams/scm.dia
177 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/scm.dia
179 libgen/tool/xv_step.pm libgen/tool/xv.pm : diagrams/xv.dia
180 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/xv.dia
182 libgen/tool.pm : diagrams/tool.dia
183 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/tool.dia
185 libgen/table_file.pm libgen/extra_data.pm libgen/model%.pm : diagrams/model.dia
186 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/model.dia
188 libgen/output%.pm : diagrams/output.dia
189 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/output.dia
191 libgen/data%.pm : diagrams/data.dia
192 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/data.dia
194 libgen/grid/nordugrid/xrsl_file.pm : diagrams/xrsl_file.dia
195 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/xrsl_file.dia
197 libgen/fcon.pm : diagrams/fcon.dia
198 $(DIA2CODE) -nd -t perl -d $(DIRPM) diagrams/fcon.dia
200 documents: $(DOCUMENTS)
202 $(addprefix html/bootstrap,$(HTML_STUBS)) : bin/bootstrap lib/common_options.pm
203 $< --help --html
205 $(addprefix html/cdd,$(HTML_STUBS)) : bin/cdd lib/common_options.pm
206 $< --help --html
208 $(addprefix html/execute,$(HTML_STUBS)) : bin/execute lib/common_options.pm
209 $< --help --html
211 $(addprefix html/llp,$(HTML_STUBS)) : bin/llp lib/common_options.pm
212 $< --help --html
214 $(addprefix html/scm,$(HTML_STUBS)) : bin/scm lib/common_options.pm
215 $< --help --html
218 release: libgen rel_dir $(RELFILES) documents
219 @ cp -ar modules/Math-Random \
220 modules/Math-Random-Win \
221 modules/Storable PsN-Source/modules
222 @ zip -r PsN-Source PsN-Source/
223 @ tar czf PsN-Source.tar.gz PsN-Source/
225 PsN-Source/setup.pl: bin/setup.pl
226 @ cp bin/setup.pl $@
228 PsN-Source/lib/matlab/% : matlab/%
229 @ cp matlab/$* $@
231 PsN-Source/lib/R-scripts/% : R-scripts/%
232 @ cp R-scripts/$* $@
234 PsN-Source/%: %
235 @ cp -ar $* $@
237 rel_dir:
238 @mkdir -p $(sort $(dir $(RELFILES))) PsN-Source/modules