adding nonpb
[PsN.git] / Makefile
bloba9c8c8245d080e3ed6e754d77e51780171219fb2
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=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/mirror_plot_module.pm \
65 model/iofv_module.pm \
66 model/shrinkage_module.pm \
67 model/nonparametric_module.pm \
68 model/problem.pm \
69 model.pm \
70 tool.pm \
71 tool/modelfit.pm \
72 tool/llp.pm \
73 tool/cdd.pm \
74 tool/cdd/jackknife.pm \
75 tool/sse.pm \
76 tool/npc.pm \
77 tool/pind.pm \
78 tool/nonpb.pm \
79 tool/bootstrap.pm \
80 tool/scm/config_file.pm \
81 tool/scm.pm \
82 tool/xv_step.pm \
83 tool/xv.pm \
85 PERLFILES=$(addprefix lib/,$(LIBFILES))
87 RELFILES=$(addprefix PsN-Source/lib/,$(LIBFILES)) \
88 $(addprefix PsN-Source/, \
89 lib/PsN_template.pm \
90 lib/common_options.pm \
91 lib/psn.conf \
92 lib/OSspecific.pm \
93 lib/hotkey.pm \
94 lib/ext/Math/SigFigs.pm \
95 lib/ext/Math/MatrixReal.pm \
96 lib/ext/Statistics/Distributions.pm \
97 lib/ext/Parallel/ForkManager.pm \
98 lib/ext/Config/Tiny.pm \
99 lib/ext/Color/Output.pm \
100 lib/ext/File/HomeDir.pm \
101 lib/ext/IPC/Run3.pm \
102 lib/matlab/bca.m \
103 lib/matlab/histograms.m \
104 lib/matlab/profiles.m \
105 lib/R-scripts/llp.R \
106 lib/R-scripts/cdd.R \
107 lib/R-scripts/bootstrap.R \
108 bin/execute \
109 bin/cdd \
110 bin/mc_cdd \
111 bin/sse \
112 bin/pind \
113 bin/nonpb \
114 bin/npc \
115 bin/vpc \
116 bin/llp \
117 bin/scm \
118 bin/bootstrap \
119 bin/sumo \
120 bin/single_valued_columns \
121 bin/check_termination \
122 bin/create_extra_data_model \
123 bin/create_cont_model \
124 bin/create_cont_data \
125 bin/create_subsets \
126 bin/unwrap_data \
127 bin/data_stats \
128 bin/gam42toconf \
129 bin/se_of_eta \
130 bin/update_inits \
131 doc/SSE_userguide.pdf \
132 doc/NPC_VPC_userguide.pdf \
133 setup.pl \
134 README.txt )
136 GENFILES=$(addprefix libgen/,$(LIBFILES))
138 all: libgen $(PERLFILES)
140 .PRECIOUS: $(GENFILES)
142 libgen:
143 @ mkdir -p libgen
145 lib/%.pm: libgen/%.pm lib/%_subs.pm
146 @ cp libgen/$*.pm libgen/$*_temp.pm
147 @ $(FILLSCRIPT) libgen/$*_temp.pm lib/$*_subs.pm
148 @ cp libgen/$*_temp.pm $@
149 @ perl $(PERLDIRS) -I./$(@D) -I./lib -c $@ -W -t -T|| (rm $@ && false)
151 .PHONY : clean
153 clean:
154 @-rm -rf $(PERLFILES) $(DOCUMENTS) libgen PsN-Source
156 libgen/debug.pm : diagrams/debug.dia
157 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/debug.dia
159 libgen/ui.pm : diagrams/ui.dia
160 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/ui.dia
162 libgen/status_bar.pm : diagrams/status_bar.dia
163 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/status_bar.dia
165 libgen/nonmem.pm : diagrams/nonmem.dia
166 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/nonmem.dia
168 libgen/moshog_client.pm : diagrams/moshog_client.dia
169 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/moshog_client.dia
171 libgen/file.pm : diagrams/file.dia
172 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/file.dia
174 libgen/tool/modelfit.pm : diagrams/modelfit.dia
175 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/modelfit.dia
177 libgen/tool/llp.pm : diagrams/llp.dia
178 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/llp.dia
180 libgen/tool/cdd/jackknife.pm libgen/tool/cdd.pm : diagrams/cdd.dia
181 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/cdd.dia
183 libgen/tool/sse.pm : diagrams/sse.dia
184 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/sse.dia
186 libgen/tool/npc.pm : diagrams/npc.dia
187 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/npc.dia
189 libgen/tool/pind.pm : diagrams/pind.dia
190 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/pind.dia
192 libgen/tool/nonpb.pm : diagrams/nonpb.dia
193 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/nonpb.dia
195 libgen/tool/bootstrap.pm : diagrams/bootstrap.dia
196 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/bootstrap.dia
198 libgen/tool/scm/config_file.pm libgen/tool/scm.pm : diagrams/scm.dia
199 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/scm.dia
201 libgen/tool/xv_step.pm libgen/tool/xv.pm : diagrams/xv.dia
202 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/xv.dia
204 libgen/tool.pm : diagrams/tool.dia
205 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/tool.dia
207 libgen/table_file.pm libgen/extra_data.pm libgen/model%.pm : diagrams/model.dia
208 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/model.dia
210 libgen/output%.pm : diagrams/output.dia
211 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/output.dia
213 libgen/data%.pm : diagrams/data.dia
214 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/data.dia
216 libgen/grid/nordugrid/xrsl_file.pm : diagrams/xrsl_file.dia
217 $(DIA2CODE) -t perl -d $(DIRPM) diagrams/xrsl_file.dia
219 libgen/fcon.pm : diagrams/fcon.dia
220 $(DIA2CODE) -nd -t perl -d $(DIRPM) diagrams/fcon.dia
222 documents: $(DOCUMENTS)
224 $(addprefix html/bootstrap,$(HTML_STUBS)) : bin/bootstrap lib/common_options.pm
225 perl $< --help --html
227 $(addprefix html/cdd,$(HTML_STUBS)) : bin/cdd lib/common_options.pm
228 perl $< --help --html
230 $(addprefix html/execute,$(HTML_STUBS)) : bin/execute lib/common_options.pm
231 perl $< --help --html
233 $(addprefix html/llp,$(HTML_STUBS)) : bin/llp lib/common_options.pm
234 perl $< --help --html
236 $(addprefix html/scm,$(HTML_STUBS)) : bin/scm lib/common_options.pm
237 perl $< --help --html
240 release: libgen rel_dir $(RELFILES) documents
241 @ cp -ar modules/Math-Random \
242 modules/Math-Random-Win \
243 modules/Storable PsN-Source/modules
244 @ zip -r PsN-Source PsN-Source/
245 @ tar czf PsN-Source.tar.gz PsN-Source/
247 PsN-Source/setup.pl: bin/setup.pl
248 @ cp bin/setup.pl $@
250 PsN-Source/lib/matlab/% : matlab/%
251 @ cp matlab/$* $@
253 PsN-Source/lib/R-scripts/% : R-scripts/%
254 @ cp R-scripts/$* $@
256 PsN-Source/%: %
257 @ cp -ar $* $@
259 rel_dir:
260 @mkdir -p $(sort $(dir $(RELFILES))) PsN-Source/modules