Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 '(save-buffer)'
  10. -include local.mk # optional local customization
  11. .NOTPARALLEL: # always run this make serially
  12. .SUFFIXES: # we don't need default suffix rules
  13. ifeq ($(MAKELEVEL), 0)
  14. $(error This make needs to be started as a sub-make from the toplevel directory.)
  15. endif
  16. LISPO = org-install.el
  17. LISPF = $(subst $(LISPO),,$(wildcard *.el))
  18. LISPC = $(LISPF:%el=%elc)
  19. .PHONY: all compile compile-dirty autoloads install clean cleanall clean-install
  20. all \
  21. compile \
  22. compile-dirty: cleanauto
  23. $(ELCDIR)
  24. autoloads: $(LISPO)
  25. org-install.el: $(LISPF)
  26. $(ORG-INSTALL)
  27. install: $(LISPF) compile autoloads
  28. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  29. $(CP) $(LISPC) $(LISPF) $(LISPO) $(lispdir)
  30. clean:
  31. $(RM) *.elc
  32. cleanauto:
  33. $(RM) $(LISPO) $(LISPO:%el=%elc)
  34. cleanall:
  35. $(RM) *.elc $(LISPO)
  36. clean-install:
  37. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  38. $(RM) $(lispdir)/org*.el* $(lispdir)/ob*.el*