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