Merge branch '6044_nm_squashed'
[tor.git] / Makefile.am
blob787be4951cfdcc6da21547bf14bb02963628c3ed
1 # Copyright (c) 2001-2004, Roger Dingledine
2 # Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
3 # Copyright (c) 2007-2011, The Tor Project, Inc.
4 # See LICENSE for licensing information
6 # "foreign" means we don't follow GNU package layout standards
7 # 1.9 means we require automake vesion 1.9
8 AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
10 noinst_LIBRARIES=
11 EXTRA_DIST=
12 noinst_HEADERS=
13 bin_PROGRAMS=
14 CLEANFILES=
15 TESTS=
16 noinst_PROGRAMS=
17 DISTCLEANFILES=
18 bin_SCRIPTS=
19 AM_CPPFLAGS=
20 include src/include.am
21 include doc/include.am
22 include contrib/include.am
25 EXTRA_DIST+= \
26         ChangeLog                                       \
27         INSTALL                                         \
28         LICENSE                                         \
29         Makefile.nmake                                  \
30         README                                          \
31         ReleaseNotes
33 #install-data-local:
34 #       $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
36 # Allows to override rpmbuild with rpmbuild-md5 from fedora-packager so that
37 # building for EL5 won't fail on https://bugzilla.redhat.com/show_bug.cgi?id=490613
38 RPMBUILD ?= rpmbuild
40 # Use automake's dist-gzip target to build the tarball
41 dist-rpm: dist-gzip
42         TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S");                                \
43         RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX");      \
44         mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
45         cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/;                  \
46         LIBS=-lrt $(RPMBUILD) -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec;  \
47         cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .;                                     \
48         cp -fa "$$RPM_BUILD_DIR"/RPMS/* .;                                      \
49         rm -rf "$$RPM_BUILD_DIR";                                               \
50         echo "RPM build finished";                                              \
51         #end of dist-rpm
53 dist: check
55 doxygen:
56         doxygen && cd doc/doxygen/latex && make
58 test: all
59         ./src/test/test
61 # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
62 # eventdns.[hc], tinytest*.[ch]
63 check-spaces:
64         ./contrib/checkSpace.pl -C                    \
65                 src/common/*.h                        \
66                 src/common/[^asO]*.c                  \
67                 src/common/address.c                  \
68                 src/or/[^e]*.[ch]                     \
69                 src/or/eventdns_tor.h                 \
70                 src/test/test*.[ch]                   \
71                 src/test/[^t]*.[ch]                   \
72                 src/tools/*.[ch]                      \
73                 src/tools/tor-fw-helper/*.[ch]
75 check-docs:
76         ./contrib/checkOptionDocs.pl
78 check-logs:
79         ./contrib/checkLogs.pl                        \
80                 src/*/*.[ch] | sort -n
82 version:
83         @echo "Tor @VERSION@"
84         @if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
85            echo -n "git: " ;\
86            (cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
87         fi