]> arthur.barton.de Git - ngircd-alex.git/blob - Makefile.am
b451b78b0447710a6915302a43be9573f67e59d5
[ngircd-alex.git] / Makefile.am
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 # Please read the file COPYING, README and AUTHORS for more information.
10 #
11
12 AUTOMAKE_OPTIONS = gnu
13
14 SUBDIRS = doc src man contrib
15
16 EXTRA_DIST = autogen.sh configure.ng .mailmap
17
18 clean-local:
19         rm -f build-stamp*
20         rm -rf ngircd.dest
21
22 maintainer-clean-local:
23         rm -rf autom4te.cache
24         rm -f Makefile.in Makefile aclocal.m4 configure
25         rm -f mkinstalldirs missing depcomp install-sh
26         rm -f config.log debian
27
28 testsuite:
29         make -C src/testsuite check
30
31 lint:
32         make -C src/ngircd lint
33
34 srcdoc:
35         make -C doc srcdoc
36
37 have-xcodebuild:
38         @xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
39          >/dev/null 2>&1 \
40          || ( echo; echo "Error: \"xcodebuild\" not found!"; echo; exit 1 )
41
42 have-packagemaker:
43         @packagemaker >/dev/null 2>&1; [ $$? -le 1 ] \
44          || ( echo; echo "Error: \"packagemaker\" not found!"; echo; exit 2)
45
46 xcode: have-xcodebuild
47         rel=`git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'`; \
48          def="GCC_PREPROCESSOR_DEFINITIONS=\"VERSION=\\\"$$rel\\\"\""; \
49          xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
50          -configuration Default $$def build
51
52 xcode-clean: have-xcodebuild
53         xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
54          -configuration Default clean
55         rm -fr contrib/MacOSX/build
56
57 rpm: distcheck
58         rpm -ta ngircd-*.tar.gz
59
60 deb:
61         [ -f debian/rules ] || ln -s contrib/Debian debian
62         dpkg-buildpackage -rfakeroot -i
63
64 osxpkg: have-packagemaker osxpkg-dest
65         cd contrib/MacOSX && packagemaker \
66          --doc ngIRCd.pmdoc \
67          --out ../../$(distdir).mpkg
68         rm -f $(distdir).mpkg.zip
69         zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
70         rm -rf ngircd.dest $(distdir).mpkg
71
72 osxpkg-dest: have-xcodebuild clean
73         ./configure --prefix=/opt/ngircd
74         make xcode
75         make -C contrib/MacOSX de.barton.ngircd.plist
76         mkdir -p ngircd.dest/opt/ngircd/sbin
77         DESTDIR="$$PWD/ngircd.dest" make -C doc install
78         DESTDIR="$$PWD/ngircd.dest" make -C contrib install
79         DESTDIR="$$PWD/ngircd.dest" make -C man install
80         cp contrib/MacOSX/build/Default/ngIRCd \
81          ngircd.dest/opt/ngircd/sbin/ngircd
82         rm ngircd.dest/opt/ngircd/etc/ngircd.conf
83         echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
84         chmod -R a-s,og-w,a+rX ngircd.dest
85
86 .PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-dest rpm \
87         srcdoc testsuite xcode xcode-clean
88
89 # -eof-