Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 608 lines (473 sloc) 17.065 kb
8634b74 initial import into fresh git repo.
pad authored
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
e8fac8d renamed main_tags.ml
pad authored
24 PROGS+=stags
8634b74 initial import into fresh git repo.
pad authored
25 PROGS+=ppp
26
3d099fe removed some dependencies to ocamlbdb
pad authored
27 # without bdb pfff_db_light will be incomplete regarding PHP
8634b74 initial import into fresh git repo.
pad authored
28 PROGS+=pfff_db_light
29 PROGS+=scheck
30
685c004 putting back support for persistent berkeley DB
pad authored
31 ifeq ($(FEATURE_BDB), 1)
32 PROGS+=pfff_db
33 endif
34
8634b74 initial import into fresh git repo.
pad authored
35 ifeq ($(FEATURE_VISUAL), 1)
36 PROGS+=pfff_visual
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)
26cc32a Makefiles and configure: make cairo+gtk the default.
pad authored
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
8634b74 initial import into fresh git repo.
pad authored
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
26cc32a Makefiles and configure: make cairo+gtk the default.
pad authored
96 PCREINCLUDE=external/ocamlpcre/lib
8634b74 initial import into fresh git repo.
pad authored
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
3d099fe removed some dependencies to ocamlbdb
pad authored
114
2d8dff7 Makefile: compiling ocamlthrift
pad authored
115 # for the moment it's used only by facebook/ code so could move in
116 # facebook/external/
117 THRIFTDIR=external/ocamlthrift
8634b74 initial import into fresh git repo.
pad authored
118
119 ifeq ($(FEATURE_GRAPHICS), 1)
120 #GRAPHICSCMXA=graphics.cmxa
121 endif
122
26cc32a Makefiles and configure: make cairo+gtk the default.
pad authored
123 ifeq ($(FEATURE_VISUAL),1)
124 VISUALDIR=visual
125 endif
8634b74 initial import into fresh git repo.
pad authored
126
2f1bfad misc
pad authored
127 ifeq ($(FEATURE_FACEBOOK),1)
128 FACEBOOKDIR=facebook
129 endif
130
8634b74 initial import into fresh git repo.
pad authored
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
3d099fe removed some dependencies to ocamlbdb
pad authored
137 # on too much things
8634b74 initial import into fresh git repo.
pad authored
138 BASICLIBS=commons/commons.cma \
139 globals/globals.cma \
140 h_program-lang/lib.cma \
141 lang_ml/parsing/lib.cma \
ca330f9 Makefiles: adding lang_nw/
pad authored
142 lang_nw/parsing/lib.cma \
8634b74 initial import into fresh git repo.
pad authored
143 lang_php/parsing/lib.cma \
144 lang_js/parsing/lib.cma \
145 lang_cpp/parsing/lib.cma \
146 lang_php/matcher/lib.cma \
9919d5b adding lang_java/ to help visualize java code
pad authored
147 lang_java/parsing/lib.cma \
8634b74 initial import into fresh git repo.
pad authored
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 \
ca330f9 Makefiles: adding lang_nw/
pad authored
165 lang_nw/parsing/lib.cma \
166 lang_nw/analyze/lib.cma \
270df00 skeleton for lang_lisp/
pad authored
167 lang_lisp/parsing/lib.cma \
168 lang_lisp/analyze/lib.cma \
f42b930 first proto for haskell lexer and highlighter
pad authored
169 lang_haskell/parsing/lib.cma \
170 lang_haskell/analyze/lib.cma \
8634b74 initial import into fresh git repo.
pad authored
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 \
3d099fe removed some dependencies to ocamlbdb
pad authored
180 lang_php/analyze/database/lib.cma \
181 lang_php/analyze/finder/lib.cma \
182 lang_php/analyze/static_analysis/lib.cma \
4eba308 make top works again. Also add file_type for readme and .emacs
pad authored
183 lang_php/analyze/dynamic_analysis/lib.cma \
3d099fe removed some dependencies to ocamlbdb
pad authored
184 lang_php/analyze/qa_test/lib.cma \
685c004 putting back support for persistent berkeley DB
pad authored
185 lang_php/analyze/lib.cma \
8634b74 initial import into fresh git repo.
pad authored
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 \
9919d5b adding lang_java/ to help visualize java code
pad authored
191 lang_java/parsing/lib.cma \
192 lang_java/analyze/lib.cma \
8634b74 initial import into fresh git repo.
pad authored
193
194 MAKESUBDIRS=commons \
195 $(BDBDIR) $(REGEXPDIR) $(MPIDIR) \
196 $(GRAPHDIR) \
2d8dff7 Makefile: compiling ocamlthrift
pad authored
197 $(THRIFTDIR) \
26cc32a Makefiles and configure: make cairo+gtk the default.
pad authored
198 $(GUIDIR) $(CAIRODIR) \
8634b74 initial import into fresh git repo.
pad authored
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 \
ca330f9 Makefiles: adding lang_nw/
pad authored
206 lang_nw/parsing \
207 lang_nw/analyze \
270df00 skeleton for lang_lisp/
pad authored
208 lang_lisp/parsing \
209 lang_lisp/analyze \
f42b930 first proto for haskell lexer and highlighter
pad authored
210 lang_haskell/parsing \
211 lang_haskell/analyze \
8634b74 initial import into fresh git repo.
pad authored
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 \
9919d5b adding lang_java/ to help visualize java code
pad authored
220 lang_java/parsing \
221 lang_java/analyze \
8634b74 initial import into fresh git repo.
pad authored
222 lang_php/analyze \
223 lang_php/analyze/basic \
224 lang_php/analyze/foundation \
5f353d3 Skeleton for type inference of PHP via the PIL
pad authored
225 lang_php/analyze/typing \
8634b74 initial import into fresh git repo.
pad authored
226 lang_php/analyze/checker \
3d099fe removed some dependencies to ocamlbdb
pad authored
227 lang_php/analyze/database \
228 lang_php/analyze/static_analysis \
8634b74 initial import into fresh git repo.
pad authored
229 $(VISUALDIR) \
2f1bfad misc
pad authored
230 $(FACEBOOKDIR)
8634b74 initial import into fresh git repo.
pad authored
231
232 INCLUDEDIRS=$(MAKESUBDIRS) \
e07dec2 moving main_gui.ml, to be able to use 'make dot'
pad authored
233 commons/ocamlextra commons/lib-json commons/lib-xml commons/lib-sexp \
26cc32a Makefiles and configure: make cairo+gtk the default.
pad authored
234 $(GTKINCLUDE) $(CAIROINCLUDE) $(PCREINCLUDE)
8634b74 initial import into fresh git repo.
pad authored
235
236 ##############################################################################
237 # Generic
238 ##############################################################################
239 -include $(TOP)/Makefile.common
240
241 ##############################################################################
242 # Top rules
243 ##############################################################################
244
245 .PHONY:: all all.opt opt top clean distclean
246
247 #note: old: was before all: rec $(EXEC) ... but can not do that cos make -j20
248 #could try to compile $(EXEC) before rec. So here force sequentiality.
249
250 all:: Makefile.config
251 $(MAKE) rec
252 $(MAKE) $(PROGS)
253 opt:
254 $(MAKE) rec.opt
255 $(MAKE) $(OPTPROGS)
256 all.opt: opt
257 top: $(TARGET).top
258
259 rec:
260 $(MAKE) -C commons
261 $(BTCMD)
262 $(BDBCMD)
263 $(REGEXPCMD)
264 $(MPICMD)
265 $(GRAPHCMD)
266 $(GUICMD)
267 $(MAKE) features -C commons
268 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i all || exit 1; done
269
270 rec.opt:
271 $(MAKE) all.opt -C commons
272 $(BTCMDOPT)
273 $(BDBCMDOPT)
274 $(REGEXPCMDOPT)
275 $(MPICMDOPT)
276 $(GRAPHCMDOPT)
277 $(GUICMDOPT)
278 $(MAKE) features.opt -C commons
279 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i all.opt || exit 1; done
280
281
282 $(TARGET): $(LIBS) $(OBJS)
283 $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS) $^
284
285 $(TARGET).opt: $(LIBS:.cma=.cmxa) $(OPTOBJS)
286 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
287
288
289 $(TARGET).top: $(LIBS) $(OBJS)
290 $(OCAMLMKTOP) -o $@ $(SYSLIBS) threads.cma $^
291
292
293
294
295 clean::
296 rm -f $(TARGET)
297 clean::
298 rm -f $(TARGET).top
299 clean::
300 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i clean; done
301
302 clean::
303 rm -f *.opt
304
305 depend::
306 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i depend; done
307
308 Makefile.config:
309 @echo "Makefile.config is missing. Have you run ./configure?"
310 @exit 1
311
312
313 distclean:: clean
314 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
315 rm -f .depend
316 rm -f Makefile.config
317 rm -f globals/config.ml
318 rm -f TAGS
319 # find -name ".#*1.*" | xargs rm -f
320
321 # add -custom so dont need add e.g. ocamlbdb/ in LD_LIBRARY_PATH
322 CUSTOM=-custom
323
324 static:
325 rm -f $(EXEC).opt $(EXEC)
326 $(MAKE) STATIC="-ccopt -static" $(EXEC).opt
327 cp $(EXEC).opt $(EXEC)
328
329 purebytecode:
330 rm -f $(EXEC).opt $(EXEC)
331 $(MAKE) BYTECODE_STATIC="" $(EXEC)
332
333
334 #------------------------------------------------------------------------------
e8fac8d renamed main_tags.ml
pad authored
335 # stags targets
8634b74 initial import into fresh git repo.
pad authored
336 #------------------------------------------------------------------------------
337
e8fac8d renamed main_tags.ml
pad authored
338 stags: $(LIBS) main_stags.cmo
8634b74 initial import into fresh git repo.
pad authored
339 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
340
e8fac8d renamed main_tags.ml
pad authored
341 stags.opt: $(LIBS:.cma=.cmxa) main_stags.cmx
8634b74 initial import into fresh git repo.
pad authored
342 $(OCAMLOPT) $(STATIC) -o $@ $(BASICSYSLIBS:.cma=.cmxa) $^
343
344 clean::
e8fac8d renamed main_tags.ml
pad authored
345 rm -f stags
8634b74 initial import into fresh git repo.
pad authored
346
347 #------------------------------------------------------------------------------
348 # sgrep targets
349 #------------------------------------------------------------------------------
350
351 sgrep: $(LIBS) main_sgrep.cmo
352 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
353
354 sgrep.opt: $(BASICLIBS:.cma=.cmxa) main_sgrep.cmx
355 $(OCAMLOPT) $(STATIC) -o $@ $(BASICSYSLIBS:.cma=.cmxa) $^
356
357 clean::
358 rm -f sgrep
359
360 #------------------------------------------------------------------------------
361 # spatch targets
362 #------------------------------------------------------------------------------
363
364 spatch: $(LIBS) main_spatch.cmo
365 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
366
367 spatch.opt: $(LIBS:.cma=.cmxa) main_spatch.cmx
368 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
369
370 clean::
371 rm -f spatch
372
373 #------------------------------------------------------------------------------
374 # scheck targets
375 #------------------------------------------------------------------------------
376
377 scheck: $(LIBS) main_scheck.cmo
378 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
379
380 scheck.opt: $(LIBS:.cma=.cmxa) main_scheck.cmx
381 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
382
383 clean::
384 rm -f scheck
385
386 #------------------------------------------------------------------------------
387 # ppp targets
388 #------------------------------------------------------------------------------
389
390 ppp: $(LIBS) main_ppp.cmo
391 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
392
393 ppp.opt: $(LIBS:.cma=.cmxa) main_ppp.cmx
394 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
395
396 clean::
397 rm -f ppp
398
399 #------------------------------------------------------------------------------
400 # pfff_db targets
401 #------------------------------------------------------------------------------
402
403 pfff_db: $(LIBS) main_db.cmo
404 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
405
406 pfff_db.opt: $(LIBS:.cma=.cmxa) $(LIBS2:.cma=.cmxa) $(OBJS2:.cmo=.cmx) main_db.cmx
407 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
408
409 clean::
410 rm -f pfff_db
411
412 #------------------------------------------------------------------------------
413 # pfff_db_light targets
414 #------------------------------------------------------------------------------
415
416 pfff_db_light: $(LIBS) main_db_light.cmo
417 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $^
418
419 pfff_db_light.opt: $(LIBS:.cma=.cmxa) $(LIBS2:.cma=.cmxa) $(OBJS2:.cmo=.cmx) main_db_light.cmx
420 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $^
421
422 clean::
423 rm -f pfff_db_light
424
425 #------------------------------------------------------------------------------
e07dec2 moving main_gui.ml, to be able to use 'make dot'
pad authored
426 # OBSOLETE: pfff_browser target
8634b74 initial import into fresh git repo.
pad authored
427 #------------------------------------------------------------------------------
428 SYSLIBS2=external/ocamlgtk/src/lablgtk.cma
429 LIBS2=commons/commons_gui.cma gui/gui.cma
430 OBJS2=
431
432 #need linker to find dlllabltk2.so so need adjust LD_LIBRARY_PATH if
433 # use ocamlgtk/src instead of the standard -I +lablgtk2
434 # cf env.sh
435
436 pfff_browser: $(LIBS) $(LIBS2) $(OBJS2) main_gui.cmo
437 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $(SYSLIBS2) $^
438
439 pfff_browser.opt: $(LIBS:.cma=.cmxa) $(LIBS2:.cma=.cmxa) $(OBJS2:.cmo=.cmx) main_gui.cmx
440 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(SYSLIBS2:.cma=.cmxa) $^
441
442 clean::
443 rm -f pfff_browser
444
445 #------------------------------------------------------------------------------
446 # pfff_visual target
447 #------------------------------------------------------------------------------
448 SYSLIBS3= \
449 external/ocamlgtk/src/lablgtk.cma \
450 external/ocamlcairo/src/cairo.cma \
451 external/ocamlcairo/src/cairo_lablgtk.cma \
452
453 OBJS3=visual/lib.cma
454
455 GTKLOOP=gtkThread.cmo gtkInit.cmo
456
457 pfff_visual: $(LIBS) commons/commons_gui.cma $(OBJS3) main_visual.cmo
458 $(OCAMLC) -thread $(CUSTOM) -o $@ $(SYSLIBS) threads.cma $(SYSLIBS3) $(GTKLOOP) $^
459
460 pfff_visual.opt: $(LIBS:.cma=.cmxa) commons/commons_gui.cmxa $(OBJS3:.cma=.cmxa) main_visual.cmx
461 $(OCAMLOPT) -thread $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) threads.cmxa $(SYSLIBS3:.cma=.cmxa) $(GTKLOOP:.cmo=.cmx) $^
462
463 clean::
464 rm -f pfff_visual
465
466
467 #------------------------------------------------------------------------------
468 # pfff_misc targets
469 #------------------------------------------------------------------------------
470 pfff_misc: $(LIBS) main_misc.cmo
471 $(OCAMLC) $(CUSTOM) -o $@ $(SYSLIBS) $(SYSLIBS4) $^
472
473 pfff_misc.opt: $(LIBS:.cma=.cmxa) main_misc.cmx
474 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(SYSLIBS4:.cma=.cmxa) $^
475
476 clean::
477 rm -f pfff_misc
478
479
480 ##############################################################################
481 # Build documentation
482 ##############################################################################
483 .PHONY:: docs
484
485 ##############################################################################
486 # Install
487 ##############################################################################
488
489 VERSION=$(shell cat globals/config.ml.in |grep version |perl -p -e 's/.*"(.*)".*/$$1/;')
490
491 # note: don't remove DESTDIR, it can be set by package build system like ebuild
492 install: all
493 mkdir -p $(DESTDIR)$(SHAREDIR)
494 cp -a config/ $(DESTDIR)$(SHAREDIR)
495 @echo ""
496 @echo "You can also install XXX by copying the program XXX"
497 @echo "(available in this directory) anywhere you want and"
498 @echo "give it the right options to find its configuration files."
499
500 uninstall:
501 rm -rf $(DESTDIR)$(SHAREDIR)/config/
502
503 version:
504 @echo $(VERSION)
505
506
507 ##############################################################################
508 # Package rules
509 ##############################################################################
510
511 PACKAGE=$(TARGET)-$(VERSION)
512 TMP=/tmp
513
514
515 package:
516 make srctar
517
518 srctar:
519 make clean
520 cp -a . $(TMP)/$(PACKAGE)
521 cd $(TMP); tar cvfz $(PACKAGE).tgz --exclude=CVS --exclude=_darcs $(PACKAGE)
522 rm -rf $(TMP)/$(PACKAGE)
523
524 ##############################################################################
525 # Website rules
526 ##############################################################################
527
528 WEBSITE=/home/pad/mobile/homepage/software/project-pfff
529
530 gen-html:
531 emacs -l ~/.emacs --eval "(progn (htmlize-many-files '(\"changes.txt\")) (kill-emacs))"
532
533 website:
534 cp $(TMP)/$(PACKAGE).tgz $(WEBSITE)
535
536 # make gen-html
537 # cp changes.txt.html $(WEBSITE)/changes-$(VERSION).html
538
539 ##############################################################################
540 # Developer rules
541 ##############################################################################
542
543 .PHONY:: tags visual db
544
545 tags:
546 ./pfff_tags -verbose -lang ml .
547 db:
548 ./pfff_db_light -verbose -lang ml -o DB_LIGHT .
549
550 visual:
551 ./pfff_visual -profile -ss 2 \
053d8ce visual: adding a -ocaml_filter
pad authored
552 -with_info DB_LIGHT -ocaml_filter .
8634b74 initial import into fresh git repo.
pad authored
553 visualopt:
554 ./pfff_visual.opt -profile -ss 2 \
555 -with_info DB_LIGHT .
556
557
558 visual_test: pfff_visual
559 ./pfff_visual -verbose -profile -ss 1 -ft 1. \
560 -with_info DB_LIGHT -filter 'pad:ml' commons/
561
562 visualhead:
563 ./pfff_visual -ss 1 -ft 0.5 -commitid HEAD
564
565 #VCS related
566 #test related
567 #refactoring:
568 # git grep -l Source_high | xargs perl -p -i -e 's/Source_highlight/Highlight_code/g'
569
8a3b7bf misc
pad authored
570 push:
571 git push origin master
572
452072b misc
pad authored
573 pull:
574 git pull
575 cd facebook; git pull
8a3b7bf misc
pad authored
576
e07dec2 moving main_gui.ml, to be able to use 'make dot'
pad authored
577 #DIRS= $(filter-out commons external/ocamlgtk/src external/ocamlpcre external/ocamlcairo, $(MAKESUBDIRS))
578 DIRS=lang_php/parsing
579 SRC2=$(SRC) $(wildcard main_*.ml)
580 dotall:
581 ocamldoc -I +threads $(INCLUDES) $(DIRS:=/*.ml) $(SRC2) -dot -dot-reduce
582 dot -Tps ocamldoc.out > dot.ps
583 mv dot.ps Fig_graph_ml.ps
584 ps2pdf Fig_graph_ml.ps
585 rm -f Fig_graph_ml.ps
586
587
8634b74 initial import into fresh git repo.
pad authored
588 ##############################################################################
589 # Pad specific rules
590 ##############################################################################
591
592 DARCSFORESTS=commons commons/lib-sexp \
593 ocamltarzan ocamltarzan/lib-sexp \
594 h_version-control h_program-lang \
595 lang_php/parsing \
596 lang_php/analyze \
597 gui \
598 facebook
599
600 update_darcs:
601 darcs pull
602 set -e; for i in $(DARCSFORESTS); do cd $$i; darcs pull; cd ..; done
603
604 diff_darcs:
605 @echo "----- REPO:" top "----------------------"
606 darcs diff -u
607 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.