; * doc/org.texi (Key bindings and useful functions): Beautify table.
[org-mode/org-tableheadings.git] / mk / server.mk
blobdeba7cd508fa5ffea72742296138913d5d210e23
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 ORGFULL = README COPYING lisp/ \
35 Makefile request-assign-future.txt \
36 mk/default.mk mk/targets.mk mk/version.mk \
37 mk/org-fixup.el \
38 etc/ contrib/ doc/ testing/
39 ORGFULL := $(ORGFULL:%/=%/*)
40 ORGELPA = README_ELPA COPYING etc/ORG-NEWS lisp/ \
41 doc/dir doc/org doc/orgcard.pdf \
42 etc/styles/ org-pkg.el
43 ORGELPA := $(ORGELPA:%/=%/*)
44 ORGELPAPLUS := $(ORGELPA:org-pkg%=org-plus-contrib-pkg%)
46 release: cleanall info pdf card rel-dirty tagwarn
47 rel-dirty rel-up: ORGDIR=org-$(GITVERSION:release_%=%)
48 rel-dirty:
49 @$(MAKE) GITVERSION=$(GITVERSION:release_%=%)-dist version autoloads
50 -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGRZIP)
51 ln -s . $(ORGDIR)
52 tar -zcf $(ORGDIR).tar.gz $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
53 zip -r9 $(ORGDIR).zip $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
54 -@$(RM) $(ORGDIR)
55 rel-up: info pdf card rel-dirty
56 $(CP) $(ORGDIR).tar.gz $(ORGDIR).zip $(SERVROOT)/
58 PKG_TAG = $(shell date +%Y%m%d)
59 PKG_DOC = "Outline-based notes management and organizer"
60 PKG_REQ = "" # marmalade chokes on explicit "nil"
62 elpa: cleanall info card elpa-dirty
63 elpa-dirty elpa-up: ORGDIR=org-$(PKG_TAG)
64 elpa-dirty:
65 @$(MAKE) GITVERSION=$(GITVERSION:release_%=%)-elpa version autoloads
66 -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGZIP)
67 ln -s . $(ORGDIR)
68 echo "(define-package \"org\"" > org-pkg.el
69 echo " \"$(PKG_TAG)\" \"$(PKG_DOC)\" ($(PKG_REQ)))" >> org-pkg.el
70 echo ";; Local Variables:" >> org-pkg.el
71 echo ";; no-byte-compile: t" >> org-pkg.el
72 echo ";; End:" >> org-pkg.el
73 tar --exclude=Makefile \
74 --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 archive-contents
78 $(CP) archive-contents $(ORGDIR).tar $(SERVROOT)/elpa/
80 archive-contents:
81 echo "(1 (org . [($(PKG_TAG)) ($(PKG_REQ)) \"$(PKG_DOC)\" tar])" > $@
82 echo " (org-plus-contrib . [($(PKG_TAG)) ($(PKG_REQ)) \"$(PKG_DOC)\" tar]))" >> $@
84 elpaplus: cleanall info card elpaplus-dirty
85 elpaplus-dirty elpaplus-up: ORG_ADD_CONTRIB=org*.el ob-*.el ox-*.el
86 elpaplus-dirty elpaplus-up: ORGDIR=org-plus-contrib-$(PKG_TAG)
87 elpaplus-dirty:
88 @$(MAKE) GITVERSION=$(GITVERSION:release_%=%)-elpaplus version autoloads
89 -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGZIP)
90 ln -s . $(ORGDIR)
91 echo "(define-package \"org-plus-contrib\"" > org-plus-contrib-pkg.el
92 echo " \"$(PKG_TAG)\" \"$(PKG_DOC)\" ($(PKG_REQ)))" >> org-plus-contrib-pkg.el
93 echo ";; Local Variables:" >> org-plus-contrib-pkg.el
94 echo ";; no-byte-compile: t" >> org-plus-contrib-pkg.el
95 echo ";; End:" >> org-plus-contrib-pkg.el
96 tar --exclude=Makefile \
97 --transform='s:\(lisp\|doc\)/::' -cf $(ORGDIR).tar \
98 $(foreach dist, $(ORGELPAPLUS), $(ORGDIR)/$(dist))
99 -@$(RM) $(ORGDIR) org-plus-contrib-pkg.el
100 @$(MAKE) cleanlisp
101 elpaplus-up: info card elpaplus-dirty archive-contents
102 $(CP) archive-contents $(ORGDIR).tar $(SERVROOT)/elpa/
104 tagwarn:
105 $(if $(filter-out $(ORGVERSION), $(GITVERSION)), \
106 $(info ======================================================) \
107 $(info = =) \
108 $(info = A release should only be made from a revision that =) \
109 $(info = has an annotated tag! =) \
110 $(info = =) \
111 $(info ======================================================))
113 version:
114 @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)$(ORGDIST)
115 @echo "ORGVERSION ?= $(ORGVERSION)" > mk/version.mk
116 @echo "GITVERSION ?= $(GITVERSION)" >> mk/version.mk
118 cleanall clean: cleanrel
119 cleanrel:
120 -$(RM) archive-contents org-$(PKG_TAG)* org-$(DISTVERSION)* org-*.zip org-*.tar* mk/version.mk
122 doc-up: info pdf card html
123 $(MAKE) -C doc manual guide
124 $(CP) doc/org.html $(SERVROOT)
125 $(CP) doc/org.pdf $(SERVROOT)
126 $(CP) doc/orgguide.pdf $(SERVROOT)
127 $(CP) doc/manual/* $(SERVROOT)/manual
128 $(CP) doc/guide/* $(SERVROOT)/guide
130 upload: cleanall rel-up doc-up elpa-up elpaplus-up
131 upload-elpa: cleanall elpa-up
132 upload-elpaplus: cleanall elpaplus-up
133 upload-release: cleanall rel-up
134 upload-doc: cleanall doc-up