Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .NOTPARALLEL: # always run this make serially
  2. .SUFFIXES: # we don't need default suffix rules
  3. ifeq ($(MAKELEVEL), 0)
  4. $(error This make needs to be started as a sub-make from the toplevel directory.)
  5. endif
  6. LISPV = org-version.el
  7. LISPI = org-install.el
  8. LISPA = $(LISPV) $(LISPI)
  9. LISPF = $(filter-out $(LISPA),$(wildcard *.el))
  10. LISPC = $(LISPF:%el=%elc)
  11. NOSTOP = all compile compile-dirty
  12. DOSTOP = compile-stop compile-stop-dirty
  13. .PHONY: $(NOSTOP) $(DOSTOP) \
  14. autoloads $(LISPA) \
  15. install clean cleanauto cleanall clean-install \
  16. # do not clean here, done in toplevel make
  17. $(NOSTOP) $(DOSTOP):: $(LISPV)
  18. $(ELCDIR)
  19. $(NOSTOP)::
  20. $(MAKE) cleanauto
  21. autoloads: $(LISPA)
  22. $(LISPV):
  23. @echo "org-version: $(ORGVERSION) ($(GITVERSION))"
  24. @$(MAKE_ORG_VERSION)
  25. $(LISPI): $(LISPV)
  26. @echo "org-install: $(ORGVERSION) ($(GITVERSION))"
  27. $(MAKE_ORG_INSTALL)
  28. install: $(LISPF) compile
  29. if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
  30. $(MKDIR) $(DESTDIR)$(lispdir) ; \
  31. fi ;
  32. $(MAKE) autoloads
  33. $(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
  34. $(MAKE) cleanauto
  35. cleanauto clean cleanall::
  36. $(RM) $(LISPA) $(LISPA:%el=%elc)
  37. clean cleanall::
  38. $(RM) *.elc
  39. clean-install:
  40. if [ -d $(DESTDIR)$(lispdir) ] ; then \
  41. $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
  42. fi ;