CI: run `make distcheck` instead of `make check`
[tinc] / Makefile.am
1 ## Process this file with automake to get Makefile.in
2
3 AUTOMAKE_OPTIONS = gnu
4
5 SUBDIRS =  src doc test systemd bash_completion.d
6
7 ACLOCAL_AMFLAGS = -I m4
8
9 EXTRA_DIST = COPYING.README README.md README.android SECURITY.md
10
11 @CODE_COVERAGE_RULES@
12
13 .PHONY: extra
14 extra:
15         $(MAKE) -C $(srcdir)/src extra
16         $(MAKE) -C $(srcdir)/test extra
17
18 # If git describe works, force autoconf to run in order to make sure we have the
19 # current version number from git in the resulting configure script.
20 configure-version:
21         -cd $(srcdir) && git describe && autoconf --force
22
23 # Triggering the README target means we are building a distribution (make dist).
24 README: configure-version README.md
25         ln -sf README.md README
26
27 CLEANFILES = README
28
29 # If we're running on a CI server, we may not be able to remove some test
30 # artifacts without using sudo because they are created by tincd running
31 # with root privileges.
32 clean-local:
33         if test -n "${CI}"; then sudo rm -rf test/*.test.*/; fi
34
35 ChangeLog:
36         (cd $(srcdir) && git log) > ChangeLog
37
38 deb:
39         dpkg-buildpackage -rfakeroot
40
41 rpm: dist
42         cp $(distdir).tar.gz /usr/src/redhat/SOURCES/
43         cp redhat/tinc.spec /usr/src/redhat/SOURCES/
44         cd /usr/src/redhat/SOURCES/ && rpm -bb tinc.spec
45
46 release:
47         rm -f ChangeLog
48         $(MAKE) ChangeLog
49         echo "Please edit the NEWS file now..."
50         /usr/bin/editor $(srcdir)/NEWS
51         $(MAKE) dist
52
53 astyle:
54         astyle --options=.astylerc -nQ src/*.[ch] src/*/*.[ch]