The default target should be "all"
[org-mode.git] / maint-targets.mk
blobf44888cd3825ee92ffe623c68b33937ecd9b45f4
1 .PHONY: p g html_manual html_guide \
2 testrelease release fixrelease \
3 relup makerelease sync_release sync_manual \
4 distfile pkg push pushtag pushreleasetag
5 .NOTPARALLEL: .PHONY
6 # Below here are special targets for maintenance only
8 p: pdf
9 open doc/org.pdf
11 g: pdf
12 open doc/orgguide.pdf
14 html_manual html_guide:
15 $(MAKE) -C doc $(@:html_%=%)
17 testrelease:
18 git checkout -b testrelease origin/maint
19 git merge -s recursive -X theirs master
20 UTILITIES/set-version.pl testing
21 git commit -a -m "Release testing"
22 make distfile TAG=testversion
23 make cleanrel
24 rm -rf org-testversion*
25 git reset --hard
26 git checkout master
27 git branch -D testrelease
29 # The following target makes a full release for the stuff that is
30 # currently on master. Do it like this:
32 # make release TAG=7.01
34 release:
35 git checkout maint
36 git merge -s recursive -X theirs master
37 UTILITIES/set-version.pl $(TAG)
38 git commit -a -m "Release $(TAG)"
39 make relup TAG=$(TAG)
40 make cleanrel
41 rm -rf org-$(TAG)
42 rm -f org-$(TAG)*.zip
43 rm -f org-$(TAG)*.tar.gz
44 make pushreleasetag TAG=$(TAG)
45 git push -f origin maint
46 git checkout master
47 git merge -s ours maint
48 UTILITIES/set-version.pl -a $(TAG)
49 git commit -a -m "Update website to show $(TAG) as current release"
50 git push
52 # The following target makes a release, but from the stuff that is on
53 # maint, not from the stuff that is on master. The idea is that it pushes
54 # out a minor fix into a minor update, while development on master
55 # already went full steam ahead. To make a micro-relesse, cherry-pick
56 # the necessary changes into maint, then run (with proper version number)
57 # This is just like release, but we skip the step which merges master
58 # into maint.
60 # make fixrelease TAG=7.01.02
62 fixrelease:
63 git checkout maint
64 git merge -s recursive -X theirs master
65 UTILITIES/set-version.pl $(TAG)
66 git commit -a -m "Release $(TAG)"
67 make relup TAG=$(TAG)
68 make cleanrel
69 rm -rf org-$(TAG)
70 rm org-$(TAG)*.zip
71 rm org-$(TAG)*.tar.gz
72 make pushreleasetag TAG=$(TAG)
73 git push -f origin maint
74 git checkout master
75 git merge -s ours maint
76 UTILITIES/set-version.pl -o $(TAG)
77 git commit -a -m "Update website to show $(TAG) as current release"
78 git push
80 # ~$ make relup only makes sense from orgmode.org server
81 # Don't call it from your computer!
82 relup:
83 ${MAKE} makerelease
84 ${MAKE} sync_release
85 ${MAKE} sync_manual
87 makerelease:
88 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
89 ${MAKE} distfile
90 ${MAKE} doc
91 UTILITIES/gplmanual.pl
92 ${MAKE} html_manual
93 ${MAKE} html_guide
94 rm -rf RELEASEDIR
95 $(MKDIR) RELEASEDIR
96 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
97 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
98 cp doc/org_dual_license.texi RELEASEDIR
99 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
100 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
101 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
103 # ~$ make sync_release only makes sense from orgmode.org server
104 # Don't call it from your computer!
105 sync_release:
106 rsync -avuz RELEASEDIR/ /var/www/orgmode.org/
108 # ~$ make sync_manual only makes sense from orgmode.org server
109 # Don't call it from your computer!
110 sync_manual:
111 rsync -avuz --delete doc/manual/ /var/www/orgmode.org/manual/
112 rsync -avuz --delete doc/guide/ /var/www/orgmode.org/guide/
114 distfile:
115 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
116 touch doc/org.texi doc/orgcard.tex # force update
117 ${MAKE} cleancontrib
118 ${MAKE} info
119 ${MAKE} doc
120 ${MAKE} lisp/org-install.el
121 rm -rf org-$(TAG) org-$(TAG).zip
122 $(MKDIR) org-$(TAG)
123 $(MKDIR) org-$(TAG)/doc
124 $(MKDIR) org-$(TAG)/lisp
125 cp -r $(LISPFILES) org-$(TAG)/lisp
126 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
127 cp -r $(DISTFILES_extra) org-$(TAG)/
128 cp -r README_DIST org-$(TAG)/README
129 zip -r org-$(TAG).zip org-$(TAG)
130 tar zcvf org-$(TAG).tar.gz org-$(TAG)
132 pkg:
133 @if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
134 touch doc/org.texi doc/orgcard.tex # force update
135 ${MAKE} info
136 ${MAKE} doc
137 rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
138 $(MKDIR) org-$(PKG_TAG)
139 cp -r $(PKG_FILES) org-$(PKG_TAG)
140 echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
141 tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
143 push:
144 git push orgmode@orgmode.org:org-mode.git master
146 pushtag:
147 git tag -m "Adding tag" -a $(TAG)
148 git push orgmode@orgmode.org:org-mode.git $(TAG)
150 pushreleasetag:
151 git tag -m "Adding release tag" -a release_$(TAG)
152 git push orgmode@orgmode.org:org-mode.git release_$(TAG)