Release coccinelle-0.2.4
[bpt/coccinelle.git] / Makefile
CommitLineData
c491d8ee
C
1# Copyright 2010, INRIA, University of Copenhagen
2# Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
3# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
4# Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
5# This file is part of Coccinelle.
6#
7# Coccinelle is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, according to version 2 of the License.
10#
11# Coccinelle is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
18#
19# The authors reserve the right to distribute this or future versions of
20# Coccinelle under other licenses.
21
22
951c7801 23
34e49164
C
24#############################################################################
25# Configuration section
26#############################################################################
27
28-include Makefile.config
c3e37e97 29-include /etc/lsb-release
34e49164 30
b1b2de81 31VERSION=$(shell cat globals/config.ml.in |grep version |perl -p -e 's/.*"(.*)".*/$$1/;')
951c7801 32CCVERSION=$(shell cat scripts/coccicheck/README |grep "Coccicheck version" |perl -p -e 's/.*version (.*)[ ]*/$$1/;')
c3e37e97
C
33PKGVERSION=$(shell dpkg-parsechangelog -ldebian/changelog.$(DISTRIB_CODENAME) 2> /dev/null \
34 | sed -n 's/^Version: \(.*\)/\1/p' )
34e49164
C
35
36##############################################################################
37# Variables
38##############################################################################
39TARGET=spatch
c3e37e97 40PRJNAME=coccinelle
34e49164
C
41
42SRC=flag_cocci.ml cocci.ml testing.ml test.ml main.ml
43
34e49164 44ifeq ($(FEATURE_PYTHON),1)
90aeb998 45PYCMA=pycaml.cma
b1b2de81 46# the following is essential for Coccinelle to compile under gentoo (weird)
90aeb998 47#OPTLIBFLAGS=-cclib dllpycaml_stubs.so
34e49164
C
48else
49PYCMA=
90aeb998 50endif
34e49164 51OPTLIBFLAGS=
90aeb998
C
52
53ifeq ("$(SEXPDIR)","ocamlsexp")
54SEXPLIB=sexplib.cmo
55OPTSEXPLIB=sexplib.cmx
56else
57SEXPLIB=sexplib.cma
58OPTSEXPLIB=sexplib.cmxa
34e49164
C
59endif
60
88e71198
C
61ifeq ("$(DYNLINK)","no")
62DYNLINK=
63else
64DYNLINK=dynlink.cma
65endif
66
b1b2de81 67SEXPSYSCMA=bigarray.cma nums.cma
34e49164 68
88e71198 69SYSLIBS=str.cma unix.cma $(SEXPSYSCMA) $(PYCMA) $(DYNLINK) # threads.cma
b1b2de81 70LIBS=commons/commons.cma \
90aeb998 71 commons/commons_sexp.cma \
b1b2de81 72 globals/globals.cma \
34e49164
C
73 ctl/ctl.cma \
74 parsing_cocci/cocci_parser.cma parsing_c/parsing_c.cma \
951c7801 75 engine/cocciengine.cma popl09/popl.cma \
174d1640 76 extra/extra.cma python/coccipython.cma ocaml/cocciocaml.cma
90aeb998
C
77
78# Should we use the local version of pycaml
79ifeq ("$(PYCAMLDIR)","pycaml")
80LOCALPYCAML=pycaml
81else
82LOCALPYCAML=
83endif
84
85# Should we use the local version of menhirLib
174d1640
C
86ifeq ("$(MENHIRDIR)","menhirlib")
87LOCALMENHIR=menhirlib
90aeb998
C
88else
89LOCALMENHIR=
90endif
91
92# Should we use the local version of ocamlsexp
93ifeq ("$(SEXPDIR)","ocamlsexp")
94LOCALSEXP=ocamlsexp
95else
96LOCALSEXP=
97endif
34e49164 98
174d1640 99# used for depend: and a little for rec & rec.opt
90aeb998
C
100MAKESUBDIRS=$(LOCALPYCAML) $(LOCALSEXP) commons \
101 globals $(LOCALMENHIR) ctl parsing_cocci parsing_c \
174d1640
C
102 engine popl09 extra python ocaml
103
104# used for clean:
105# It is like MAKESUBDIRS but also
106# force cleaning of local library copies
107CLEANSUBDIRS=pycaml ocamlsexp commons \
108 globals menhirlib ctl parsing_cocci parsing_c \
109 engine popl09 extra python ocaml
90aeb998
C
110
111INCLUDEDIRSDEP=commons commons/ocamlextra $(LOCALSEXP) \
112 globals $(LOCALMENHIR) $(LOCALPYCAML) ctl \
174d1640 113 parsing_cocci parsing_c engine popl09 extra python ocaml
34e49164 114
90aeb998
C
115INCLUDEDIRS=$(INCLUDEDIRSDEP) $(SEXPDIR) $(MENHIRDIR) $(PYCAMLDIR)
116
34e49164
C
117##############################################################################
118# Generic variables
119##############################################################################
120
121INCLUDES=$(INCLUDEDIRS:%=-I %)
122
123OBJS= $(SRC:.ml=.cmo)
124OPTOBJS= $(SRC:.ml=.cmx)
125
126EXEC=$(TARGET)
127
128##############################################################################
129# Generic ocaml variables
130##############################################################################
131
ae4735db 132OCAMLCFLAGS=
34e49164
C
133
134# for profiling add -p -inline 0
135# but 'make forprofiling' below does that for you.
136# This flag is also used in subdirectories so don't change its name here.
708f4980 137# To enable backtrace support for native code, you need to put -g in OPTFLAGS
c491d8ee
C
138# to also link with -g.
139OPTFLAGS= -g
34e49164 140
34e49164 141OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
faf9a90c 142OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
34e49164
C
143OCAMLLEX=ocamllex #-ml # -ml for debugging lexer, but slightly slower
144OCAMLYACC=ocamlyacc -v
90aeb998 145OCAMLDEP=ocamldep $(INCLUDEDIRSDEP:%=-I %)
34e49164
C
146OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
147
148# can also be set via 'make static'
149STATIC= #-ccopt -static
150
151# can also be unset via 'make purebytecode'
152BYTECODE_STATIC=-custom
153
154##############################################################################
155# Top rules
156##############################################################################
b1b2de81
C
157.PHONY:: all all.opt byte opt top clean distclean configure
158.PHONY:: $(MAKESUBDIRS) $(MAKESUBDIRS:%=%.opt) subdirs subdirs.opt
159
708f4980 160all: Makefile.config byte preinstall
b1b2de81
C
161
162opt: all.opt
708f4980 163all.opt: opt-compil preinstall
faf9a90c 164
708f4980 165world: preinstall
b1b2de81 166 $(MAKE) byte
708f4980 167 $(MAKE) opt-compil
b1b2de81
C
168
169byte: .depend
faf9a90c
C
170 $(MAKE) subdirs
171 $(MAKE) $(EXEC)
172
b1b2de81 173opt-compil: .depend
faf9a90c
C
174 $(MAKE) subdirs.opt
175 $(MAKE) $(EXEC).opt
176
485bce71 177top: $(EXEC).top
34e49164 178
0708f913 179subdirs:
b1b2de81 180 +for D in $(MAKESUBDIRS); do $(MAKE) $$D || exit 1 ; done
90aeb998 181 $(MAKE) -C commons sexp OCAMLCFLAGS="$(OCAMLCFLAGS)"
0708f913
C
182
183subdirs.opt:
b1b2de81 184 +for D in $(MAKESUBDIRS); do $(MAKE) $$D.opt || exit 1 ; done
aba5c457 185 $(MAKE) -C commons sexp.opt OPTFLAGS="$(OPTFLAGS)"
faf9a90c
C
186
187$(MAKESUBDIRS):
188 $(MAKE) -C $@ OCAMLCFLAGS="$(OCAMLCFLAGS)" all
189
190$(MAKESUBDIRS:%=%.opt):
aba5c457 191 $(MAKE) -C $(@:%.opt=%) OPTFLAGS="$(OPTFLAGS)" all.opt
faf9a90c 192
b1b2de81 193#dependencies:
0708f913
C
194# commons:
195# globals:
196# menhirlib:
197# parsing_cocci: commons globals menhirlib
198# parsing_c:parsing_cocci
199# ctl:globals commons
200# engine: parsing_cocci parsing_c ctl
951c7801 201# popl09:engine
0708f913
C
202# extra: parsing_cocci parsing_c ctl
203# pycaml:
204# python:pycaml parsing_cocci parsing_c
faf9a90c 205
34e49164 206clean::
174d1640 207 set -e; for i in $(CLEANSUBDIRS); do $(MAKE) -C $$i $@; done
c3e37e97 208 $(MAKE) -C demos/spp $@
34e49164 209
0708f913
C
210$(LIBS): $(MAKESUBDIRS)
211$(LIBS:.cma=.cmxa): $(MAKESUBDIRS:%=%.opt)
faf9a90c
C
212
213$(OBJS):$(LIBS)
214$(OPTOBJS):$(LIBS:.cma=.cmxa)
215
34e49164 216$(EXEC): $(LIBS) $(OBJS)
90aeb998 217 $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS) $(SEXPLIB) $^
34e49164 218
faf9a90c 219$(EXEC).opt: $(LIBS:.cma=.cmxa) $(OPTOBJS)
90aeb998 220 $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(OPTSEXPLIB) $(OPTLIBFLAGS) $^
34e49164 221
faf9a90c 222$(EXEC).top: $(LIBS) $(OBJS)
90aeb998 223 $(OCAMLMKTOP) -custom -o $@ $(SYSLIBS) $(SEXPLIB) $^
34e49164
C
224
225clean::
226 rm -f $(TARGET) $(TARGET).opt $(TARGET).top
34e49164 227
b1b2de81
C
228.PHONY:: tools configure
229
230configure:
231 ./configure
34e49164 232
7f004419 233Makefile.config:
708f4980
C
234 @echo "Makefile.config is missing. Have you run ./configure?"
235 @exit 1
236
c491d8ee 237tools: $(LIBS)
34e49164 238 $(MAKE) -C tools
b1b2de81 239
c491d8ee
C
240distclean::
241 if [ -d tools ] ; then $(MAKE) -C tools distclean ; fi
34e49164 242
34e49164
C
243static:
244 rm -f spatch.opt spatch
245 $(MAKE) STATIC="-ccopt -static" spatch.opt
246 cp spatch.opt spatch
247
248purebytecode:
249 rm -f spatch.opt spatch
250 $(MAKE) BYTECODE_STATIC="" spatch
fc1ad971 251 perl -p -i -e 's/^#!.*/#!\/usr\/bin\/ocamlrun/' spatch
34e49164
C
252
253
b1b2de81
C
254##############################################################################
255# Build documentation
256##############################################################################
257.PHONY:: docs
258
259docs:
260 make -C docs
261
262clean::
263 make -C docs clean
264
265distclean::
266 make -C docs distclean
267
268##############################################################################
269# Pre-Install (customization of spatch frontend script)
270##############################################################################
b1b2de81 271
90aeb998
C
272preinstall: docs/spatch.1 scripts/spatch scripts/spatch.opt scripts/spatch.byte
273
274docs/spatch.1: Makefile.config
275 $(MAKE) -C docs spatch.1
b1b2de81
C
276
277# user will use spatch to run spatch.opt (native)
5636bb2c 278scripts/spatch: Makefile.config
b1b2de81
C
279 cp scripts/spatch.sh scripts/spatch.tmp2
280 sed "s|SHAREDIR|$(SHAREDIR)|g" scripts/spatch.tmp2 > scripts/spatch.tmp
281 sed "s|LIBDIR|$(LIBDIR)|g" scripts/spatch.tmp > scripts/spatch
282 rm -f scripts/spatch.tmp2 scripts/spatch.tmp
283
284# user will use spatch to run spatch (bytecode)
5636bb2c 285scripts/spatch.byte: Makefile.config
708f4980
C
286 cp scripts/spatch.sh scripts/spatch.byte.tmp3
287 sed "s|\.opt||" scripts/spatch.byte.tmp3 > scripts/spatch.byte.tmp2
288 sed "s|SHAREDIR|$(SHAREDIR)|g" scripts/spatch.byte.tmp2 \
289 > scripts/spatch.byte.tmp
290 sed "s|LIBDIR|$(LIBDIR)|g" scripts/spatch.byte.tmp \
291 > scripts/spatch.byte
292 rm -f scripts/spatch.byte.tmp3 \
293 scripts/spatch.byte.tmp2 \
294 scripts/spatch.byte.tmp
b1b2de81
C
295
296# user will use spatch.opt to run spatch.opt (native)
5636bb2c 297scripts/spatch.opt: Makefile.config
b1b2de81 298 cp scripts/spatch.sh scripts/spatch.opt.tmp2
708f4980
C
299 sed "s|SHAREDIR|$(SHAREDIR)|g" scripts/spatch.opt.tmp2 \
300 > scripts/spatch.opt.tmp
301 sed "s|LIBDIR|$(LIBDIR)|g" scripts/spatch.opt.tmp \
302 > scripts/spatch.opt
b1b2de81
C
303 rm -f scripts/spatch.opt.tmp scripts/spatch.opt.tmp2
304
305clean::
306 rm -f scripts/spatch scripts/spatch.byte scripts/spatch.opt
307
34e49164
C
308##############################################################################
309# Install
310##############################################################################
311
312# don't remove DESTDIR, it can be set by package build system like ebuild
8ba84ae2 313# for staged installation.
0708f913 314install-common:
34e49164
C
315 mkdir -p $(DESTDIR)$(BINDIR)
316 mkdir -p $(DESTDIR)$(LIBDIR)
174d1640 317 mkdir -p $(DESTDIR)$(SHAREDIR)/ocaml
413ffc02
C
318 mkdir -p $(DESTDIR)$(SHAREDIR)/commons
319 mkdir -p $(DESTDIR)$(SHAREDIR)/parsing_c
faf9a90c 320 mkdir -p $(DESTDIR)$(MANDIR)/man1
8ba84ae2
C
321 $(INSTALL_DATA) standard.h $(DESTDIR)$(SHAREDIR)
322 $(INSTALL_DATA) standard.iso $(DESTDIR)$(SHAREDIR)
174d1640 323 $(INSTALL_DATA) ocaml/coccilib.cmi $(DESTDIR)$(SHAREDIR)/ocaml/
413ffc02
C
324 $(INSTALL_DATA) parsing_c/*.cmi $(DESTDIR)$(SHAREDIR)/parsing_c/
325 $(INSTALL_DATA) commons/*.cmi $(DESTDIR)$(SHAREDIR)/commons/
8ba84ae2
C
326 $(INSTALL_DATA) docs/spatch.1 $(DESTDIR)$(MANDIR)/man1/
327 @if [ $(FEATURE_PYTHON) -eq 1 ]; then $(MAKE) install-python; fi
174d1640
C
328
329install-bash:
330 mkdir -p $(DESTDIR)$(BASH_COMPLETION_DIR)
331 $(INSTALL_DATA) scripts/spatch.bash_completion \
332 $(DESTDIR)$(BASH_COMPLETION_DIR)/spatch
0708f913 333
c491d8ee
C
334install-tools:
335 mkdir -p $(DESTDIR)$(BINDIR)
336 $(INSTALL_PROGRAM) tools/splitpatch \
337 $(DESTDIR)$(BINDIR)/splitpatch
338 $(INSTALL_PROGRAM) tools/cocci-send-email.perl \
339 $(DESTDIR)$(BINDIR)/cocci-send-email.perl
340
8ba84ae2
C
341install-python:
342 mkdir -p $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
343 $(INSTALL_DATA) python/coccilib/*.py \
344 $(DESTDIR)$(SHAREDIR)/python/coccilib
345 $(INSTALL_DATA) python/coccilib/coccigui/*.py \
346 $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
b1b2de81
C
347 $(INSTALL_DATA) python/coccilib/coccigui/pygui.glade \
348 $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
349 $(INSTALL_DATA) python/coccilib/coccigui/pygui.gladep \
350 $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
90aeb998
C
351 if [ -f pycaml/dllpycaml_stubs.so ]; then \
352 $(INSTALL_LIB) pycaml/dllpycaml_stubs.so $(DESTDIR)$(LIBDIR) ; fi
8ba84ae2 353
951c7801 354install: install-common
b1b2de81
C
355 @if test -x spatch -a ! -x spatch.opt ; then \
356 $(MAKE) install-byte;fi
357 @if test ! -x spatch -a -x spatch.opt ; then \
358 $(MAKE) install-def; $(MAKE) install-opt;fi
359 @if test -x spatch -a -x spatch.opt ; then \
360 $(MAKE) install-byte; $(MAKE) install-opt;fi
361 @if test ! -x spatch -a ! -x spatch.opt ; then \
362 echo "\n\n\t==> Run 'make', 'make opt', or both first. <==\n\n";fi
708f4980
C
363 @echo ""
364 @echo "\tYou can also install spatch by copying the program spatch"
365 @echo "\t(available in this directory) anywhere you want and"
366 @echo "\tgive it the right options to find its configuration files."
367 @echo ""
b1b2de81 368
0708f913 369# user will use spatch to run spatch.opt (native)
708f4980 370install-def:
8ba84ae2 371 $(INSTALL_PROGRAM) spatch.opt $(DESTDIR)$(SHAREDIR)
b1b2de81 372 $(INSTALL_PROGRAM) scripts/spatch $(DESTDIR)$(BINDIR)/spatch
0708f913
C
373
374# user will use spatch to run spatch (bytecode)
708f4980 375install-byte:
8ba84ae2 376 $(INSTALL_PROGRAM) spatch $(DESTDIR)$(SHAREDIR)
b1b2de81 377 $(INSTALL_PROGRAM) scripts/spatch.byte $(DESTDIR)$(BINDIR)/spatch
0708f913
C
378
379# user will use spatch.opt to run spatch.opt (native)
708f4980 380install-opt:
8ba84ae2 381 $(INSTALL_PROGRAM) spatch.opt $(DESTDIR)$(SHAREDIR)
b1b2de81 382 $(INSTALL_PROGRAM) scripts/spatch.opt $(DESTDIR)$(BINDIR)/spatch.opt
34e49164
C
383
384uninstall:
385 rm -f $(DESTDIR)$(BINDIR)/spatch
8ba84ae2 386 rm -f $(DESTDIR)$(BINDIR)/spatch.opt
34e49164 387 rm -f $(DESTDIR)$(LIBDIR)/dllpycaml_stubs.so
90aeb998
C
388 rm -f $(DESTDIR)$(SHAREDIR)/spatch
389 rm -f $(DESTDIR)$(SHAREDIR)/spatch.opt
34e49164
C
390 rm -f $(DESTDIR)$(SHAREDIR)/standard.h
391 rm -f $(DESTDIR)$(SHAREDIR)/standard.iso
174d1640 392 rm -f $(DESTDIR)$(SHAREDIR)/ocaml/coccilib.cmi
413ffc02
C
393 rm -f $(DESTDIR)$(SHAREDIR)/parsing_c/*.cmi
394 rm -f $(DESTDIR)$(SHAREDIR)/commons*.cmi
90aeb998
C
395 rm -f $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui/*
396 rm -f $(DESTDIR)$(SHAREDIR)/python/coccilib/*.py
397 rmdir --ignore-fail-on-non-empty -p \
398 $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
faf9a90c 399 rm -f $(DESTDIR)$(MANDIR)/man1/spatch.1
34e49164 400
aba5c457
C
401uninstall-bash:
402 rm -f $(DESTDIR)$(BASH_COMPLETION_DIR)/spatch
403 rmdir --ignore-fail-on-non-empty -p \
404 $(DESTDIR)$(BASH_COMPLETION_DIR)
405
c491d8ee
C
406uninstall-tools:
407 rm -f $(DESTDIR)$(BINDIR)/splitpatch
408 rm -f $(DESTDIR)$(BINDIR)/cocci-send-email.perl
409
34e49164 410version:
951c7801 411 @echo "spatch $(VERSION)"
c3e37e97 412 @echo "spatch $(PKGVERSION) ($(DISTRIB_ID))"
951c7801 413 @echo "coccicheck $(CCVERSION)"
34e49164
C
414
415
416##############################################################################
5636bb2c 417# Deb package (for Ubuntu) and release rules
34e49164
C
418##############################################################################
419
5636bb2c 420include Makefile.release
c3e37e97 421
34e49164
C
422##############################################################################
423# Developer rules
424##############################################################################
425
7f004419
C
426-include Makefile.dev
427
34e49164
C
428test: $(TARGET)
429 ./$(TARGET) -testall
430
431testparsing:
432 ./$(TARGET) -D standard.h -parse_c -dir tests/
433
434
435
faf9a90c
C
436# -inline 0 to see all the functions in the profile.
437# Can also use the profile framework in commons/ and run your program
34e49164
C
438# with -profile.
439forprofiling:
440 $(MAKE) OPTFLAGS="-p -inline 0 " opt
441
442clean::
faf9a90c 443 rm -f gmon.out
34e49164
C
444
445tags:
446 otags -no-mli-tags -r .
447
448dependencygraph:
951c7801 449 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
485bce71 450 ocamldot -lr /tmp/dependfull.depend > /tmp/dependfull.dot
34e49164 451 dot -Tps /tmp/dependfull.dot > /tmp/dependfull.ps
485bce71 452 ps2pdf /tmp/dependfull.ps /tmp/dependfull.pdf
34e49164
C
453
454##############################################################################
455# Misc rules
456##############################################################################
457
faf9a90c 458# each member of the project can have its own test.ml. this file is
34e49164 459# not under CVS.
faf9a90c 460test.ml:
34e49164
C
461 echo "let foo_ctl () = failwith \"there is no foo_ctl formula\"" \
462 > test.ml
463
464beforedepend:: test.ml
465
466
467#INC=$(dir $(shell which ocaml))
468#INCX=$(INC:/=)
469#INCY=$(dir $(INCX))
470#INCZ=$(INCY:/=)/lib/ocaml
471#
472#prim.o: prim.c
473# gcc -c -o prim.o -I $(INCZ) prim.c
474
475
476##############################################################################
477# Generic ocaml rules
478##############################################################################
479
480.SUFFIXES: .ml .mli .cmo .cmi .cmx
481
482.ml.cmo:
483 $(OCAMLC) -c $<
484.mli.cmi:
485 $(OCAMLC) -c $<
486.ml.cmx:
487 $(OCAMLOPT) -c $<
488
faf9a90c 489.ml.mldepend:
34e49164
C
490 $(OCAMLC) -i $<
491
492clean::
493 rm -f *.cm[iox] *.o *.annot
34e49164
C
494 rm -f *~ .*~ *.exe #*#
495
b1b2de81
C
496distclean:: clean
497 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
498 rm -f .depend
499 rm -f Makefile.config
b1b2de81
C
500 rm -f globals/config.ml
501 rm -f TAGS
502 rm -f tests/SCORE_actual.sexp
503 rm -f tests/SCORE_best_of_both.sexp
504 find -name ".#*1.*" | xargs rm -f
505
34e49164
C
506beforedepend::
507
508depend:: beforedepend
509 $(OCAMLDEP) *.mli *.ml > .depend
b1b2de81
C
510 set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
511
512.depend::
513 @if [ ! -f .depend ] ; then $(MAKE) depend ; fi
34e49164
C
514
515-include .depend