Merge branch 'maint-0.2.3' into release-0.2.3
[tor.git] / Makefile.am
blob29bba715bdf8f8e89600c3255e0d332a5b747c0d
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.7 means we require automake vesion 1.7
8 AUTOMAKE_OPTIONS = foreign 1.7
10 SUBDIRS = src doc contrib
12 DIST_SUBDIRS = src doc contrib
14 EXTRA_DIST = \
15         ChangeLog                                       \
16         INSTALL                                         \
17         LICENSE                                         \
18         Makefile.nmake                                  \
19         README                                          \
20         ReleaseNotes                                    \
21         tor.spec                                        \
22         tor.spec.in
24 #install-data-local:
25 #       $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
27 # Allows to override rpmbuild with rpmbuild-md5 from fedora-packager so that
28 # building for EL5 won't fail on https://bugzilla.redhat.com/show_bug.cgi?id=490613
29 RPMBUILD ?= rpmbuild
31 # Use automake's dist-gzip target to build the tarball
32 dist-rpm: dist-gzip
33         TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S");                                \
34         RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX");      \
35         mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
36         cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/;                  \
37         LIBS=-lrt $(RPMBUILD) -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec;  \
38         cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .;                                     \
39         cp -fa "$$RPM_BUILD_DIR"/RPMS/* .;                                      \
40         rm -rf "$$RPM_BUILD_DIR";                                               \
41         echo "RPM build finished";                                              \
42         #end of dist-rpm
44 dist: check
46 doxygen:
47         doxygen && cd doc/doxygen/latex && make
49 test: all
50         ./src/test/test
52 # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
53 # eventdns.[hc], tinytest*.[ch]
54 check-spaces:
55         ./contrib/checkSpace.pl -C                    \
56                 src/common/*.h                        \
57                 src/common/[^asO]*.c                  \
58                 src/common/address.c                  \
59                 src/or/[^e]*.[ch]                     \
60                 src/or/eventdns_tor.h                 \
61                 src/test/test*.[ch]                   \
62                 src/test/[^t]*.[ch]                   \
63                 src/tools/*.[ch]                      \
64                 src/tools/tor-fw-helper/*.[ch]
66 check-docs:
67         ./contrib/checkOptionDocs.pl
69 check-logs:
70         ./contrib/checkLogs.pl                        \
71                 src/*/*.[ch] | sort -n
73 version:
74         @echo "Tor @VERSION@"
75         @if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
76            echo -n "git: " ;\
77            (cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
78         fi