server.mk (elpa): Do not make PDF and card documentation for the ELPA archive
[org-mode.git] / mk / server.mk
blob707740bc5314051cf7de3ee4eded895b8373aa53
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 ELPA archive)
17 $(info upload-release - clean up, populate the server with arhives)
18 $(info upload-elpa - clean up, populate the server with ELPA)
19 $(info upload-doc - clean up, populate the server with docs)
20 $(info upload - clean up, populate the server with everything)
22 helpserver::
23 @echo ""
25 #----------------------------------------------------------------------
27 # no slash / at the end
28 SERVROOT = /var/www/orgmode.org
29 SERVERMK = true # or just any value at all, really
31 #----------------------------------------------------------------------
33 ORGCOMM = README request-assign-future.txt lisp/ doc/
34 ORGFULL = $(ORGCOMM) Makefile \
35 mk/default.mk mk/targets.mk mk/version.mk \
36 mk/org-fixup.el \
37 etc/ contrib/
38 ORGFULL := $(ORGFULL:%/=%/*)
39 ORGELPA = $(ORGCOMM) etc/styles/ org-pkg.el
40 ORGELPA := $(ORGELPA:%/=%/*)
42 release: ORG_MAKE_DOC=info pdf card # do not make HTML documentation
43 release: cleanall doc rel-dirty tagwarn
44 rel-dirty rel-up: ORGDIR=org-$(GITVERSION:release_%=%)
45 rel-dirty:
46 @$(MAKE) GITVERSION=$(GITVERSION:release_%=%)-dist version autoloads
47 -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGRZIP)
48 ln -s . $(ORGDIR)
49 tar -zcf $(ORGDIR).tar.gz $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
50 zip -r9 $(ORGDIR).zip $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
51 -@$(RM) $(ORGDIR)
52 rel-up: rel-dirty
53 $(CP) $(ORGDIR).tar.gz $(ORGDIR).zip $(SERVROOT)/
55 PKG_TAG = $(shell date +%Y%m%d)
56 PKG_DOC = "Outline-based notes management and organizer"
57 PKG_REQ = "nil"
59 elpa: ORG_MAKE_DOC=info # do not make HTML PDF card documentation
60 elpa: cleanall doc elpa-dirty
61 elpa-dirty elpa-up: ORGDIR=org-$(PKG_TAG)
62 elpa-dirty:
63 @$(MAKE) GITVERSION=$(GITVERSION:release_%=%)-elpa version autoloads
64 -@$(RM) $(ORGDIR) $(ORGTAR) $(ORGZIP)
65 ln -s . $(ORGDIR)
66 echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" >org-pkg.el
67 tar --exclude=Makefile --transform='s:\(lisp\|doc\)/::' -cf $(ORGDIR).tar \
68 $(foreach dist, $(ORGELPA), $(ORGDIR)/$(dist))
69 -@$(RM) $(ORGDIR) org-pkg.el
70 elpa-up: elpa-dirty
71 $(CP) $(ORGDIR).tar $(SERVROOT)/pkg/daily/
73 tagwarn:
74 $(if $(filter-out $(ORGVERSION), $(GITVERSION)), \
75 $(info ======================================================) \
76 $(info = =) \
77 $(info = A release should only be made from a revision that =) \
78 $(info = has an annotated tag! =) \
79 $(info = =) \
80 $(info ======================================================))
82 version:
83 @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)$(ORGDIST)
84 @echo "ORGVERSION ?= $(ORGVERSION)" > mk/version.mk
85 @echo "GITVERSION ?= $(GITVERSION)" >> mk/version.mk
87 cleanall clean: cleanrel
88 cleanrel:
89 -$(RM) org-$(PKG_TAG)* org-$(DISTVERSION)* org-*.zip org-*.tar* mk/version.mk
91 doc-up:
92 $(MAKE) -C doc html manual guide
93 $(CP) doc/org.html $(SERVROOT)
94 $(CP) doc/manual/* $(SERVROOT)/manual
95 $(CP) doc/guide/* $(SERVROOT)/guide
97 upload upload-elpa upload-release upload-doc: ORG_MAKE_DOC=info pdf card
98 upload: cleanall doc elpa-up rel-up doc-up
99 upload-elpa: cleanall doc elpa-up
100 upload-release: cleanall doc rel-up
101 upload-doc: cleanall doc doc-up