and forward-port the changelog entries
[tor.git] / Makefile.am
blob8efeb45d7ba15b75b4f8449a77143be7fdffe427
1 # $Id$
2 # Copyright (c) 2001-2004, Roger Dingledine
3 # Copyright (c) 2004-2007, Roger Dingledine, Nick Mathewson
4 # See LICENSE for licensing information
6 AUTOMAKE_OPTIONS = foreign
7  # else it keeps trying to put COPYING back in
9 SUBDIRS = src doc contrib
11 DIST_SUBDIRS = src doc contrib
13 EXTRA_DIST = INSTALL README AUTHORS LICENSE ChangeLog          \
14              ReleaseNotes tor.spec tor.spec.in
16 #install-data-local:
17 #       $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
19 # Assume a tarball is in .. for now.
20 dist-rpm: 
21         RPM_BUILD_DIR="/tmp/tor-rpm-build-$$$$";                \
22         rm -rf $$RPM_BUILD_DIR;                                 \
23         mkdir $$RPM_BUILD_DIR || exit 1;                        \
24         for subdir in BUILD RPMS SOURCES SPECS SRPMS; do        \
25             mkdir $$RPM_BUILD_DIR/$$subdir;                     \
26         done;                                                   \
27         mkdir $$RPM_BUILD_DIR/SOURCES/tor-$(VERSION);           \
28         cp -R ./ $$RPM_BUILD_DIR/SOURCES/tor-$(VERSION)/;       \
29         pushd $$RPM_BUILD_DIR/SOURCES/;                         \
30         tar zcf tor-$(VERSION).tar.gz ./;                       \
31         popd;                                                   \
32         rpmbuild -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
33         mv $$RPM_BUILD_DIR/SRPMS/* .;                           \
34         mv $$RPM_BUILD_DIR/RPMS/* .;                            \
35         rm -rf $$RPM_BUILD_DIR
38 dist-osx:
39         @if [ "x$(prefix)" != 'x/Library/Tor' ]; then \
40           echo "Configure with --prefix=/Library/Tor, please"; \
41           exit 1; \
42         fi; \
43         if [ "x$(bindir)" != 'x/Library/Tor' ]; then \
44           echo "Configure with --bindir=/Library/Tor, please"; \
45           exit 1; \
46         fi; \
47         if [ "x$(sysconfdir)" != 'x/Library' ]; then \
48           echo "Configure with --sysconfdir=/Library, please"; \
49           exit 1; \
50         fi; \
51         if [ "x$(CONFDIR)" != 'x/Library/Tor' ]; then \
52           echo "Configure with CONFDIR=/Library/Tor, please"; \
53         fi
54         $(MAKE) all
55         VERSION=$(VERSION) sh ./contrib/osx/package.sh
57 doxygen:
58         doxygen && cd doc/doxygen/latex && make
60 test:
61         ./src/or/test
63 # Avoid strlcpy.c, strlcat.c, tree.h
64 check-spaces:
65         ./contrib/checkSpace.pl -C                    \
66                 src/common/*.h                        \
67                 src/common/[^as]*.c                   \
68                 src/or/[^et]*.[ch] src/or/t*.c src/or/eventdns_tor.h
70 check-docs:
71         ./contrib/checkOptionDocs.pl
73 check-logs:
74         ./contrib/checkLogs.pl                        \
75                 src/*/*.[ch] | sort -n