Makefile.am 2.8 KB

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