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 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
)
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 \
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_
%=%)
46 @
$(MAKE
) GITVERSION
=$(GITVERSION
:release_
%=%)-dist version autoloads
47 -@
$(RM
) $(ORGDIR
) $(ORGTAR
) $(ORGRZIP
)
49 tar -zcf
$(ORGDIR
).
tar.gz
$(foreach dist, $(ORGFULL
), $(ORGDIR
)/$(dist))
50 zip
-r9
$(ORGDIR
).zip
$(foreach dist, $(ORGFULL
), $(ORGDIR
)/$(dist))
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"
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
)
63 @
$(MAKE
) GITVERSION
=$(GITVERSION
:release_
%=%)-elpa version autoloads
64 -@
$(RM
) $(ORGDIR
) $(ORGTAR
) $(ORGZIP
)
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
71 $(CP
) $(ORGDIR
).
tar $(SERVROOT
)/pkg
/daily
/
74 $(if
$(filter-out $(ORGVERSION
), $(GITVERSION
)), \
75 $(info ======================================================) \
77 $(info = A release should only be made from a revision that
=) \
78 $(info = has an annotated tag
! =) \
80 $(info ======================================================))
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
89 -$(RM
) org-
$(PKG_TAG
)* org-
$(DISTVERSION
)* org-
*.zip org-
*.
tar* mk
/version.mk
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