Add support for makefile.
[style_checker.git] / makefile
blob37062d391fb90314680f68cd91a78390d6719d93
2 VERSION = $(shell git describe --abbrev=0 2>/dev/null)
3 VERSION_ALL = $(shell git describe 2>/dev/null)
5 all: setup
6 mkdir -p obj
7 gnatmake -Pstyle_checker
9 clean:
10 gnatclean -Pstyle_checker
11 make -C regtests clean
12 rm -f style_checker.tar* *~ src/version.ads
14 setup:
15 # If git is not present then use the version.ads provided in distrib
16 ifneq ("$(VERSION)", "")
17 sed -e 's,\$$VERSION\$$,$(VERSION),g' \
18 -e 's,\$$VERSION_ALL\$$,$(VERSION_ALL),g' src/version.tads > src/version.ads
19 endif
21 distrib:
22 git archive --prefix=style_checker/ HEAD > style_checker.tar
23 tar -C ../ -r --file=style_checker.tar style_checker/src/version.ads
24 gzip -f style_checker.tar
26 force:
28 regtests: force
29 make -C regtests