Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 = $(filter-out $(LISPN:%el=%elc),$(LISPF:%el=%elc))
  11. .PHONY: all compile compile-dirty \
  12. autoloads \
  13. install clean cleanauto cleanall clean-install
  14. # do not clean here, done in toplevel make
  15. all compile:: autoloads
  16. all compile compile-dirty:: $(LISPI) $(LISPV)
  17. $(ELCDIR)
  18. autoloads: cleanauto $(LISPI) $(LISPV)
  19. $(LISPV): $(LISPF)
  20. @echo "org-version: $(ORGVERSION) ($(GITVERSION))"
  21. @$(RM) $(@)
  22. @$(MAKE_ORG_VERSION)
  23. $(LISPI): $(LISPV) $(LISPF)
  24. @echo "org-install: $(ORGVERSION) ($(GITVERSION))"
  25. @$(RM) $(@)
  26. @$(MAKE_ORG_INSTALL)
  27. install: $(LISPF) compile
  28. if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
  29. $(MKDIR) $(DESTDIR)$(lispdir) ; \
  30. fi ;
  31. $(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
  32. cleanauto clean cleanall::
  33. $(RM) $(LISPA) $(LISPA:%el=%elc)
  34. clean cleanall::
  35. $(RM) *.elc
  36. clean-install:
  37. if [ -d $(DESTDIR)$(lispdir) ] ; then \
  38. $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
  39. fi ;