Makefile.am 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #
  2. # ngIRCd -- The Next Generation IRC Daemon
  3. # Copyright (c)2001-2012 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. AUTOMAKE_OPTIONS = gnu
  12. SUBDIRS = doc src man contrib
  13. EXTRA_DIST = autogen.sh configure.ng .mailmap
  14. clean-local:
  15. rm -f build-stamp*
  16. rm -rf ngircd.dest
  17. maintainer-clean-local:
  18. rm -rf autom4te.cache
  19. rm -f Makefile.in Makefile aclocal.m4 configure configure.ac
  20. rm -f ar-lib mkinstalldirs missing depcomp install-sh
  21. rm -f config.log debian
  22. testsuite:
  23. cd src/testsuite && make check
  24. lint:
  25. cd src/ngircd && make lint
  26. srcdoc:
  27. cd doc && make srcdoc
  28. have-xcodebuild:
  29. @xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
  30. >/dev/null 2>&1 \
  31. || ( echo; echo "Error: \"xcodebuild\" not found!"; echo; exit 1 )
  32. have-packagemaker:
  33. @packagemaker >/dev/null 2>&1; [ $$? -le 1 ] \
  34. || ( echo; echo "Error: \"packagemaker\" not found!"; echo; exit 2)
  35. xcode: have-xcodebuild
  36. rel=`git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'`; \
  37. def="GCC_PREPROCESSOR_DEFINITIONS=\"VERSION=\\\"$$rel\\\"\""; \
  38. xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
  39. -configuration Default $$def build
  40. xcode-clean: have-xcodebuild
  41. xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
  42. -configuration Default clean
  43. rm -fr contrib/MacOSX/build
  44. rpm: distcheck
  45. rpm -ta ngircd-*.tar.gz
  46. deb:
  47. [ -f debian/rules ] || ln -s contrib/Debian debian
  48. dpkg-buildpackage -rfakeroot -i
  49. osxpkg: have-packagemaker osxpkg-dest
  50. cd contrib/MacOSX && packagemaker \
  51. --doc ngIRCd.pmdoc \
  52. --out ../../$(distdir).mpkg
  53. rm -f $(distdir).mpkg.zip
  54. zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
  55. rm -rf ngircd.dest $(distdir).mpkg
  56. osxpkg-dest: have-xcodebuild clean
  57. ./configure --prefix=/opt/ngircd
  58. make xcode
  59. make -C contrib/MacOSX de.barton.ngircd.plist
  60. mkdir -p ngircd.dest/opt/ngircd/sbin
  61. DESTDIR="$$PWD/ngircd.dest" make -C doc install
  62. DESTDIR="$$PWD/ngircd.dest" make -C contrib install
  63. DESTDIR="$$PWD/ngircd.dest" make -C man install
  64. cp contrib/MacOSX/build/Default/ngIRCd \
  65. ngircd.dest/opt/ngircd/sbin/ngircd
  66. rm ngircd.dest/opt/ngircd/etc/ngircd.conf
  67. echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
  68. chmod -R a-s,og-w,a+rX ngircd.dest
  69. .PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-dest rpm \
  70. srcdoc testsuite xcode xcode-clean
  71. # -eof-