Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ORG-INSTALL = $(BATCH) \
  2. --eval "(require 'autoload)" \
  3. --eval '(find-file "$(LISPO)")' \
  4. --eval '(erase-buffer)' \
  5. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
  6. --eval '(insert "\n(provide (quote org-install))\n")' \
  7. --eval '(insert "\n(defconst org-release \"$(ORGVERSION)\"\n \"The release version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \
  8. --eval '(insert "\n(defconst org-git-version \"$(GITVERSION)\"\n \"The Git version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \
  9. --eval '(insert "\n(defconst org-odt-data-dir \"$(datadir)\"\n \"The location of ODT styles.\")\n")' \
  10. --eval '(save-buffer)'
  11. -include local.mk # optional local customization
  12. .NOTPARALLEL: # always run this make serially
  13. .SUFFIXES: # we don't need default suffix rules
  14. ifeq ($(MAKELEVEL), 0)
  15. $(error This make needs to be started as a sub-make from the toplevel directory.)
  16. endif
  17. LISPO = org-install.el
  18. LISPF = $(subst $(LISPO),,$(wildcard *.el))
  19. LISPC = $(LISPF:%el=%elc)
  20. .PHONY: all compile compile-dirty autoloads install clean cleanall clean-install
  21. all \
  22. compile \
  23. compile-dirty: cleanauto
  24. $(ELCDIR)
  25. autoloads: $(LISPO)
  26. org-install.el: $(LISPF)
  27. $(ORG-INSTALL)
  28. install: $(LISPF) compile autoloads
  29. if [ ! -d $(DESTDIR)$(lispdir) ]; then $(MKDIR) $(DESTDIR)$(lispdir); else true; fi ;
  30. $(CP) $(LISPC) $(LISPF) $(LISPO) $(DESTDIR)$(lispdir)
  31. clean:
  32. $(RM) *.elc
  33. cleanauto:
  34. $(RM) $(LISPO) $(LISPO:%el=%elc)
  35. cleanall:
  36. $(RM) *.elc $(LISPO)
  37. clean-install:
  38. if [ ! -d $(DESTDIR)$(lispdir) ]; then $(MKDIR) $(DESTDIR)$(lispdir); else true; fi ;
  39. $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el*