Makefile 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. org-version.el
  45. all \
  46. compile \
  47. compile-dirty: cleanauto org-version.el
  48. $(ELCDIR)
  49. autoloads: $(LISPO)
  50. org-version.el: $(LISPF)
  51. $(ORG-VERSION)
  52. org-install.el: org-version.el
  53. $(ORG-INSTALL)
  54. install: $(LISPF) compile autoloads
  55. if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
  56. $(MKDIR) $(DESTDIR)$(lispdir) ; \
  57. fi ;
  58. $(CP) $(LISPC) $(LISPF) $(LISPO) $(DESTDIR)$(lispdir)
  59. clean:
  60. $(RM) *.elc
  61. cleanauto: # internal target
  62. $(RM) $(LISPO) $(LISPO:%el=%elc)
  63. cleanall:
  64. $(RM) *.elc $(LISPO)
  65. clean-install:
  66. if [ -d $(DESTDIR)$(lispdir) ] ; then \
  67. $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
  68. fi ;