Release coccinelle-0.2.0
[bpt/coccinelle.git] / Makefile
1 # Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
2 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
3 # This file is part of Coccinelle.
4 #
5 # Coccinelle is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, according to version 2 of the License.
8 #
9 # Coccinelle is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
16 #
17 # The authors reserve the right to distribute this or future versions of
18 # Coccinelle under other licenses.
19
20
21
22 #############################################################################
23 # Configuration section
24 #############################################################################
25
26 -include Makefile.config
27
28 VERSION=$(shell cat globals/config.ml.in |grep version |perl -p -e 's/.*"(.*)".*/$$1/;')
29 CCVERSION=$(shell cat scripts/coccicheck/README |grep "Coccicheck version" |perl -p -e 's/.*version (.*)[ ]*/$$1/;')
30
31 ##############################################################################
32 # Variables
33 ##############################################################################
34 TARGET=spatch
35
36 SRC=flag_cocci.ml cocci.ml testing.ml test.ml main.ml
37
38 ifeq ($(FEATURE_PYTHON),1)
39 PYCMA=pycaml/pycaml.cma
40 PYDIR=pycaml
41 PYLIB=dllpycaml_stubs.so
42 # the following is essential for Coccinelle to compile under gentoo (weird)
43 OPTLIBFLAGS=-cclib dllpycaml_stubs.so
44 else
45 PYCMA=
46 PYDIR=
47 PYLIB=
48 OPTLIBFLAGS=
49 endif
50
51 SEXPSYSCMA=bigarray.cma nums.cma
52
53 SYSLIBS=str.cma unix.cma $(SEXPSYSCMA)
54 LIBS=commons/commons.cma \
55 ocamlsexp/sexplib1.cma commons/commons_sexp.cma \
56 globals/globals.cma \
57 ctl/ctl.cma \
58 parsing_cocci/cocci_parser.cma parsing_c/parsing_c.cma \
59 engine/cocciengine.cma popl09/popl.cma \
60 extra/extra.cma $(PYCMA) python/coccipython.cma
61
62 #used for clean: and depend: and a little for rec & rec.opt
63 MAKESUBDIRS=commons ocamlsexp \
64 globals menhirlib $(PYDIR) ctl parsing_cocci parsing_c \
65 engine popl09 extra python
66 INCLUDEDIRS=commons commons/ocamlextra ocamlsexp \
67 globals menhirlib $(PYDIR) ctl \
68 parsing_cocci parsing_c engine popl09 extra python
69
70 ##############################################################################
71 # Generic variables
72 ##############################################################################
73
74 INCLUDES=$(INCLUDEDIRS:%=-I %)
75
76 OBJS= $(SRC:.ml=.cmo)
77 OPTOBJS= $(SRC:.ml=.cmx)
78
79 EXEC=$(TARGET)
80
81 ##############################################################################
82 # Generic ocaml variables
83 ##############################################################################
84
85 OCAMLCFLAGS=# -g -dtypes # -w A
86
87 # for profiling add -p -inline 0
88 # but 'make forprofiling' below does that for you.
89 # This flag is also used in subdirectories so don't change its name here.
90 # To enable backtrace support for native code, you need to put -g in OPTFLAGS
91 # to also link with -g, but even in 3.11 the backtrace support seems buggy so
92 # not worth it.
93 OPTFLAGS=
94 # the following is essential for Coccinelle to compile under gentoo
95 # but is now defined above in this file
96 #OPTLIBFLAGS=-cclib dllpycaml_stubs.so
97
98 OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
99 OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
100 OCAMLLEX=ocamllex #-ml # -ml for debugging lexer, but slightly slower
101 OCAMLYACC=ocamlyacc -v
102 OCAMLDEP=ocamldep $(INCLUDES)
103 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
104
105 # can also be set via 'make static'
106 STATIC= #-ccopt -static
107
108 # can also be unset via 'make purebytecode'
109 BYTECODE_STATIC=-custom
110
111 ##############################################################################
112 # Top rules
113 ##############################################################################
114 .PHONY:: all all.opt byte opt top clean distclean configure
115 .PHONY:: $(MAKESUBDIRS) $(MAKESUBDIRS:%=%.opt) subdirs subdirs.opt
116
117 all: Makefile.config byte preinstall
118
119 opt: all.opt
120 all.opt: opt-compil preinstall
121
122 world: preinstall
123 $(MAKE) byte
124 $(MAKE) opt-compil
125
126 byte: .depend
127 $(MAKE) subdirs
128 $(MAKE) $(EXEC)
129
130 opt-compil: .depend
131 $(MAKE) subdirs.opt
132 $(MAKE) $(EXEC).opt
133
134 top: $(EXEC).top
135
136 subdirs:
137 $(MAKE) -C commons OCAMLCFLAGS="$(OCAMLCFLAGS)"
138 $(MAKE) -C ocamlsexp OCAMLCFLAGS="$(OCAMLCFLAGS)"
139 $(MAKE) -C commons sexp OCAMLCFLAGS="$(OCAMLCFLAGS)"
140 +for D in $(MAKESUBDIRS); do $(MAKE) $$D || exit 1 ; done
141
142 subdirs.opt:
143 $(MAKE) -C commons all.opt OCAMLCFLAGS="$(OCAMLCFLAGS)"
144 $(MAKE) -C ocamlsexp all.opt OCAMLCFLAGS="$(OCAMLCFLAGS)"
145 $(MAKE) -C commons sexp.opt OCAMLCFLAGS="$(OCAMLCFLAGS)"
146 +for D in $(MAKESUBDIRS); do $(MAKE) $$D.opt || exit 1 ; done
147
148 $(MAKESUBDIRS):
149 $(MAKE) -C $@ OCAMLCFLAGS="$(OCAMLCFLAGS)" all
150
151 $(MAKESUBDIRS:%=%.opt):
152 $(MAKE) -C $(@:%.opt=%) OCAMLCFLAGS="$(OCAMLCFLAGS)" all.opt
153
154 #dependencies:
155 # commons:
156 # globals:
157 # menhirlib:
158 # parsing_cocci: commons globals menhirlib
159 # parsing_c:parsing_cocci
160 # ctl:globals commons
161 # engine: parsing_cocci parsing_c ctl
162 # popl09:engine
163 # extra: parsing_cocci parsing_c ctl
164 # pycaml:
165 # python:pycaml parsing_cocci parsing_c
166
167 clean::
168 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
169
170 $(LIBS): $(MAKESUBDIRS)
171 $(LIBS:.cma=.cmxa): $(MAKESUBDIRS:%=%.opt)
172
173 $(OBJS):$(LIBS)
174 $(OPTOBJS):$(LIBS:.cma=.cmxa)
175
176 $(EXEC): $(LIBS) $(OBJS)
177 $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS) $^
178
179 $(EXEC).opt: $(LIBS:.cma=.cmxa) $(OPTOBJS)
180 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(OPTLIBFLAGS) $^
181
182 $(EXEC).top: $(LIBS) $(OBJS)
183 $(OCAMLMKTOP) -custom -o $@ $(SYSLIBS) $^
184
185 clean::
186 rm -f $(TARGET) $(TARGET).opt $(TARGET).top
187 rm -f dllpycaml_stubs.so
188
189 .PHONY:: tools configure
190
191 configure:
192 ./configure
193
194 Makefile.config:
195 @echo "Makefile.config is missing. Have you run ./configure?"
196 @exit 1
197
198 tools:
199 $(MAKE) -C tools
200
201 clean::
202 $(MAKE) -C tools clean
203
204 static:
205 rm -f spatch.opt spatch
206 $(MAKE) STATIC="-ccopt -static" spatch.opt
207 cp spatch.opt spatch
208
209 purebytecode:
210 rm -f spatch.opt spatch
211 $(MAKE) BYTECODE_STATIC="" spatch
212 perl -p -i -e 's/^#!.*/#!\/usr\/bin\/ocamlrun/' spatch
213
214
215 ##############################################################################
216 # Build documentation
217 ##############################################################################
218 .PHONY:: docs
219
220 docs:
221 make -C docs
222
223 clean::
224 make -C docs clean
225
226 distclean::
227 make -C docs distclean
228
229 ##############################################################################
230 # Pre-Install (customization of spatch frontend script)
231 ##############################################################################
232
233 preinstall: scripts/spatch scripts/spatch.opt scripts/spatch.byte
234
235 # user will use spatch to run spatch.opt (native)
236 scripts/spatch:
237 cp scripts/spatch.sh scripts/spatch.tmp2
238 sed "s|SHAREDIR|$(SHAREDIR)|g" scripts/spatch.tmp2 > scripts/spatch.tmp
239 sed "s|LIBDIR|$(LIBDIR)|g" scripts/spatch.tmp > scripts/spatch
240 rm -f scripts/spatch.tmp2 scripts/spatch.tmp
241
242 # user will use spatch to run spatch (bytecode)
243 scripts/spatch.byte:
244 cp scripts/spatch.sh scripts/spatch.byte.tmp3
245 sed "s|\.opt||" scripts/spatch.byte.tmp3 > scripts/spatch.byte.tmp2
246 sed "s|SHAREDIR|$(SHAREDIR)|g" scripts/spatch.byte.tmp2 \
247 > scripts/spatch.byte.tmp
248 sed "s|LIBDIR|$(LIBDIR)|g" scripts/spatch.byte.tmp \
249 > scripts/spatch.byte
250 rm -f scripts/spatch.byte.tmp3 \
251 scripts/spatch.byte.tmp2 \
252 scripts/spatch.byte.tmp
253
254 # user will use spatch.opt to run spatch.opt (native)
255 scripts/spatch.opt:
256 cp scripts/spatch.sh scripts/spatch.opt.tmp2
257 sed "s|SHAREDIR|$(SHAREDIR)|g" scripts/spatch.opt.tmp2 \
258 > scripts/spatch.opt.tmp
259 sed "s|LIBDIR|$(LIBDIR)|g" scripts/spatch.opt.tmp \
260 > scripts/spatch.opt
261 rm -f scripts/spatch.opt.tmp scripts/spatch.opt.tmp2
262
263 clean::
264 rm -f scripts/spatch scripts/spatch.byte scripts/spatch.opt
265
266 ##############################################################################
267 # Install
268 ##############################################################################
269
270 # don't remove DESTDIR, it can be set by package build system like ebuild
271 # for staged installation.
272 install-common:
273 mkdir -p $(DESTDIR)$(BINDIR)
274 mkdir -p $(DESTDIR)$(LIBDIR)
275 mkdir -p $(DESTDIR)$(SHAREDIR)
276 mkdir -p $(DESTDIR)$(MANDIR)/man1
277 $(INSTALL_DATA) standard.h $(DESTDIR)$(SHAREDIR)
278 $(INSTALL_DATA) standard.iso $(DESTDIR)$(SHAREDIR)
279 $(INSTALL_DATA) docs/spatch.1 $(DESTDIR)$(MANDIR)/man1/
280 @if [ $(FEATURE_PYTHON) -eq 1 ]; then $(MAKE) install-python; fi
281
282 install-python:
283 mkdir -p $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
284 $(INSTALL_DATA) python/coccilib/*.py \
285 $(DESTDIR)$(SHAREDIR)/python/coccilib
286 $(INSTALL_DATA) python/coccilib/coccigui/*.py \
287 $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
288 $(INSTALL_DATA) python/coccilib/coccigui/pygui.glade \
289 $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
290 $(INSTALL_DATA) python/coccilib/coccigui/pygui.gladep \
291 $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
292 $(INSTALL_LIB) dllpycaml_stubs.so $(DESTDIR)$(LIBDIR)
293
294 install: install-common
295 @if test -x spatch -a ! -x spatch.opt ; then \
296 $(MAKE) install-byte;fi
297 @if test ! -x spatch -a -x spatch.opt ; then \
298 $(MAKE) install-def; $(MAKE) install-opt;fi
299 @if test -x spatch -a -x spatch.opt ; then \
300 $(MAKE) install-byte; $(MAKE) install-opt;fi
301 @if test ! -x spatch -a ! -x spatch.opt ; then \
302 echo "\n\n\t==> Run 'make', 'make opt', or both first. <==\n\n";fi
303 @echo ""
304 @echo "\tYou can also install spatch by copying the program spatch"
305 @echo "\t(available in this directory) anywhere you want and"
306 @echo "\tgive it the right options to find its configuration files."
307 @echo ""
308
309 # user will use spatch to run spatch.opt (native)
310 install-def:
311 $(INSTALL_PROGRAM) spatch.opt $(DESTDIR)$(SHAREDIR)
312 $(INSTALL_PROGRAM) scripts/spatch $(DESTDIR)$(BINDIR)/spatch
313
314 # user will use spatch to run spatch (bytecode)
315 install-byte:
316 $(INSTALL_PROGRAM) spatch $(DESTDIR)$(SHAREDIR)
317 $(INSTALL_PROGRAM) scripts/spatch.byte $(DESTDIR)$(BINDIR)/spatch
318
319 # user will use spatch.opt to run spatch.opt (native)
320 install-opt:
321 $(INSTALL_PROGRAM) spatch.opt $(DESTDIR)$(SHAREDIR)
322 $(INSTALL_PROGRAM) scripts/spatch.opt $(DESTDIR)$(BINDIR)/spatch.opt
323
324 uninstall:
325 rm -f $(DESTDIR)$(BINDIR)/spatch
326 rm -f $(DESTDIR)$(BINDIR)/spatch.opt
327 rm -f $(DESTDIR)$(LIBDIR)/dllpycaml_stubs.so
328 rm -f $(DESTDIR)$(SHAREDIR)/standard.h
329 rm -f $(DESTDIR)$(SHAREDIR)/standard.iso
330 rm -rf $(DESTDIR)$(SHAREDIR)/python/coccilib
331 rm -f $(DESTDIR)$(MANDIR)/man1/spatch.1
332
333 version:
334 @echo "spatch $(VERSION)"
335 @echo "coccicheck $(CCVERSION)"
336
337
338 ##############################################################################
339 # Package rules
340 ##############################################################################
341
342 PACKAGE=coccinelle-$(VERSION)
343 CCPACKAGE=coccicheck-$(CCVERSION)
344
345 BINSRC=spatch env.sh env.csh standard.h standard.iso \
346 *.txt \
347 docs/manual/manual.pdf docs/manual/options.pdf docs/manual/main_grammar.pdf docs/spatch.1 \
348 docs/manual/cocci-python.txt \
349 demos/foo.* demos/simple.*
350 # $(PYLIB) python/coccilib/ demos/printloc.*
351 BINSRC2=$(BINSRC:%=$(PACKAGE)/%)
352
353 TMP=/tmp
354 OCAMLVERSION=$(shell ocaml -version |perl -p -e 's/.*version (.*)/$$1/;')
355
356 # Procedure to do first time:
357 # cd ~/release
358 # cvs checkout coccinelle -dP
359 # cd coccinelle
360 #
361 # Procedure to do each time:
362 #
363 # 1) make prepackage # WARN: These will clean your local rep. of pending modifications
364 #
365 # UPDATE VERSION number in globals/config.ml.in
366 # and commit it with
367 #
368 # 2) make release
369 #
370 # The project is then automatically licensified.
371 #
372 # Remember to comment the -g -dtypes in this Makefile
373 # You can also remove a few things, for instance I removed in this
374 # Makefile things related to popl/ and popl09/
375 # make sure that ocaml is the distribution ocaml of /usr/bin, not ~pad/...
376 #
377 # 3) make package
378 #
379 # if WEBSITE is set properly, you can also run 'make website'
380 # Check that run an ocaml in /usr/bin
381
382 # To test you can try compile and run spatch from different instances
383 # like my ~/coccinelle, ~/release/coccinelle, and the /tmp/coccinelle-0.X
384 # downloaded from the website.
385
386 # For 'make srctar' it must done from a clean
387 # repo such as ~/release/coccinelle. It must also be a repo where
388 # the scripts/licensify has been run at least once.
389 # For the 'make bintar' I can do it from my original repo.
390
391 prepackage:
392 cvs up -CdP
393 $(MAKE) distclean
394
395 release:
396 cvs ci -m "Release $(VERSION)" globals/config.ml.in
397 $(MAKE) licensify
398
399 package:
400 $(MAKE) distclean # Clean project
401 $(MAKE) srctar
402 ./configure --without-python
403 $(MAKE) docs
404 $(MAKE) bintar
405 $(MAKE) bytecodetar
406 $(MAKE) staticbintar
407 $(MAKE) distclean # Clean project
408 ./configure # Reconfigure project with Python support
409 $(MAKE) docs
410 $(MAKE) bintar-python
411 $(MAKE) bytecodetar-python
412 $(MAKE) coccicheck
413
414
415 # I currently pre-generate the parser so the user does not have to
416 # install menhir on his machine. We could also do a few cleanups.
417 # You may have first to do a 'make licensify'.
418 #
419 # update: make docs generates pdf but also some ugly .log files, so
420 # make clean is there to remove them while not removing the pdf
421 # (only distclean remove the pdfs).
422 srctar:
423 make distclean
424 make docs
425 make clean
426 cp -a . $(TMP)/$(PACKAGE)
427 cd $(TMP)/$(PACKAGE); cd parsing_cocci/; make parser_cocci_menhir.ml
428 cd $(TMP); tar cvfz $(PACKAGE).tgz --exclude-vcs $(PACKAGE)
429 rm -rf $(TMP)/$(PACKAGE)
430
431
432 bintar: all
433 rm -f $(TMP)/$(PACKAGE)
434 ln -s `pwd` $(TMP)/$(PACKAGE)
435 cd $(TMP); tar cvfz $(PACKAGE)-bin-x86.tgz --exclude-vcs $(BINSRC2)
436 rm -f $(TMP)/$(PACKAGE)
437
438 staticbintar: all.opt
439 rm -f $(TMP)/$(PACKAGE)
440 ln -s `pwd` $(TMP)/$(PACKAGE)
441 make static
442 cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-static.tgz --exclude-vcs $(BINSRC2)
443 rm -f $(TMP)/$(PACKAGE)
444
445 # add ocaml version in name ?
446 bytecodetar: all
447 rm -f $(TMP)/$(PACKAGE)
448 ln -s `pwd` $(TMP)/$(PACKAGE)
449 make purebytecode
450 cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz --exclude-vcs $(BINSRC2)
451 rm -f $(TMP)/$(PACKAGE)
452
453 bintar-python: all
454 rm -f $(TMP)/$(PACKAGE)
455 ln -s `pwd` $(TMP)/$(PACKAGE)
456 cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-python.tgz --exclude-vcs $(BINSRC2)
457 rm -f $(TMP)/$(PACKAGE)
458
459 # add ocaml version in name ?
460 bytecodetar-python: all
461 rm -f $(TMP)/$(PACKAGE)
462 ln -s `pwd` $(TMP)/$(PACKAGE)
463 make purebytecode
464 cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION)-python.tgz --exclude-vcs $(BINSRC2)
465 rm -f $(TMP)/$(PACKAGE)
466
467 coccicheck:
468 cp -a `pwd`/scripts/coccicheck $(TMP)/$(CCPACKAGE)
469 tar cvfz $(TMP)/$(CCPACKAGE).tgz -C $(TMP) --exclude-vcs $(CCPACKAGE)
470 rm -rf $(TMP)/$(CCPACKAGE)
471
472 clean-packages::
473 rm -f $(TMP)/$(PACKAGE).tgz
474 rm -f $(TMP)/$(PACKAGE)-bin-x86.tgz
475 rm -f $(TMP)/$(PACKAGE)-bin-x86-static.tgz
476 rm -f $(TMP)/$(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz
477 rm -f $(TMP)/$(PACKAGE)-bin-x86-python.tgz
478 rm -f $(TMP)/$(PACKAGE)-bin-bytecode-$(OCAMLVERSION)-python.tgz
479 rm -f $(TMP)/$(CCPACKAGE).tgz
480
481 #
482 # No need to licensify 'demos'. Because these is basic building blocks
483 # to use SmPL.
484 #
485 TOLICENSIFY=ctl engine globals parsing_cocci popl popl09 python scripts tools
486 licensify:
487 ocaml str.cma tools/licensify.ml
488 set -e; for i in $(TOLICENSIFY); do cd $$i; ocaml str.cma ../tools/licensify.ml; cd ..; done
489
490 # When checking out the source from diku sometimes I have some "X in the future"
491 # error messages.
492 fixdates:
493 echo do 'touch **/*.*'
494
495 #fixCVS:
496 # cvs update -d -P
497 # echo do 'rm -rf **/CVS'
498
499 ocamlversion:
500 @echo $(OCAMLVERSION)
501
502 ##############################################################################
503 # Developer rules
504 ##############################################################################
505
506 -include Makefile.dev
507
508 test: $(TARGET)
509 ./$(TARGET) -testall
510
511 testparsing:
512 ./$(TARGET) -D standard.h -parse_c -dir tests/
513
514
515
516 # -inline 0 to see all the functions in the profile.
517 # Can also use the profile framework in commons/ and run your program
518 # with -profile.
519 forprofiling:
520 $(MAKE) OPTFLAGS="-p -inline 0 " opt
521
522 clean::
523 rm -f gmon.out
524
525 tags:
526 otags -no-mli-tags -r .
527
528 dependencygraph:
529 find -name "*.ml" |grep -v "scripts" | xargs ocamldep -I commons -I globals -I ctl -I parsing_cocci -I parsing_c -I engine -I popl09 -I extra > /tmp/dependfull.depend
530 ocamldot -lr /tmp/dependfull.depend > /tmp/dependfull.dot
531 dot -Tps /tmp/dependfull.dot > /tmp/dependfull.ps
532 ps2pdf /tmp/dependfull.ps /tmp/dependfull.pdf
533
534 ##############################################################################
535 # Misc rules
536 ##############################################################################
537
538 # each member of the project can have its own test.ml. this file is
539 # not under CVS.
540 test.ml:
541 echo "let foo_ctl () = failwith \"there is no foo_ctl formula\"" \
542 > test.ml
543
544 beforedepend:: test.ml
545
546
547 #INC=$(dir $(shell which ocaml))
548 #INCX=$(INC:/=)
549 #INCY=$(dir $(INCX))
550 #INCZ=$(INCY:/=)/lib/ocaml
551 #
552 #prim.o: prim.c
553 # gcc -c -o prim.o -I $(INCZ) prim.c
554
555
556 ##############################################################################
557 # Generic ocaml rules
558 ##############################################################################
559
560 .SUFFIXES: .ml .mli .cmo .cmi .cmx
561
562 .ml.cmo:
563 $(OCAMLC) -c $<
564 .mli.cmi:
565 $(OCAMLC) -c $<
566 .ml.cmx:
567 $(OCAMLOPT) -c $<
568
569 .ml.mldepend:
570 $(OCAMLC) -i $<
571
572 clean::
573 rm -f *.cm[iox] *.o *.annot
574 rm -f *~ .*~ *.exe #*#
575
576 distclean:: clean
577 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
578 rm -f .depend
579 rm -f Makefile.config
580 rm -f python/coccilib/output.py
581 rm -f python/pycocci.ml
582 rm -f python/pycocci_aux.ml
583 rm -f globals/config.ml
584 rm -f TAGS
585 rm -f tests/SCORE_actual.sexp
586 rm -f tests/SCORE_best_of_both.sexp
587 find -name ".#*1.*" | xargs rm -f
588
589 beforedepend::
590
591 depend:: beforedepend
592 $(OCAMLDEP) *.mli *.ml > .depend
593 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
594
595 .depend::
596 @if [ ! -f .depend ] ; then $(MAKE) depend ; fi
597
598 -include .depend