server.mk 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #----------------------------------------------------------------------
  2. # This file is used for maintenance of org on the server.
  3. #----------------------------------------------------------------------
  4. .PHONY: helpserver release rel-dirty cleanrel tagwarn
  5. help helpall helpserver::
  6. $(info )
  7. $(info Maintenance)
  8. $(info ===========)
  9. $(info release - clean up and create TAR/ZIP release archives)
  10. $(info elpa - clean up and create ELPA TAR archive)
  11. helpserver::
  12. @echo ""
  13. #----------------------------------------------------------------------
  14. ORGCOMM = README request-assign-future.txt lisp/ doc/
  15. ORGFULL = $(ORGCOMM) Makefile default.mk targets.mk etc/ contrib/ utils/
  16. ORGFULL := $(ORGFULL:%/=%/*)
  17. ORGELPA = $(ORGCOMM) etc/styles/ org-pkg.el
  18. ORGELPA := $(ORGELPA:%/=%/*)
  19. release: ORG_MAKE_DOC=info pdf card # do not make HTML documentation
  20. release: cleanall doc autoloads rel-dirty
  21. rel-dirty: ORGDIR=org-$(GITVERSION:release_%=%)
  22. rel-dirty:
  23. -@$(RM) $(ORGDIR) $(ORGRTAR) $(ORGRZIP)
  24. ln -s . $(ORGDIR)
  25. tar -zcf $(ORGDIR).tar.gz $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
  26. zip -r9 $(ORGDIR).zip $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
  27. -@$(RM) $(ORGDIR)
  28. $(if $(filter-out $(ORGVERSION), $(GITVERSION)), \
  29. @$(MAKE) tagwarn)
  30. @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)
  31. PKG_TAG = $(shell date +%Y%m%d)
  32. PKG_DOC = "Outline-based notes management and organizer"
  33. PKG_REQ = "nil"
  34. elpa: ORG_MAKE_DOC=info pdf card # do not make HTML documentation
  35. elpa: cleanall doc elpa-dirty
  36. elpa-dirty: ORGDIR=org-$(PKG_TAG)
  37. elpa-dirty: autoloads
  38. -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGZIP)
  39. ln -s . $(ORGDIR)
  40. echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" >org-pkg.el
  41. tar --exclude=Makefile --transform='s:\(lisp\|doc\)/::' -cf $(ORGDIR).tar \
  42. $(foreach dist, $(ORGELPA), $(ORGDIR)/$(dist))
  43. -@$(RM) $(ORGDIR) org-pkg.el
  44. $(if $(filter-out $(ORGVERSION), $(GITVERSION)), \
  45. @$(MAKE) tagwarn)
  46. @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)
  47. tagwarn:
  48. $(info ======================================================)
  49. $(info = =)
  50. $(info = A release should only be made from a revision that =)
  51. $(info = has an annotated tag! =)
  52. $(info = =)
  53. $(info ======================================================)
  54. @echo ""
  55. clean: cleanrel
  56. cleanrel:
  57. $(RM) org-7.* org-20??????*