Makefile 1.4 KB

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