1 #----------------------------------------------------------------------
2 # This file is used for maintenance of org on the server.
3 #----------------------------------------------------------------------
5 release rel-dirty rel-up cleanrel \
6 elpa elpa-dirty elpa-up \
8 upload-release upload-elpa upload-doc upload \
11 help helpall helpserver
::
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
)
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 \
39 ORGFULL
:= $(ORGFULL
:%/=%/*)
40 ORGELPA
= README_ELPA COPYING 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_
%=%)
49 @
$(MAKE
) GITVERSION
=$(GITVERSION
:release_
%=%)-dist version autoloads
50 -@
$(RM
) $(ORGDIR
) $(ORGTAR
) $(ORGRZIP
)
52 tar -zcf
$(ORGDIR
).
tar.gz
$(foreach dist, $(ORGFULL
), $(ORGDIR
)/$(dist))
53 zip
-r9
$(ORGDIR
).zip
$(foreach dist, $(ORGFULL
), $(ORGDIR
)/$(dist))
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
)
65 @
$(MAKE
) GITVERSION
=$(GITVERSION
:release_
%=%)-elpa version autoloads
66 -@
$(RM
) $(ORGDIR
) $(ORGTAR
) $(ORGZIP
)
68 echo
"(define-package \"org\"" > org-pkg.el
69 echo
" \"$(PKG_TAG)\" \"$(PKG_DOC)\" ($(PKG_REQ)))" >> org-pkg.el
70 echo
";; no-byte-compile: t" >> org-pkg.el
71 tar --exclude
=Makefile
--exclude
="org-colview-xemacs.el" \
72 --transform
='s:\(lisp\|doc\)/::' -cf
$(ORGDIR
).
tar \
73 $(foreach dist, $(ORGELPA
), $(ORGDIR
)/$(dist))
74 -@
$(RM
) $(ORGDIR
) org-pkg.el
75 elpa-up
: info card elpa-dirty archive-contents
76 $(CP
) archive-contents
$(ORGDIR
).
tar $(SERVROOT
)/elpa
/
79 echo
"(1 (org . [($(PKG_TAG)) ($(PKG_REQ)) \"$(PKG_DOC)\" tar])" > $@
80 echo
" (org-plus-contrib . [($(PKG_TAG)) ($(PKG_REQ)) \"$(PKG_DOC)\" tar]))" >> $@
82 elpaplus
: cleanall
info card elpaplus-dirty
83 elpaplus-dirty elpaplus-up
: ORG_ADD_CONTRIB
=org-
*
84 elpaplus-dirty elpaplus-up
: ORGDIR
=org-plus-contrib-
$(PKG_TAG
)
86 @
$(MAKE
) GITVERSION
=$(GITVERSION
:release_
%=%)-elpaplus version autoloads
87 -@
$(RM
) $(ORGDIR
) $(ORGTAR
) $(ORGZIP
)
89 echo
"(define-package \"org-plus-contrib\"" > org-plus-contrib-pkg.el
90 echo
" \"$(PKG_TAG)\" \"$(PKG_DOC)\" ($(PKG_REQ)))" >> org-plus-contrib-pkg.el
91 echo
";; no-byte-compile: t" >> org-plus-contrib-pkg.el
92 tar --exclude
=Makefile
--exclude
="org-colview-xemacs.el" \
93 --transform
='s:\(lisp\|doc\)/::' -cf
$(ORGDIR
).
tar \
94 $(foreach dist, $(ORGELPAPLUS
), $(ORGDIR
)/$(dist))
95 -@
$(RM
) $(ORGDIR
) org-plus-contrib-pkg.el
97 elpaplus-up
: info card elpaplus-dirty archive-contents
98 $(CP
) archive-contents
$(ORGDIR
).
tar $(SERVROOT
)/elpa
/
101 $(if
$(filter-out $(ORGVERSION
), $(GITVERSION
)), \
102 $(info ======================================================) \
104 $(info = A release should only be made from a revision that
=) \
105 $(info = has an annotated tag
! =) \
107 $(info ======================================================))
110 @echo ORGVERSION
=$(ORGVERSION
) GITVERSION
=$(GITVERSION
)$(ORGDIST
)
111 @echo
"ORGVERSION ?= $(ORGVERSION)" > mk
/version.mk
112 @echo
"GITVERSION ?= $(GITVERSION)" >> mk
/version.mk
114 cleanall
clean: cleanrel
116 -$(RM
) archive-contents org-
$(PKG_TAG
)* org-
$(DISTVERSION
)* org-
*.zip org-
*.
tar* mk
/version.mk
118 doc-up
: info pdf card html
119 $(MAKE
) -C doc manual guide
120 $(CP
) doc
/org.html
$(SERVROOT
)
121 $(CP
) doc
/manual
/* $(SERVROOT
)/manual
122 $(CP
) doc
/guide
/* $(SERVROOT
)/guide
124 upload
: cleanall rel-up doc-up elpa-up elpaplus-up
125 upload-elpa
: cleanall elpa-up
126 upload-elpaplus
: cleanall elpaplus-up
127 upload-release
: cleanall rel-up
128 upload-doc
: cleanall doc-up