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 SERVROOT ?
= /var
/www
/orgmode.org
28 SERVERMK ?
= true
# or just any value at all, really
30 #----------------------------------------------------------------------
32 ORGCOMM
= README lisp
/
33 ORGFULL
= $(ORGCOMM
) Makefile request-assign-future.txt \
34 mk
/default.mk mk
/targets.mk mk
/version.mk \
37 ORGFULL
:= $(ORGFULL
:%/=%/*)
38 ORGELPA
= $(ORGCOMM
) doc
/dir doc
/org doc
/orgcard.pdf \
39 etc
/styles
/ org-pkg.el
40 ORGELPA
:= $(ORGELPA
:%/=%/*)
42 release
: cleanall
info pdf card rel-dirty tagwarn
43 rel-dirty rel-up
: ORGDIR
=org-
$(GITVERSION
:release_
%=%)
45 @
$(MAKE
) GITVERSION
=$(GITVERSION
:release_
%=%)-dist version autoloads
46 -@
$(RM
) $(ORGDIR
) $(ORGTAR
) $(ORGRZIP
)
48 tar -zcf
$(ORGDIR
).
tar.gz
$(foreach dist, $(ORGFULL
), $(ORGDIR
)/$(dist))
49 zip
-r9
$(ORGDIR
).zip
$(foreach dist, $(ORGFULL
), $(ORGDIR
)/$(dist))
51 rel-up
: info pdf card rel-dirty
52 $(CP
) $(ORGDIR
).
tar.gz
$(ORGDIR
).zip
$(SERVROOT
)/
54 PKG_TAG
= $(shell date
+%Y
%m
%d
)
55 PKG_DOC
= "Outline-based notes management and organizer"
58 elpa
: cleanall
info card elpa-dirty
59 elpa-dirty elpa-up
: ORGDIR
=org-
$(PKG_TAG
)
61 @
$(MAKE
) GITVERSION
=$(GITVERSION
:release_
%=%)-elpa version autoloads
62 -@
$(RM
) $(ORGDIR
) $(ORGTAR
) $(ORGZIP
)
64 echo
"(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" \
66 tar --exclude
=Makefile
--transform
='s:\(lisp\|doc\)/::' -cf
$(ORGDIR
).
tar \
67 $(foreach dist, $(ORGELPA
), $(ORGDIR
)/$(dist))
68 -@
$(RM
) $(ORGDIR
) org-pkg.el
69 elpa-up
: info card elpa-dirty
70 $(CP
) $(ORGDIR
).
tar $(SERVROOT
)/pkg
/daily
/
73 $(if
$(filter-out $(ORGVERSION
), $(GITVERSION
)), \
74 $(info ======================================================) \
76 $(info = A release should only be made from a revision that
=) \
77 $(info = has an annotated tag
! =) \
79 $(info ======================================================))
82 @echo ORGVERSION
=$(ORGVERSION
) GITVERSION
=$(GITVERSION
)$(ORGDIST
)
83 @echo
"ORGVERSION ?= $(ORGVERSION)" > mk
/version.mk
84 @echo
"GITVERSION ?= $(GITVERSION)" >> mk
/version.mk
86 cleanall
clean: cleanrel
88 -$(RM
) org-
$(PKG_TAG
)* org-
$(DISTVERSION
)* org-
*.zip org-
*.
tar* mk
/version.mk
90 doc-up
: info pdf card html
91 $(MAKE
) -C doc manual guide
92 $(CP
) doc
/org.html
$(SERVROOT
)
93 $(CP
) doc
/manual
/* $(SERVROOT
)/manual
94 $(CP
) doc
/guide
/* $(SERVROOT
)/guide
96 upload
: cleanall elpa-up rel-up doc-up
97 upload-elpa
: cleanall elpa-up
98 upload-release
: cleanall rel-up
99 upload-doc
: cleanall doc-up