x
[ozulis.git] / Makefile
blob1d0884eec97c4327a756a228a793a1f54828758f
1 all:
3 BUILDDIR = build
4 MAKEOPT = --quiet
6 -include config.mk
8 all:
9 test -d $(BUILDDIR) || ./configure --build-dir $(BUILDDIR)
10 make $(MAKEOPT) -C $(BUILDDIR) generators
11 make $(MAKEOPT) -C $(BUILDDIR)
13 install: all
14 make $(MAKEOPT) -C $(BUILDDIR) install
16 doc:
17 doxygen doc/Doxyfile && cp doc/tabs.css doc/html/
19 check: install
20 make $(MAKEOPT) -C $(BUILDDIR)
21 @echo
22 @echo " ---------------------------------"
23 @echo " | TEST SUITE |"
24 @echo " ---------------------------------"
25 @echo
26 test -d reports || mkdir reports && \
27 ts=$$(date +%s); \
28 ./moulette tests/lang/test-suite \
29 --out-xml reports/report-$${ts}.xml \
30 --out-json reports/report-$${ts}.json \
31 | tee reports/report-$${ts}.out && \
32 cd reports && \
33 ln -sf report-$${ts}.xml report-latest.xml && \
34 ln -sf report-$${ts}.json report-latest.json && \
35 ln -sf report-$${ts}.out report-latest.out
37 clean:
38 make $(MAKEOPT) -C $(BUILDDIR) clean
39 find . \( -name '*~' \) -exec rm -f {} \;
41 distclean:
42 rm -rf $(BUILDDIR) config.mk
44 .PHONY: doc help
46 help:
47 @echo "build build the project"
48 @echo "check check the project"
49 @echo "clean clean the project"
50 @echo "distclean distclean the project"
51 @echo "doc generate the doxygen html documentation"
52 @echo "lighttpd-start starts the lighttpd server"
53 @echo "lighttpd-restart restarts the lighttpd server"
54 @echo "lighttpd-stop stops the lighttpd server"
56 doc/lighttpd/local.conf: Makefile
57 echo var.doc_dir = \"$$PWD/doc\" >$@
59 lighttpd-start: doc/lighttpd/local.conf
60 lighttpd -f doc/lighttpd/lighttpd.conf
62 lighttpd-stop:
63 killall -15 lighttpd
65 lighttpd-restart: lighttpd-stop lighttpd-start
67 clean: tests-clean
68 tests-clean:
69 find tests \( -name '*.ll' -o -name '*.bc' -o -name '*.bin' \) -exec rm {} \;
70 for i in tests/lang/mugiwara/input/expr/*-*-*; do i=$${i/.mgw/}; if [[ -f $$i ]] ; then rm $$i; fi; done
72 remove-trailing-whitespaces:
73 find src -type f -exec sed -i 's/ \+$$//g' {} \;
75 tags-vim:
76 ctags -R --c++-kinds=+p --fields=+iaS --extra=+q src /usr/include/c++/4.3.3/ /usr/include/llvm && mv tags $@
78 tags-emacs:
79 find src \( -name '*.hh' -o -name '*.hxx' -o -name '*.cc' \) -print0 | xargs -0 ctags.emacs -T --members --globals --declarations -o$@
81 messages:
82 cd po && find ../src/ \( -name '*.cc' -o -name '*.hh' -o -name '*.h' -o -name '*.c' -o -name '*.hxx' -o -name '*.cxx' \) -print0 | xargs -0 xgettext -o ozulis.pot --default-domain=ozulis --keyword=_ --foreign-user --package-name=ozulis --package-version=0.6 --msgid-bugs-address=bique.alexandre@gmail.com
84 .PHONY: tags-vim tags-emacs messages