/override/bbdb/lisp/Makefile.am

https://github.com/jwiegley/dot-emacs · Makefile · 95 lines · 45 code · 11 blank · 39 comment · 2 complexity · bc90a6d255a34e235edc750b6c7cb621 MD5 · raw file

  1. # lisp/Makefile.am for BBDB
  2. #
  3. # Copyright (C) 2010-2014 Roland Winkler <winkler@gnu.org>
  4. # Author: Roland Winkler <winkler@gnu.org>
  5. # Christian Egli <christian.egli@sbs.ch>
  6. #
  7. # This file is part of the Insidious Big Brother Database (aka BBDB),
  8. #
  9. # BBDB is free software: you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation, either version 3 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # BBDB is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with BBDB. If not, see <http://www.gnu.org/licenses/>.
  21. # --batch implies --no-init-file, yet let's be explicit about what we want
  22. AM_ELCFLAGS += --no-init-file --no-site-file
  23. dist_lisp_LISP = \
  24. bbdb.el \
  25. bbdb-anniv.el \
  26. bbdb-com.el \
  27. bbdb-gnus.el \
  28. bbdb-ispell.el \
  29. bbdb-message.el \
  30. bbdb-mhe.el \
  31. bbdb-migrate.el \
  32. bbdb-mua.el \
  33. bbdb-pgp.el \
  34. bbdb-print.el \
  35. bbdb-rmail.el \
  36. bbdb-sc.el \
  37. bbdb-snarf.el \
  38. bbdb-site.el
  39. if VM
  40. dist_lisp_LISP += bbdb-vm.el
  41. # We use the Automake variable AM_ELCFLAGS to include the VM lisp directory
  42. # in the Emacs load path when compiling BBDB with VM support.
  43. endif
  44. lisp_DATA = bbdb-loaddefs.el
  45. MOSTLYCLEANFILES = bbdb-loaddefs.el
  46. CLEANFILES = bbdb-site.el bbdb-pkg.el
  47. # The Emacs function define-package is not autoloaded.
  48. # So we assume we need not compile bbdb-pkg.el (which otherwise
  49. # results in a compiler warning that define-package is not defined).
  50. EXTRA_DIST = bbdb-site.el.in bbdb-pkg.el makefile-temp
  51. bbdb-loaddefs.el: $(dist_lisp_LISP)
  52. # 2011-12-11: We switched from bbdb-autoloads.el to bbdb-loaddefs.el.
  53. # If the user still has an old bbdb-autoloads.el in the BBDB
  54. # lisp directory (and keeps loading it from the emacs init file),
  55. # we might get strange error messages that things fail.
  56. # So we throw an error if these old files are found.
  57. @if test -f bbdb-autoloads.el -o -f bbdb-autoloads.elc; then \
  58. (echo "*** ERROR: Old file(s) \`bbdb-autoloads.el(c)' found ***" ; \
  59. echo "*** Delete these files; do not load them from your init file ***") && \
  60. false ; \
  61. fi
  62. @echo "(provide 'bbdb-loaddefs)" > $@;
  63. @echo "(if (and load-file-name (file-name-directory load-file-name))" >> $@;
  64. @echo " (add-to-list 'load-path (file-name-directory load-file-name)))" >> $@;
  65. @echo " " >> $@;
  66. # Generated autoload-file must have an absolute path,
  67. # $srcdir can be relative.
  68. $(EMACS) --batch $(AM_ELCFLAGS) $(ELCFLAGS) \
  69. --load autoload \
  70. --eval '(setq generated-autoload-file "'$(abs_builddir)/$@'")' \
  71. --eval '(setq make-backup-files nil)' \
  72. --funcall batch-update-autoloads $(srcdir)
  73. # Generate bbdb-site.el here as pkgdatadir is only known at "make" time.
  74. # We protect the autoconf variables in the sed regular expressions
  75. # so as not to substitute them when processing Makefile.am.
  76. # Warning: the sed expressions will break if PACKAGE_VERSION, PACKAGE_DATE,
  77. # or pkgdatadir contain '='.
  78. bbdb-site.el: $(top_builddir)/config.status bbdb-site.el.in
  79. sed -e "s=[@]pkgdatadir[@]=$(pkgdatadir)=" \
  80. -e "s=[@]PACKAGE_VERSION[@]=$(PACKAGE_VERSION)=" \
  81. -e "s=[@]PACKAGE_DATE[@]=$(PACKAGE_DATE)=" \
  82. < $@.in > $@
  83. # Be sure bbdb-site.el exists early for "(require 'bbdb-site)"
  84. BUILT_SOURCES = bbdb-site.el