server.mk 3.1 KB

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