Reorder the README files.
[org-mode.git] / mk / server.mk
blob5e5cc253c1a48026cd9d8dea283cdd74b426f076
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 version
11 help helpall helpserver::
12 $(info )
13 $(info Maintenance)
14 $(info ===========)
15 $(info release - clean up, create the distribution archives)
16 $(info elpa - clean up, create the org-*.tar ELPA archive)
17 $(info elpaplus - clean up, create the org-plus-contrib-*.tar ELPA archive)
18 $(info upload-release - clean up, populate the server with arhives)
19 $(info upload-elpa - clean up, populate the server with org-*.tar)
20 $(info upload-elpaplus - clean up, populate the server with org-plus-contrib-*.tar)
21 $(info upload-doc - clean up, populate the server with docs)
22 $(info upload - clean up, populate the server with everything)
24 helpserver::
25 @echo ""
27 #----------------------------------------------------------------------
29 SERVROOT ?= /var/www/orgmode.org
30 SERVERMK ?= true # or just any value at all, really
32 #----------------------------------------------------------------------
34 ORGREADMECOMM = README
35 ORGREADMEELPA = README_ELPA
37 ORGCOMM = lisp/
38 ORGFULL = $(ORGCOMM) $(ORGREADMECOMM) \
39 Makefile request-assign-future.txt \
40 mk/default.mk mk/targets.mk mk/version.mk \
41 mk/org-fixup.el \
42 etc/ contrib/ doc/
43 ORGFULL := $(ORGFULL:%/=%/*)
44 ORGELPA = $(ORGCOMM) $(ORGREADMEELPA) \
45 doc/dir doc/org doc/orgcard.pdf \
46 etc/styles/ org-pkg.el
47 ORGELPA := $(ORGELPA:%/=%/*)
48 ORGELPAPLUS := $(ORGELPA:org-pkg%=org-plus-contrib-pkg%)
50 release: cleanall info pdf card rel-dirty tagwarn
51 rel-dirty rel-up: ORGDIR=org-$(GITVERSION:release_%=%)
52 rel-dirty:
53 @$(MAKE) GITVERSION=$(GITVERSION:release_%=%)-dist version autoloads
54 -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGRZIP)
55 ln -s . $(ORGDIR)
56 tar -zcf $(ORGDIR).tar.gz $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
57 zip -r9 $(ORGDIR).zip $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
58 -@$(RM) $(ORGDIR)
59 rel-up: info pdf card rel-dirty
60 $(CP) $(ORGDIR).tar.gz $(ORGDIR).zip $(SERVROOT)/
62 PKG_TAG = $(shell date +%Y%m%d)
63 PKG_DOC = "Outline-based notes management and organizer"
64 PKG_REQ = "" # marmalade chokes on explicit "nil"
66 elpa: cleanall info card elpa-dirty
67 elpa-dirty elpa-up: ORGDIR=org-$(PKG_TAG)
68 elpa-dirty:
69 @$(MAKE) GITVERSION=$(GITVERSION:release_%=%)-elpa version autoloads
70 -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGZIP)
71 ln -s . $(ORGDIR)
72 echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" \
73 > org-pkg.el
74 tar --exclude=Makefile --transform='s:\(lisp\|doc\)/::' -cf $(ORGDIR).tar \
75 $(foreach dist, $(ORGELPA), $(ORGDIR)/$(dist))
76 -@$(RM) $(ORGDIR) org-pkg.el
77 elpa-up: info card elpa-dirty
78 $(CP) $(ORGDIR).tar $(SERVROOT)/pkg/daily/
81 elpaplus: cleanall info card elpaplus-dirty
82 elpaplus-dirty elpaplus-up: ORG_ADD_CONTRIB=org-*
83 elpaplus-dirty elpaplus-up: ORGDIR=org-plus-contrib-$(PKG_TAG)
84 elpaplus-dirty:
85 @$(MAKE) GITVERSION=$(GITVERSION:release_%=%)-elpaplus version autoloads
86 -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGZIP)
87 ln -s . $(ORGDIR)
88 echo "(define-package \"org-plus-contrib\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" \
89 > org-plus-contrib-pkg.el
90 tar --exclude=Makefile --transform='s:\(lisp\|doc\)/::' -cf $(ORGDIR).tar \
91 $(foreach dist, $(ORGELPAPLUS), $(ORGDIR)/$(dist))
92 -@$(RM) $(ORGDIR) org-plus-contrib-pkg.el
93 @$(MAKE) cleanlisp
94 elpaplus-up: info card elpaplus-dirty
95 $(CP) $(ORGDIR).tar $(SERVROOT)/pkg/daily/
97 tagwarn:
98 $(if $(filter-out $(ORGVERSION), $(GITVERSION)), \
99 $(info ======================================================) \
100 $(info = =) \
101 $(info = A release should only be made from a revision that =) \
102 $(info = has an annotated tag! =) \
103 $(info = =) \
104 $(info ======================================================))
106 version:
107 @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)$(ORGDIST)
108 @echo "ORGVERSION ?= $(ORGVERSION)" > mk/version.mk
109 @echo "GITVERSION ?= $(GITVERSION)" >> mk/version.mk
111 cleanall clean: cleanrel
112 cleanrel:
113 -$(RM) org-$(PKG_TAG)* org-$(DISTVERSION)* org-*.zip org-*.tar* mk/version.mk
115 doc-up: info pdf card html
116 $(MAKE) -C doc manual guide
117 $(CP) doc/org.html $(SERVROOT)
118 $(CP) doc/manual/* $(SERVROOT)/manual
119 $(CP) doc/guide/* $(SERVROOT)/guide
121 upload: cleanall elpa-up rel-up doc-up elpaplus-up
122 upload-elpa: cleanall elpa-up
123 upload-elpaplus: cleanall elpaplus-up
124 upload-release: cleanall rel-up
125 upload-doc: cleanall doc-up