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