Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ifeq ($(MAKELEVEL), 0)
  2. $(error This make needs to be started as a sub-make from the toplevel directory.)
  3. endif
  4. LISPO = org-install.el
  5. LISPF = $(subst $(LISPO),,$(wildcard *.el))
  6. LISPC = $(LISPF:%el=%elc)
  7. .PHONY: all autoloads compile install clean cleanall clean-install
  8. all \
  9. compile \
  10. compile-dirty: $(LISPC)
  11. autoloads: $(LISPO)
  12. org-install.el: $(LISPF)
  13. $(BATCH) \
  14. --eval "(require 'autoload)" \
  15. --eval '(find-file "$(LISPO)")' \
  16. --eval '(erase-buffer)' \
  17. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
  18. --eval '(insert "\n(provide (quote org-install))\n")' \
  19. --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")' \
  20. --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")' \
  21. --eval '(save-buffer)'
  22. install: $(LISPF) compile autoloads
  23. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  24. $(CP) $(LISPC) $(LISPF) $(LISPO) $(lispdir)
  25. clean:
  26. $(RM) *.elc
  27. cleanall:
  28. $(RM) *.elc $(LISPO)
  29. clean-install:
  30. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  31. $(RM) $(lispdir)/org*.el* $(lispdir)/ob*.el*
  32. .SUFFIXES: # we don't need default suffix rules
  33. .SUFFIXES: .el .elc
  34. .el.elc:
  35. $(ELC) $<