Makefile.am 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # ngIRCd -- The Next Generation IRC Daemon
  3. # Copyright (c)2001-2015 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 .clang_complete .mailmap
  14. clean-local: osxpkg-clean
  15. rm -f build-stamp*
  16. maintainer-clean-local:
  17. rm -rf autom4te.cache
  18. rm -f Makefile.in Makefile aclocal.m4 configure configure.ac
  19. rm -f ar-lib mkinstalldirs missing depcomp install-sh
  20. rm -f config.log debian
  21. testsuite:
  22. cd src/testsuite && make check
  23. lint:
  24. cd src/ngircd && make lint
  25. srcdoc:
  26. cd doc && make 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 --no-recommend \
  50. --doc ngIRCd.pmdoc \
  51. --out ../../$(distdir).mpkg
  52. rm -f $(distdir).mpkg.zip
  53. zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
  54. make osxpkg-clean
  55. osxpkg-clean:
  56. [ ! -r ngircd.dest ] || sudo -n rm -rf ngircd.dest
  57. rm -rf ngircd.dest $(distdir).mpkg
  58. osxpkg-dest: have-xcodebuild osxpkg-clean clean
  59. ./configure --prefix=/opt/ngircd
  60. make xcode
  61. make -C contrib/MacOSX de.barton.ngircd.plist
  62. mkdir -p ngircd.dest/opt/ngircd/sbin
  63. DESTDIR="$$PWD/ngircd.dest" make -C doc install
  64. DESTDIR="$$PWD/ngircd.dest" make -C contrib install
  65. DESTDIR="$$PWD/ngircd.dest" make -C man install
  66. cp contrib/MacOSX/build/Default/ngIRCd \
  67. ngircd.dest/opt/ngircd/sbin/ngircd
  68. rm ngircd.dest/opt/ngircd/etc/ngircd.conf
  69. echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
  70. chmod -R a-s,og-w,a+rX ngircd.dest
  71. sudo chown -R root:wheel ngircd.dest
  72. .PHONY: deb have-packagemaker have-xcodebuild lint osxpkg osxpkg-clean \
  73. osxpkg-dest rpm srcdoc testsuite xcode xcode-clean
  74. # -eof-