Makefile.am 2.5 KB

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