summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2012-08-26 10:18:23 +0200
committerAchim Gratz <Stromeko@Stromeko.DE>2012-08-26 10:32:11 +0200
commitee9e27e66eb8abe0822ba1e10859f02a3c5675da (patch)
treeef1085e0176b67d2eaac1cefe21bc6d9c8d935bc
parentf8cc3189f5ec9a3cb79d7302bd8d396bd6ce34ac (diff)
downloadorg-mode-ee9e27e66eb8abe0822ba1e10859f02a3c5675da.tar.gz
server.mk: add version.mk to distribution archives
* targets.mk: If $(ORGVERSION) and $(GITVERSION) are not defined and cannot be determined from Git, try to read `version.mk´. Fall back to "N/A" if still no definition has been made. * utils/server.mk: Create `version.mk´ for each distribution. Append "-dist" and "-elpa" to $(GITVERSION) to easily recognize builds from distribution archives. Remove `version.mk´ in `cleanrel´ and use the same globbing patterns as .gitignore. * .gitignore: Add "version.mk", also ignore ELPA archive (no ".gz" suffix) and only "org-version.el" (no globbing).
-rw-r--r--.gitignore5
-rw-r--r--targets.mk1
-rw-r--r--utils/server.mk25
3 files changed, 20 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 4000f68..8d30432 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,9 +31,10 @@ orgcard_letter.tex
orgcard.txt
org
org-install.el
-org-version.*
-org-*.tar.gz
+org-version.el
+org-*.tar*
org-*.zip
+version.mk
manual
org_dual_license.texi
ORGWEBPAGE/Changes.txt
diff --git a/targets.mk b/targets.mk
index 78f1268..bc93ce0 100644
--- a/targets.mk
+++ b/targets.mk
@@ -22,6 +22,7 @@ ifneq ($(wildcard .git),)
ORGVERSION ?= $(subst release_,,$(shell git describe --abbrev=0 HEAD))
GITSTATUS ?= $(shell git status -uno --porcelain)
else
+ -include version.mk
GITVERSION ?= N/A
ORGVERSION ?= N/A
endif
diff --git a/utils/server.mk b/utils/server.mk
index 9964ed0..d579b38 100644
--- a/utils/server.mk
+++ b/utils/server.mk
@@ -6,7 +6,7 @@
elpa elpa-dirty elpa-up \
doc-up \
upload-release upload-elpa upload-doc upload \
- tagwarn
+ tagwarn version.mk
help helpall helpserver::
$(info )
@@ -21,15 +21,17 @@ helpserver::
#----------------------------------------------------------------------
ORGCOMM = README request-assign-future.txt lisp/ doc/
-ORGFULL = $(ORGCOMM) Makefile default.mk targets.mk etc/ contrib/ utils/
+ORGFULL = $(ORGCOMM) Makefile default.mk targets.mk version.mk \
+ etc/ contrib/ utils/
ORGFULL := $(ORGFULL:%/=%/*)
ORGELPA = $(ORGCOMM) etc/styles/ org-pkg.el
ORGELPA := $(ORGELPA:%/=%/*)
release: ORG_MAKE_DOC=info pdf card # do not make HTML documentation
-release: cleanall doc autoloads rel-dirty
+release: cleanall doc rel-dirty
rel-dirty rel-up: ORGDIR=org-$(GITVERSION:release_%=%)
-rel-dirty:
+rel-dirty rel-up: ORGDIST=-dist
+rel-dirty: autoloads version.mk
-@$(RM) $(ORGDIR) $(ORGRTAR) $(ORGRZIP)
ln -s . $(ORGDIR)
tar -zcf $(ORGDIR).tar.gz $(foreach dist, $(ORGFULL), $(ORGDIR)/$(dist))
@@ -37,7 +39,7 @@ rel-dirty:
-@$(RM) $(ORGDIR)
$(if $(filter-out $(ORGVERSION), $(GITVERSION)), \
@$(MAKE) tagwarn)
- @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)
+ @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)$(ORGDIST)
rel-up: rel-dirty
$(CP) $(ORGDIR).tar.gz $(ORGDIR).zip $(SERVROOT)/
@@ -48,7 +50,8 @@ PKG_REQ = "nil"
elpa: ORG_MAKE_DOC=info pdf card # do not make HTML documentation
elpa: cleanall doc elpa-dirty
elpa-dirty elpa-up: ORGDIR=org-$(PKG_TAG)
-elpa-dirty: autoloads
+elpa-dirty elpa-up: ORGDIST=-elpa
+elpa-dirty: autoloads version.mk
-@$(RM) $(ORGDIR) $(ORGTAR) $(ORGZIP)
ln -s . $(ORGDIR)
echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" >org-pkg.el
@@ -57,7 +60,7 @@ elpa-dirty: autoloads
-@$(RM) $(ORGDIR) org-pkg.el
$(if $(filter-out $(ORGVERSION), $(GITVERSION)), \
@$(MAKE) tagwarn)
- @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)
+ @echo ORGVERSION=$(ORGVERSION) GITVERSION=$(GITVERSION)$(ORGDIST)
elpa-up: elpa-dirty
$(CP) $(ORGDIR).tar $(SERVROOT)/pkg/daily/
@@ -70,9 +73,13 @@ tagwarn:
$(info ======================================================)
@echo ""
-clean: cleanrel
+version.mk:
+ @echo "ORGVERSION ?= $(ORGVERSION)" > $@
+ @echo "GITVERSION ?= $(GITVERSION)$(ORGDIST)" >> $@
+
+cleanall clean: cleanrel
cleanrel:
- $(RM) org-7.* org-20??????*
+ -$(RM) org-*.zip org-*.tar* version.mk
doc-up:
$(MAKE) -C doc html manual guide