Makefile 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ORG-INSTALL = $(BATCH) \
  2. --eval '(require '"'"'autoload)' \
  3. --eval '(find-file "org-install.el")' \
  4. --eval '(erase-buffer)' \
  5. --eval '(insert ";;; org-install.el --- autogenerated file, do not edit\n;;\n;;; Code:\n")' \
  6. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x)))\
  7. (quote ($(LISPF) org-version.el)))' \
  8. --eval '(insert "\f\n(provide '"'"'org-install)\n")' \
  9. --eval '(insert ";; Local Variables:\n;; version-control: never\n")' \
  10. --eval '(insert ";; no-byte-compile: t\n;; no-update-autoloads: t\n")' \
  11. --eval '(insert ";; coding: utf-8\n;; End:\n;;; org-install.el ends here\n")' \
  12. --eval '(save-buffer)'
  13. ORG-VERSION = $(BATCH) \
  14. --eval '(find-file "org-version.el")' \
  15. --eval '(erase-buffer)' \
  16. --eval '(insert ";;; org-version.el --- autogenerated file, do not edit\n;;\n;;; Code:\n")' \
  17. --eval '(insert ";;;\#\#\#autoload\n")' \
  18. --eval '(insert "(defconst org-release \"$(ORGVERSION)\"\n")' \
  19. --eval '(insert " \"The release version of org-mode.\n")' \
  20. --eval '(insert " Inserted by installing org-mode or when a release is made.\")\n")' \
  21. --eval '(insert ";;;\#\#\#autoload\n")' \
  22. --eval '(insert "(defconst org-git-version \"$(GITVERSION)\"\n")' \
  23. --eval '(insert " \"The Git version of org-mode.\n")' \
  24. --eval '(insert " Inserted by installing org-mode or when a release is made.\")\n")' \
  25. --eval '(insert ";;;\#\#\#autoload\n")' \
  26. --eval '(insert "(defconst org-odt-data-dir \"$(datadir)\"\n")' \
  27. --eval '(insert " \"The location of ODT styles.\")\n")' \
  28. --eval '(insert ";; Local Variables:\n;; version-control: never\n")' \
  29. --eval '(insert ";; no-byte-compile: t\n")' \
  30. --eval '(insert ";; coding: utf-8\n;; End:\n;;; org-version.el ends here\n")' \
  31. --eval '(save-buffer)'
  32. -include local.mk # optional local customization
  33. .NOTPARALLEL: # always run this make serially
  34. .SUFFIXES: # we don't need default suffix rules
  35. ifeq ($(MAKELEVEL), 0)
  36. $(error This make needs to be started as a sub-make from the toplevel directory.)
  37. endif
  38. LISPO = org-install.el org-version.el # autogenerated files
  39. LISPF = $(filter-out $(LISPO),$(wildcard *.el))
  40. LISPC = $(LISPF:%el=%elc)
  41. .PHONY: all compile compile-dirty \
  42. autoloads \
  43. install clean cleanauto cleanall clean-install
  44. all \
  45. compile \
  46. compile-dirty: cleanauto
  47. $(ELCDIR)
  48. autoloads: $(LISPO)
  49. org-version.el: $(LISPF)
  50. $(ORG-VERSION)
  51. org-install.el: org-version.el
  52. $(ORG-INSTALL)
  53. install: $(LISPF) compile autoloads
  54. if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
  55. $(MKDIR) $(DESTDIR)$(lispdir) ; \
  56. fi ;
  57. $(CP) $(LISPC) $(LISPF) $(LISPO) $(DESTDIR)$(lispdir)
  58. clean:
  59. $(RM) *.elc
  60. cleanauto: # internal target
  61. $(RM) $(LISPO) $(LISPO:%el=%elc)
  62. cleanall:
  63. $(RM) *.elc $(LISPO)
  64. clean-install:
  65. if [ -d $(DESTDIR)$(lispdir) ] ; then \
  66. $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
  67. fi ;