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