Skip to content
This repository
Newer
Older
100644 729 lines (569 sloc) 20.556 kb
8634b74a »
2010-09-22 initial import into fresh git repo.
1 #############################################################################
2 # Configuration section
3 #############################################################################
4
5 -include Makefile.config
6
7 ##############################################################################
8 # Variables
9 ##############################################################################
10 TOP=$(shell pwd)
11
12 SRC=test.ml main.ml
13
14 TARGET=pfff
15
16 #------------------------------------------------------------------------------
17 # Program related variables
18 #------------------------------------------------------------------------------
19
20 PROGS=pfff
21
22 PROGS+=sgrep
23 PROGS+=spatch
e8fac8d2 »
2010-11-05 renamed main_tags.ml
24 PROGS+=stags
7966cbd7 »
2011-09-02 * lang_ml/analyze/graph_modules_packages_ml.ml: new file, also main_p…
25 PROGS+=pm_depend
26
8634b74a »
2010-09-22 initial import into fresh git repo.
27 PROGS+=ppp
28
a5fa1c61 »
2010-12-02 update Makefile and readme for new pfff_db_heavy
29 # note that without bdb, pfff_db will be incomplete regarding PHP
30 PROGS+=pfff_db
8634b74a »
2010-09-22 initial import into fresh git repo.
31 PROGS+=scheck
32
1b506a9f »
2010-11-30 added main_test.ml to run the unit tests
33 PROGS+=pfff_test
34
685c0048 »
2010-10-02 putting back support for persistent berkeley DB
35 ifeq ($(FEATURE_BDB), 1)
a5fa1c61 »
2010-12-02 update Makefile and readme for new pfff_db_heavy
36 PROGS+=pfff_db_heavy
9efc1da8 »
2010-12-02 introduce scheck_heavy
37 PROGS+=scheck_heavy
685c0048 »
2010-10-02 putting back support for persistent berkeley DB
38 endif
39
8634b74a »
2010-09-22 initial import into fresh git repo.
40 ifeq ($(FEATURE_VISUAL), 1)
6dea9bd9 »
2010-11-06 rename pfff_visual in CodeMap and worked on the toc of the codemap ma…
41 PROGS+=codemap
8634b74a »
2010-09-22 initial import into fresh git repo.
42 endif
43
44 OPTPROGS= $(PROGS:=.opt)
45
46 #------------------------------------------------------------------------------
47 #package dependencies
48 #------------------------------------------------------------------------------
49
50 #format: XXXDIR, XXXCMD, XXXCMDOPT, XXXINCLUDE (if different XXXDIR), XXXCMA
51 #template:
52 # ifeq ($(FEATURE_XXX), 1)
53 # XXXDIR=xxx
54 # XXXCMD= $(MAKE) -C xxx && $(MAKE) xxx -C commons
55 # XXXCMDOPT= $(MAKE) -C xxx && $(MAKE) xxx.opt -C commons
56 # XXXCMA=xxx/xxx.cma commons/commons_xxx.cma
57 # XXXSYSCMA=xxx.cma
58 # XXXINCLUDE=xxx
59 # else
60 # XXXCMD=
61 # XXXCMDOPT=
62 # endif
63
64
a5fa1c61 »
2010-12-02 update Makefile and readme for new pfff_db_heavy
65 # cf also below for target pfff_db_heavy
8634b74a »
2010-09-22 initial import into fresh git repo.
66 ifeq ($(FEATURE_BDB), 1)
67 BDBDIR=external/ocamlbdb
68 BDBCMD= $(MAKE) all -C $(BDBDIR) && $(MAKE) bdb -C commons
69 BDBCMDOPT= $(MAKE) all.opt -C $(BDBDIR) && $(MAKE) bdb.opt -C commons
70 BDBCMA=external/ocamlbdb/bdb.cma commons/commons_bdb.cma
71 BDBSYSCMA=
72 else
73 endif
74
75 # cf also below the target for pfff_browser
76 ifeq ($(FEATURE_GUI),1)
26cc32a0 »
2010-09-23 Makefiles and configure: make cairo+gtk the default.
77 GUIDIR=external/ocamlgtk
78 GUICMD= $(MAKE) all -C $(GUIDIR) && $(MAKE) gui -C commons
79 GUICMDOPT= $(MAKE) opt -C $(GUIDIR) && $(MAKE) gui.opt -C commons;
80 GTKINCLUDE=external/ocamlgtk/src
81 endif
82
83 # cf also below for target pfff_visual
84 ifeq ($(FEATURE_VISUAL),1)
85 CAIRODIR=external/ocamlcairo
86 CAIROINCLUDE=external/ocamlcairo/src
8634b74a »
2010-09-22 initial import into fresh git repo.
87 endif
88
89 ifeq ($(FEATURE_BACKTRACE), 1)
90 BTCMD= $(MAKE) backtrace -C commons
91 BTCMDOPT= $(MAKE) backtrace.opt -C commons
92 BTCMA=commons/commons_backtrace.cma
93 else
94 endif
95
96 ifeq ($(FEATURE_PCRE), 1)
97 REGEXPDIR=external/ocamlpcre
98 REGEXPCMD= $(MAKE) -C $(REGEXPDIR) && $(MAKE) regexp -C commons
99 REGEXPCMDOPT= $(MAKE) -C $(REGEXPDIR) && $(MAKE) regexp.opt -C commons
100 REGEXPCMA=external/ocamlpcre/lib/pcre.cma commons/commons_regexp.cma
26cc32a0 »
2010-09-23 Makefiles and configure: make cairo+gtk the default.
101 PCREINCLUDE=external/ocamlpcre/lib
8634b74a »
2010-09-22 initial import into fresh git repo.
102 else
103 endif
104
105 ifeq ($(FEATURE_MPI),1)
106 MPIDIR=external/ocamlmpi
107 MPICMD= $(MAKE) all -C $(MPIDIR) && $(MAKE) distribution -C commons
108 MPICMDOPT= $(MAKE) all.opt -C $(MPIDIR) && $(MAKE) distribution.opt -C commons
109 MPICMA=external/ocamlmpi/mpi.cma commons/commons_mpi.cma
110 endif
111
112 #------------------------------------------------------------------------------
113
114 # should be FEATURE_OCAMLGRAPH, or should give dependencies between features
115 GRAPHCMA=external/ocamlgraph/ocamlgraph.cma commons/commons_graph.cma
116 GRAPHDIR=external/ocamlgraph
117 GRAPHCMD= $(MAKE) all -C $(GRAPHDIR) && $(MAKE) graph -C commons
118 GRAPHCMDOPT= $(MAKE) all.opt -C $(GRAPHDIR) && $(MAKE) graph.opt -C commons
3d099fe6 »
2010-09-25 removed some dependencies to ocamlbdb
119
2d8dff7d »
2010-10-02 Makefile: compiling ocamlthrift
120 # for the moment it's used only by facebook/ code so could move in
121 # facebook/external/
122 THRIFTDIR=external/ocamlthrift
8634b74a »
2010-09-22 initial import into fresh git repo.
123
81bbf50c »
2011-02-23 adding lang_html/parsing/, and integrate ocamlnet in compilation chain
124 # could be under some ifeq($(FEATURE_WEB))
125 OCAMLNETDIR=external/ocamlnet
dbdffae0 »
2011-02-23 Makefiles, misc
126 OCAMLNETINCLUDE=external/ocamlnet/netsys external/ocamlnet/netstring
127 OCAMLNETCMA= \
128 external/ocamlnet/netsys/netsys_oothr.cma \
129 external/ocamlnet/netsys/netsys.cma \
130 external/ocamlnet/netstring/netstring.cma \
131
ab6a96e9 »
2011-02-23 make opt now works again
132 # external/ocamlnet/netstring/netaccel.cma \
133
8bf36daa »
2011-09-06 pm_depend now use phylomel, test
134 PHYLOMELDIR=external/phylomel/src
135 PHYLOMELINCLUDE=external/phylomel/src
136 PHYLOMELCMA=external/phylomel/src/lib.cma
137
81bbf50c »
2011-02-23 adding lang_html/parsing/, and integrate ocamlnet in compilation chain
138
8634b74a »
2010-09-22 initial import into fresh git repo.
139 ifeq ($(FEATURE_GRAPHICS), 1)
140 #GRAPHICSCMXA=graphics.cmxa
141 endif
142
26cc32a0 »
2010-09-23 Makefiles and configure: make cairo+gtk the default.
143 ifeq ($(FEATURE_VISUAL),1)
144 VISUALDIR=visual
145 endif
8634b74a »
2010-09-22 initial import into fresh git repo.
146
2f1bfadc »
2010-09-27 misc
147 ifeq ($(FEATURE_FACEBOOK),1)
148 FACEBOOKDIR=facebook
149 endif
150
8634b74a »
2010-09-22 initial import into fresh git repo.
151 #------------------------------------------------------------------------------
152 # Main variables
153 #------------------------------------------------------------------------------
154 SYSLIBS=nums.cma bigarray.cma str.cma unix.cma
155
156 # used for sgrep and other small utilities which I dont want to depend
3d099fe6 »
2010-09-25 removed some dependencies to ocamlbdb
157 # on too much things
8634b74a »
2010-09-22 initial import into fresh git repo.
158 BASICLIBS=commons/commons.cma \
159 globals/globals.cma \
160 h_program-lang/lib.cma \
161 lang_ml/parsing/lib.cma \
ca330f98 »
2010-09-25 Makefiles: adding lang_nw/
162 lang_nw/parsing/lib.cma \
8634b74a »
2010-09-22 initial import into fresh git repo.
163 lang_php/parsing/lib.cma \
164 lang_php/matcher/lib.cma \
c7092a9d »
2011-03-05 add skeleton for lang_css/parsing/
165 lang_cpp/parsing/lib.cma \
9919d5b9 »
2010-09-26 adding lang_java/ to help visualize java code
166 lang_java/parsing/lib.cma \
244ff047 »
2010-11-13 lang_python: first skeleton
167 lang_python/parsing/lib.cma \
58edd373 »
2010-11-14 lang_csharp: parser and basic highlighter
168 lang_csharp/parsing/lib.cma \
30b92d96 »
2011-01-22 erlang: basic lexer
169 lang_erlang/parsing/lib.cma \
81bbf50c »
2011-02-23 adding lang_html/parsing/, and integrate ocamlnet in compilation chain
170 lang_html/parsing/lib.cma \
c7092a9d »
2011-03-05 add skeleton for lang_css/parsing/
171 lang_js/parsing/lib.cma \
172 lang_css/parsing/lib.cma \
e241606e »
2011-03-06 lang_web: empty -dump_web
173 lang_web/parsing/lib.cma \
49aefcef »
2011-02-08 org_mode: parsing support and skeleton for codemap
174 lang_text/lib.cma \
8634b74a »
2010-09-22 initial import into fresh git repo.
175
176 BASICSYSLIBS=nums.cma bigarray.cma str.cma unix.cma
177
178 LIBS= commons/commons.cma \
179 $(BTCMA) \
180 $(BDBCMA) \
181 $(REGEXPCMA) \
182 $(MPICMA) \
81bbf50c »
2011-02-23 adding lang_html/parsing/, and integrate ocamlnet in compilation chain
183 $(OCAMLNETCMA) \
b06171f0 »
2011-09-08 * Makefile: fix for phylomel
184 $(GRAPHCMA) $(PHYLOMELCMA) \
8634b74a »
2010-09-22 initial import into fresh git repo.
185 commons/commons_features.cma \
186 h_version-control/lib.cma \
187 h_visualization/lib.cma \
188 h_program-lang/lib.cma \
189 h_program-visual/lib.cma \
190 globals/globals.cma \
191 lang_ml/parsing/lib.cma \
192 lang_ml/analyze/lib.cma \
ca330f98 »
2010-09-25 Makefiles: adding lang_nw/
193 lang_nw/parsing/lib.cma \
194 lang_nw/analyze/lib.cma \
270df000 »
2010-10-21 skeleton for lang_lisp/
195 lang_lisp/parsing/lib.cma \
196 lang_lisp/analyze/lib.cma \
f42b9309 »
2010-10-22 first proto for haskell lexer and highlighter
197 lang_haskell/parsing/lib.cma \
198 lang_haskell/analyze/lib.cma \
8634b74a »
2010-09-22 initial import into fresh git repo.
199 lang_php/parsing/lib.cma \
200 lang_php/analyze/foundation/lib.cma \
201 lang_php/analyze/tools/lib.cma \
202 lang_php/analyze/checker/lib.cma \
203 lang_php/matcher/lib.cma \
3d099fe6 »
2010-09-25 removed some dependencies to ocamlbdb
204 lang_php/analyze/database/lib.cma \
205 lang_php/analyze/static_analysis/lib.cma \
4eba308e »
2010-10-21 make top works again. Also add file_type for readme and .emacs
206 lang_php/analyze/dynamic_analysis/lib.cma \
3d099fe6 »
2010-09-25 removed some dependencies to ocamlbdb
207 lang_php/analyze/qa_test/lib.cma \
685c0048 »
2010-10-02 putting back support for persistent berkeley DB
208 lang_php/analyze/lib.cma \
adcf589f »
2011-11-08 * lang_php/pretty/Makefile: julien's pretty printer, coming from private
209 lang_php/pretty/lib.cma \
8634b74a »
2010-09-22 initial import into fresh git repo.
210 lang_sql/parsing/lib.cma \
211 lang_js/parsing/lib.cma \
212 lang_js/analyze/lib.cma \
213 lang_cpp/parsing/lib.cma \
214 lang_cpp/analyze/lib.cma \
9919d5b9 »
2010-09-26 adding lang_java/ to help visualize java code
215 lang_java/parsing/lib.cma \
216 lang_java/analyze/lib.cma \
244ff047 »
2010-11-13 lang_python: first skeleton
217 lang_python/parsing/lib.cma \
218 lang_python/analyze/lib.cma \
58edd373 »
2010-11-14 lang_csharp: parser and basic highlighter
219 lang_csharp/parsing/lib.cma \
220 lang_csharp/analyze/lib.cma \
30b92d96 »
2011-01-22 erlang: basic lexer
221 lang_erlang/parsing/lib.cma \
ebdc9ade »
2011-01-22 erlang: basic highlighter
222 lang_erlang/analyze/lib.cma \
81bbf50c »
2011-02-23 adding lang_html/parsing/, and integrate ocamlnet in compilation chain
223 lang_text/lib.cma \
224 lang_html/parsing/lib.cma \
d62b5008 »
2011-03-04 adding an empty lang_html/analyze/
225 lang_html/analyze/lib.cma \
c7092a9d »
2011-03-05 add skeleton for lang_css/parsing/
226 lang_css/parsing/lib.cma \
e241606e »
2011-03-06 lang_web: empty -dump_web
227 lang_web/parsing/lib.cma \
81bbf50c »
2011-02-23 adding lang_html/parsing/, and integrate ocamlnet in compilation chain
228
8634b74a »
2010-09-22 initial import into fresh git repo.
229
230 MAKESUBDIRS=commons \
231 $(BDBDIR) $(REGEXPDIR) $(MPIDIR) \
8bf36daa »
2011-09-06 pm_depend now use phylomel, test
232 $(GRAPHDIR) $(PHYLOMELDIR) \
2d8dff7d »
2010-10-02 Makefile: compiling ocamlthrift
233 $(THRIFTDIR) \
81bbf50c »
2011-02-23 adding lang_html/parsing/, and integrate ocamlnet in compilation chain
234 $(OCAMLNETDIR) \
26cc32a0 »
2010-09-23 Makefiles and configure: make cairo+gtk the default.
235 $(GUIDIR) $(CAIRODIR) \
8634b74a »
2010-09-22 initial import into fresh git repo.
236 h_version-control \
237 h_visualization \
238 h_program-lang \
239 h_program-visual \
240 globals \
241 lang_ml/parsing \
242 lang_ml/analyze \
ca330f98 »
2010-09-25 Makefiles: adding lang_nw/
243 lang_nw/parsing \
244 lang_nw/analyze \
270df000 »
2010-10-21 skeleton for lang_lisp/
245 lang_lisp/parsing \
246 lang_lisp/analyze \
f42b9309 »
2010-10-22 first proto for haskell lexer and highlighter
247 lang_haskell/parsing \
248 lang_haskell/analyze \
8634b74a »
2010-09-22 initial import into fresh git repo.
249 lang_php/parsing \
250 lang_php/matcher \
adcf589f »
2011-11-08 * lang_php/pretty/Makefile: julien's pretty printer, coming from private
251 lang_php/pretty \
8634b74a »
2010-09-22 initial import into fresh git repo.
252 lang_sql/parsing \
253 lang_js/parsing \
254 lang_js/analyze \
255 lang_cpp/parsing \
256 lang_cpp/analyze \
9919d5b9 »
2010-09-26 adding lang_java/ to help visualize java code
257 lang_java/parsing \
258 lang_java/analyze \
244ff047 »
2010-11-13 lang_python: first skeleton
259 lang_python/parsing \
260 lang_python/analyze \
58edd373 »
2010-11-14 lang_csharp: parser and basic highlighter
261 lang_csharp/parsing \
262 lang_csharp/analyze \
30b92d96 »
2011-01-22 erlang: basic lexer
263 lang_erlang/parsing \
ebdc9ade »
2011-01-22 erlang: basic highlighter
264 lang_erlang/analyze \
8634b74a »
2010-09-22 initial import into fresh git repo.
265 lang_php/analyze \
266 lang_php/analyze/foundation \
267 lang_php/analyze/checker \
3d099fe6 »
2010-09-25 removed some dependencies to ocamlbdb
268 lang_php/analyze/database \
ea99ce2e »
2010-11-05 moving a few files so that 'make dotall' can now work
269 lang_php/analyze/tools \
270 lang_php/analyze/qa_test \
271 lang_php/analyze/dynamic_analysis \
3d099fe6 »
2010-09-25 removed some dependencies to ocamlbdb
272 lang_php/analyze/static_analysis \
81bbf50c »
2011-02-23 adding lang_html/parsing/, and integrate ocamlnet in compilation chain
273 lang_html/parsing \
d62b5008 »
2011-03-04 adding an empty lang_html/analyze/
274 lang_html/analyze \
c7092a9d »
2011-03-05 add skeleton for lang_css/parsing/
275 lang_css/parsing \
e241606e »
2011-03-06 lang_web: empty -dump_web
276 lang_web/parsing \
49aefcef »
2011-02-08 org_mode: parsing support and skeleton for codemap
277 lang_text \
8634b74a »
2010-09-22 initial import into fresh git repo.
278 $(VISUALDIR) \
2f1bfadc »
2010-09-27 misc
279 $(FACEBOOKDIR)
8634b74a »
2010-09-22 initial import into fresh git repo.
280
281 INCLUDEDIRS=$(MAKESUBDIRS) \
ea99ce2e »
2010-11-05 moving a few files so that 'make dotall' can now work
282 commons/ocamlextra commons/ocollection \
283 commons/lib-json commons/lib-xml commons/lib-sexp \
8bf36daa »
2011-09-06 pm_depend now use phylomel, test
284 $(GTKINCLUDE) $(CAIROINCLUDE) $(PCREINCLUDE) $(OCAMLNETINCLUDE) \
285 $(PHYLOMELINCLUDE)
8634b74a »
2010-09-22 initial import into fresh git repo.
286
287 ##############################################################################
288 # Generic
289 ##############################################################################
290 -include $(TOP)/Makefile.common
291
292 ##############################################################################
293 # Top rules
294 ##############################################################################
295
296 .PHONY:: all all.opt opt top clean distclean
297
298 #note: old: was before all: rec $(EXEC) ... but can not do that cos make -j20
299 #could try to compile $(EXEC) before rec. So here force sequentiality.
300
301 all:: Makefile.config
302 $(MAKE) rec
303 $(MAKE) $(PROGS)
304 opt:
305 $(MAKE) rec.opt
306 $(MAKE) $(OPTPROGS)
307 all.opt: opt
308 top: $(TARGET).top
309
310 rec:
311 $(MAKE) -C commons
312 $(BTCMD)
313 $(BDBCMD)
314 $(REGEXPCMD)
315 $(MPICMD)
316 $(GRAPHCMD)
317 $(GUICMD)
318 $(MAKE) features -C commons
319 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i all || exit 1; done
320
321 rec.opt:
322 $(MAKE) all.opt -C commons
323 $(BTCMDOPT)
324 $(BDBCMDOPT)
325 $(REGEXPCMDOPT)
326 $(MPICMDOPT)
327 $(GRAPHCMDOPT)
328 $(GUICMDOPT)
329 $(MAKE) features.opt -C commons
330 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i all.opt || exit 1; done
331
332
333 $(TARGET): $(LIBS) $(OBJS)
334 $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS) $^
335
336 $(TARGET).opt: $(LIBS:.cma=.cmxa) $(OPTOBJS)
337 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
338
339
340 $(TARGET).top: $(LIBS) $(OBJS)
341 $(OCAMLMKTOP) -o $@ $(SYSLIBS) threads.cma $^
342
343
344
345
346 clean::
347 rm -f $(TARGET)
348 clean::
349 rm -f $(TARGET).top
350 clean::
351 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i clean; done
352
353 clean::
354 rm -f *.opt
355
356 depend::
357 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i depend; done
358
359 Makefile.config:
360 @echo "Makefile.config is missing. Have you run ./configure?"
361 @exit 1
362
363
364 distclean:: clean
365 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
366 rm -f .depend
367 rm -f Makefile.config
368 rm -f globals/config.ml
369 rm -f TAGS
370 # find -name ".#*1.*" | xargs rm -f
371
372 # add -custom so dont need add e.g. ocamlbdb/ in LD_LIBRARY_PATH
373 CUSTOM=-custom
374
375 static:
376 rm -f $(EXEC).opt $(EXEC)
377 $(MAKE) STATIC="-ccopt -static" $(EXEC).opt
378 cp $(EXEC).opt $(EXEC)
379
380 purebytecode:
381 rm -f $(EXEC).opt $(EXEC)
382 $(MAKE) BYTECODE_STATIC="" $(EXEC)
383
384
385 #------------------------------------------------------------------------------
6dea9bd9 »
2010-11-06 rename pfff_visual in CodeMap and worked on the toc of the codemap ma…
386 # stags targets (was pfff_tags)
8634b74a »
2010-09-22 initial import into fresh git repo.
387 #------------------------------------------------------------------------------
388
e8fac8d2 »
2010-11-05 renamed main_tags.ml
389 stags: $(LIBS) main_stags.cmo
8634b74a »
2010-09-22 initial import into fresh git repo.
390 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
391
e8fac8d2 »
2010-11-05 renamed main_tags.ml
392 stags.opt: $(LIBS:.cma=.cmxa) main_stags.cmx
8634b74a »
2010-09-22 initial import into fresh git repo.
393 $(OCAMLOPT) $(STATIC) -o $@ $(BASICSYSLIBS:.cma=.cmxa) $^
394
395 clean::
e8fac8d2 »
2010-11-05 renamed main_tags.ml
396 rm -f stags
8634b74a »
2010-09-22 initial import into fresh git repo.
397
398 #------------------------------------------------------------------------------
7966cbd7 »
2011-09-02 * lang_ml/analyze/graph_modules_packages_ml.ml: new file, also main_p…
399 # pm_depend targets
400 #------------------------------------------------------------------------------
401
b06171f0 »
2011-09-08 * Makefile: fix for phylomel
402 #SYSLIBS_PM= external/phylomel/src/lib.cma
78f625ef »
2011-09-06 phylomel: started migration to pad style
403
8bf36daa »
2011-09-06 pm_depend now use phylomel, test
404 # external/ocamlgtk/src/lablgtk.cma \
405 # external/ocamlcairo/src/cairo.cma \
406 # external/ocamlcairo/src/cairo_lablgtk.cma \
78f625ef »
2011-09-06 phylomel: started migration to pad style
407
b06171f0 »
2011-09-08 * Makefile: fix for phylomel
408 pm_depend: $(LIBS) main_pm_depend.cmo
8bf36daa »
2011-09-06 pm_depend now use phylomel, test
409 $(OCAMLC) $(CUSTOM) -o $@ $(BASICSYSLIBS) $^
410
b06171f0 »
2011-09-08 * Makefile: fix for phylomel
411 pm_depend.opt: $(LIBS:.cma=.cmxa) main_pm_depend.cmx
7966cbd7 »
2011-09-02 * lang_ml/analyze/graph_modules_packages_ml.ml: new file, also main_p…
412 $(OCAMLOPT) $(STATIC) -o $@ $(BASICSYSLIBS:.cma=.cmxa) $^
413
414 clean::
415 rm -f pm_depend
416
417 #------------------------------------------------------------------------------
8634b74a »
2010-09-22 initial import into fresh git repo.
418 # sgrep targets
419 #------------------------------------------------------------------------------
420
421 sgrep: $(LIBS) main_sgrep.cmo
60244903 »
2011-08-23 sgrep: support for regexp when matching strings
422 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $(REGEXPCMA) $^
8634b74a »
2010-09-22 initial import into fresh git repo.
423
424 sgrep.opt: $(BASICLIBS:.cma=.cmxa) main_sgrep.cmx
60244903 »
2011-08-23 sgrep: support for regexp when matching strings
425 $(OCAMLOPT) $(STATIC) -o $@ $(BASICSYSLIBS:.cma=.cmxa) \
426 $(REGEXPCMA:.cma=.cmxa) $^
8634b74a »
2010-09-22 initial import into fresh git repo.
427
428 clean::
429 rm -f sgrep
430
431 #------------------------------------------------------------------------------
432 # spatch targets
433 #------------------------------------------------------------------------------
434
435 spatch: $(LIBS) main_spatch.cmo
436 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
437
438 spatch.opt: $(LIBS:.cma=.cmxa) main_spatch.cmx
439 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
440
441 clean::
442 rm -f spatch
443
444 #------------------------------------------------------------------------------
445 # scheck targets
446 #------------------------------------------------------------------------------
447
448 scheck: $(LIBS) main_scheck.cmo
449 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
450
451 scheck.opt: $(LIBS:.cma=.cmxa) main_scheck.cmx
452 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
453
454 clean::
455 rm -f scheck
456
457 #------------------------------------------------------------------------------
9efc1da8 »
2010-12-02 introduce scheck_heavy
458 # scheck_heavy targets
459 #------------------------------------------------------------------------------
460
461 scheck_heavy: $(LIBS) main_scheck_heavy.cmo
462 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
463
464 scheck_heavy.opt: $(LIBS:.cma=.cmxa) $(LIBS2:.cma=.cmxa) $(OBJS2:.cmo=.cmx) main_scheck_heavy.cmx
465 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
466
467 clean::
468 rm -f scheck_heavy
469
470 #------------------------------------------------------------------------------
8634b74a »
2010-09-22 initial import into fresh git repo.
471 # ppp targets
472 #------------------------------------------------------------------------------
473
474 ppp: $(LIBS) main_ppp.cmo
475 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
476
477 ppp.opt: $(LIBS:.cma=.cmxa) main_ppp.cmx
478 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
479
480 clean::
481 rm -f ppp
482
483 #------------------------------------------------------------------------------
484 # pfff_db targets
485 #------------------------------------------------------------------------------
486
487 pfff_db: $(LIBS) main_db.cmo
488 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
489
490 pfff_db.opt: $(LIBS:.cma=.cmxa) $(LIBS2:.cma=.cmxa) $(OBJS2:.cmo=.cmx) main_db.cmx
491 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
492
493 clean::
494 rm -f pfff_db
495
496 #------------------------------------------------------------------------------
a5fa1c61 »
2010-12-02 update Makefile and readme for new pfff_db_heavy
497 # pfff_db_heavy targets
8634b74a »
2010-09-22 initial import into fresh git repo.
498 #------------------------------------------------------------------------------
499
a5fa1c61 »
2010-12-02 update Makefile and readme for new pfff_db_heavy
500 pfff_db_heavy: $(LIBS) main_db_heavy.cmo
8634b74a »
2010-09-22 initial import into fresh git repo.
501 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
502
a5fa1c61 »
2010-12-02 update Makefile and readme for new pfff_db_heavy
503 pfff_db_heavy.opt: $(LIBS:.cma=.cmxa) $(LIBS2:.cma=.cmxa) $(OBJS2:.cmo=.cmx) main_db_heavy.cmx
8634b74a »
2010-09-22 initial import into fresh git repo.
504 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
505
506 clean::
a5fa1c61 »
2010-12-02 update Makefile and readme for new pfff_db_heavy
507 rm -f pfff_db_heavy
8634b74a »
2010-09-22 initial import into fresh git repo.
508
509 #------------------------------------------------------------------------------
e07dec25 »
2010-11-05 moving main_gui.ml, to be able to use 'make dot'
510 # OBSOLETE: pfff_browser target
8634b74a »
2010-09-22 initial import into fresh git repo.
511 #------------------------------------------------------------------------------
512 SYSLIBS2=external/ocamlgtk/src/lablgtk.cma
513 LIBS2=commons/commons_gui.cma gui/gui.cma
514 OBJS2=
515
516 #need linker to find dlllabltk2.so so need adjust LD_LIBRARY_PATH if
517 # use ocamlgtk/src instead of the standard -I +lablgtk2
518 # cf env.sh
519
520 pfff_browser: $(LIBS) $(LIBS2) $(OBJS2) main_gui.cmo
521 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $(SYSLIBS2) $^
522
523 pfff_browser.opt: $(LIBS:.cma=.cmxa) $(LIBS2:.cma=.cmxa) $(OBJS2:.cmo=.cmx) main_gui.cmx
524 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(SYSLIBS2:.cma=.cmxa) $^
525
526 clean::
527 rm -f pfff_browser
528
529 #------------------------------------------------------------------------------
6dea9bd9 »
2010-11-06 rename pfff_visual in CodeMap and worked on the toc of the codemap ma…
530 # codemap target (was pfff_visual)
8634b74a »
2010-09-22 initial import into fresh git repo.
531 #------------------------------------------------------------------------------
532 SYSLIBS3= \
533 external/ocamlgtk/src/lablgtk.cma \
534 external/ocamlcairo/src/cairo.cma \
535 external/ocamlcairo/src/cairo_lablgtk.cma \
536
537 OBJS3=visual/lib.cma
538
539 GTKLOOP=gtkThread.cmo gtkInit.cmo
540
3c78ed5b »
2010-11-06 renamed main_visual.ml
541 codemap: $(LIBS) commons/commons_gui.cma $(OBJS3) main_codemap.cmo
8634b74a »
2010-09-22 initial import into fresh git repo.
542 $(OCAMLC) -thread $(CUSTOM) -o $@ $(SYSLIBS) threads.cma $(SYSLIBS3) $(GTKLOOP) $^
543
3c78ed5b »
2010-11-06 renamed main_visual.ml
544 codemap.opt: $(LIBS:.cma=.cmxa) commons/commons_gui.cmxa $(OBJS3:.cma=.cmxa) main_codemap.cmx
8634b74a »
2010-09-22 initial import into fresh git repo.
545 $(OCAMLOPT) -thread $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) threads.cmxa $(SYSLIBS3:.cma=.cmxa) $(GTKLOOP:.cmo=.cmx) $^
546
547 clean::
6dea9bd9 »
2010-11-06 rename pfff_visual in CodeMap and worked on the toc of the codemap ma…
548 rm -f codemap
8634b74a »
2010-09-22 initial import into fresh git repo.
549
550
551 #------------------------------------------------------------------------------
552 # pfff_misc targets
553 #------------------------------------------------------------------------------
554 pfff_misc: $(LIBS) main_misc.cmo
555 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $(SYSLIBS4) $^
556
557 pfff_misc.opt: $(LIBS:.cma=.cmxa) main_misc.cmx
558 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(SYSLIBS4:.cma=.cmxa) $^
559
560 clean::
561 rm -f pfff_misc
562
563
1b506a9f »
2010-11-30 added main_test.ml to run the unit tests
564 #------------------------------------------------------------------------------
565 # pfff_test targets
566 #------------------------------------------------------------------------------
567
568 pfff_test: $(LIBS) main_test.cmo
569 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
570
571 pfff_test.opt: $(LIBS:.cma=.cmxa) main_test.cmx
572 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
573
574 clean::
575 rm -f pfff_test
576
577
8634b74a »
2010-09-22 initial import into fresh git repo.
578 ##############################################################################
579 # Build documentation
580 ##############################################################################
581 .PHONY:: docs
582
583 ##############################################################################
584 # Install
585 ##############################################################################
586
587 VERSION=$(shell cat globals/config.ml.in |grep version |perl -p -e 's/.*"(.*)".*/$$1/;')
588
589 # note: don't remove DESTDIR, it can be set by package build system like ebuild
590 install: all
3e4dc5e3 »
2011-02-10 fixing make install, thx to ymotongpo for the bug report
591 mkdir -p $(DESTDIR)$(BINDIR)
8634b74a »
2010-09-22 initial import into fresh git repo.
592 mkdir -p $(DESTDIR)$(SHAREDIR)
3e4dc5e3 »
2011-02-10 fixing make install, thx to ymotongpo for the bug report
593 cp -a $(PROGS) $(BINDIR)
594 cp -a data $(DESTDIR)$(SHAREDIR)
8634b74a »
2010-09-22 initial import into fresh git repo.
595 @echo ""
3e4dc5e3 »
2011-02-10 fixing make install, thx to ymotongpo for the bug report
596 @echo "You can also install pfff by copying the programs"
597 @echo "available in this directory anywhere you want and"
8634b74a »
2010-09-22 initial import into fresh git repo.
598 @echo "give it the right options to find its configuration files."
599
600 uninstall:
3e4dc5e3 »
2011-02-10 fixing make install, thx to ymotongpo for the bug report
601 rm -rf $(DESTDIR)$(SHAREDIR)/data
8634b74a »
2010-09-22 initial import into fresh git repo.
602
603 version:
604 @echo $(VERSION)
605
606
aeaa31c8 »
2010-11-10 misc
607
608 update:
609 make opt
610 cp codemap.opt ~/bin
41e910f9 »
2010-12-14 misc
611 cp scheck.opt ~/bin
aeaa31c8 »
2010-11-10 misc
612
8634b74a »
2010-09-22 initial import into fresh git repo.
613 ##############################################################################
614 # Package rules
615 ##############################################################################
616
617 PACKAGE=$(TARGET)-$(VERSION)
618 TMP=/tmp
619
620
621 package:
622 make srctar
623
624 srctar:
625 make clean
626 cp -a . $(TMP)/$(PACKAGE)
627 cd $(TMP); tar cvfz $(PACKAGE).tgz --exclude=CVS --exclude=_darcs $(PACKAGE)
628 rm -rf $(TMP)/$(PACKAGE)
629
630 ##############################################################################
631 # Website rules
632 ##############################################################################
633
634 WEBSITE=/home/pad/mobile/homepage/software/project-pfff
635
636 gen-html:
637 emacs -l ~/.emacs --eval "(progn (htmlize-many-files '(\"changes.txt\")) (kill-emacs))"
638
639 website:
640 cp $(TMP)/$(PACKAGE).tgz $(WEBSITE)
641
642 # make gen-html
643 # cp changes.txt.html $(WEBSITE)/changes-$(VERSION).html
644
645 ##############################################################################
646 # Developer rules
647 ##############################################################################
648
eefc1ee1 »
2011-10-18 * Makefile: make test
649 .PHONY:: tags db layers visual tests test
8634b74a »
2010-09-22 initial import into fresh git repo.
650
1b506a9f »
2010-11-30 added main_test.ml to run the unit tests
651
8634b74a »
2010-09-22 initial import into fresh git repo.
652 tags:
4bdc0541 »
2010-11-10 misc
653 ./stags -verbose -lang ml .
8634b74a »
2010-09-22 initial import into fresh git repo.
654 db:
16ee6f10 »
2011-01-19 codemap: git grep now works again. When clicking Top the dw_stack
655 ./pfff_db -verbose -lang ml -o DB_LIGHT.marshall .
7b1fc107 »
2011-01-19 misc
656 layers:
657 ./pfff_db_heavy -gen_age_layer /home/pad/local/pfff-for-layers \
658 layer_age.marshall
a358bccb »
2011-01-20 layer_vcs: add fine grained information about the age of the lines
659 ./pfff_db_heavy -gen_age_layer /home/pad/local/pfff-for-layers \
660 layer_age.json
7b1fc107 »
2011-01-19 misc
661
8634b74a »
2010-09-22 initial import into fresh git repo.
662 visual:
4c62df24 »
2010-11-06 main_spatch/sgrep: move out code in facebook/
663 ./codemap -profile -ss 2 \
623bba60 »
2011-03-23 deadcode: let pbs = ref [] ...
664 -with_info DB_LIGHT.marshall -with_layers . -ocaml_filter .
8e9f0f6a »
2011-03-22 misc
665
eefc1ee1 »
2011-10-18 * Makefile: make test
666 tests:
1b506a9f »
2010-11-30 added main_test.ml to run the unit tests
667 ./pfff_test all
eefc1ee1 »
2011-10-18 * Makefile: make test
668 test: tests
8a3b7bf9 »
2010-09-23 misc
669 push:
670 git push origin master
452072be »
2010-09-27 misc
671 pull:
672 git pull
673 cd facebook; git pull
8a3b7bf9 »
2010-09-23 misc
674
1b506a9f »
2010-11-30 added main_test.ml to run the unit tests
675 #refactoring:
676 # git grep -l Source_high | xargs perl -p -i -e 's/Source_highlight/Highlight_code/g'
ea99ce2e »
2010-11-05 moving a few files so that 'make dotall' can now work
677
1b506a9f »
2010-11-30 added main_test.ml to run the unit tests
678 DSRC=$(SRC)
ea99ce2e »
2010-11-05 moving a few files so that 'make dotall' can now work
679 DIRS= $(filter-out commons external/ocamlgtk/src external/ocamlpcre external/ocamlcairo external/ocamlgraph facebook, $(MAKESUBDIRS))
680 #DIRS=lang_php/parsing
681 DSRC+=$(DIRS:=/*.ml)
682 DSRC+=$(wildcard main_*.ml)
683
66391b3f »
2011-03-11 archi: add more colors for 'make archi' (but got some errors)
684 #PP1=-pp camlp4o
685 DOTCOLORS=green,darkgoldenrod2,cyan,red,magenta,yellow,burlywood1,aquamarine,purple,lightpink,salmon,mediumturquoise,black,slategray3
686
1b506a9f »
2010-11-30 added main_test.ml to run the unit tests
687 archi:
66391b3f »
2011-03-11 archi: add more colors for 'make archi' (but got some errors)
688 ocamldoc $(PP1) -I +threads $(INCLUDES) $(DSRC) \
689 -dot -dot-reduce -dot-colors $(DOTCOLORS)
e07dec25 »
2010-11-05 moving main_gui.ml, to be able to use 'make dot'
690 dot -Tps ocamldoc.out > dot.ps
691 mv dot.ps Fig_graph_ml.ps
692 ps2pdf Fig_graph_ml.ps
693 rm -f Fig_graph_ml.ps
694
695
44e870f4 »
2011-03-09 misc
696 visual_bis:
697 ./codemap -profile -ss 2 \
698 -with_info DB_LIGHT.marshall -with_layers . -pfff_filter .
1b506a9f »
2010-11-30 added main_test.ml to run the unit tests
699 visualopt:
700 ./codemap.opt -profile -ss 2 \
701 -with_info DB_LIGHT .
702 visual_test: codemap
703 ./codemap -verbose -profile -ss 1 -ft 1. \
704 -with_info DB_LIGHT -filter 'pad:ml' commons/
705 visualhead:
706 ./codemap -ss 1 -ft 0.5 -commitid HEAD
707
708
8634b74a »
2010-09-22 initial import into fresh git repo.
709 ##############################################################################
710 # Pad specific rules
711 ##############################################################################
712
713 DARCSFORESTS=commons commons/lib-sexp \
714 ocamltarzan ocamltarzan/lib-sexp \
715 h_version-control h_program-lang \
716 lang_php/parsing \
717 lang_php/analyze \
718 gui \
719 facebook
720
721 update_darcs:
722 darcs pull
723 set -e; for i in $(DARCSFORESTS); do cd $$i; darcs pull; cd ..; done
724
725 diff_darcs:
726 @echo "----- REPO:" top "----------------------"
727 darcs diff -u
728 set -e; for i in $(DARCSFORESTS); do cd $$i; echo "----- REPO:" $$i "-----------------"; darcs diff -u; cd $(TOP); done
Something went wrong with that request. Please try again.