summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Tassin <fta@sofaraway.org>2007-09-24 22:46:54 +0000
committerFabien Tassin <fta@sofaraway.org>2007-09-24 22:46:54 +0000
commitcbb5597fee2871609a5fe05d014ef7c028bfef44 (patch)
treef9a84b9117e4e4db1fe65e6d7840fdc9e34b4e57
parent7c705089a1606a276d4f71f0f16b14e62f86cb12 (diff)
* Add DEBIAN_TAG and DEBIAN_BRANCH to fetch by tag or branch name
-rw-r--r--Makefile71
1 files changed, 56 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index e2abf32..d63980f 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,16 @@ CVS_LOC = :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
STAMP ?= stamped
+ifdef DEBIAN_TAG
+DEBIAN_CO_TAG = -r $(DEBIAN_TAG)
+DEBIAN_MOZ_CO_TAG = MOZ_CO_TAG=$(DEBIAN_TAG)
+else
ifdef DEBIAN_DATE
-DEBIAN_CO_DATE = $(shell echo "-D \"$(DEBIAN_DATE)\"" | sed -e 's/[rt]/ /')
+DEBIAN_CO_DATE = $(shell echo "-D \"$(DEBIAN_DATE)\"" | sed -e 's/[rt]/ /')
+endif
+ifdef DEBIAN_BRANCH
+DEBIAN_CO_TAG = -r $(DEBIAN_BRANCH)
+endif
endif
############################################################################
@@ -47,7 +55,19 @@ help:
@echo " you can also recreate a tarball from a specific timestamp by specifying"
@echo " DEBIAN_DATE in the form YYYYMMDDtHHMM"
@echo
- @echo " Ex: make DEBIAN_DATE=20070911t1711 nspr-orig"
+ @echo " Ex: make DEBIAN_DATE=20070911t1711 nspr-orig"
+ @echo
+ @echo " you can fetch a specific branch by specifying DEBIAN_BRANCH."
+ @echo
+ @echo " Ex: make DEBIAN_BRANCH=MOZILLA_1_9a8_MINIBRANCH firefox-orig"
+ @echo
+ @echo " It is also possible to use both DEBIAN_DATE and DEBIAN_BRANCH to fetch"
+ @echo " the content of a branch at a particular date"
+ @echo
+ @echo " Alternatively, you can fetch a specific CO tag using DEBIAN_TAG."
+ @echo " See 'make status' for a list of available tags."
+ @echo
+ @echo " Ex: make DEBIAN_TAG=MOZILLA_1_9a8_RELEASE firefox-orig"
deps:
@if [ ! -f /usr/bin/cvs ] ; then echo "**ERROR** Depends on missing cvs. Abort"; exit 1; fi
@@ -55,17 +75,17 @@ deps:
@if [ ! -f /usr/bin/wget ] ; then echo "**ERROR** Depends on missing wget. Abort"; exit 1; fi
$(MOZ_CLIENT): deps
- cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $@
+ cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $(DEBIAN_CO_TAG) $@
rm -rf .pc $(STAMP)
$(DEBIAN_FF3_FILE):
- cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $@
+ cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $(DEBIAN_CO_TAG) $@
$(DEBIAN_XUL_FILE):
- cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $@
+ cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $(DEBIAN_CO_TAG) $@
$(DEBIAN_NSS_FILE):
- cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $@
+ cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $(DEBIAN_CO_TAG) $@
$(DEBIAN_NSPR_FILE):
- cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $@
+ cvs -d $(CVS_LOC) co $(DEBIAN_CO_DATE) $(DEBIAN_CO_TAG) $@
client: $(STAMP)
@@ -89,10 +109,16 @@ all: $(DEBIAN_FF3_TARGET) $(DEBIAN_XUL_TARGET) $(DEBIAN_NSS_TARGET)
$(DEBIAN_FF3_TARGET): $(MOZ_CLIENT) $(STAMP) $(DEBIAN_FF3_FILE)
URL=$(DEBIAN_FF3_URL) ; \
+ if [ "$(DEBIAN_TAG)" != "" ] ; then \
+ DEBIAN_FF3_VERSION="`cat $(DEBIAN_FF3_FILE) | sed -e 's/a\([0-9]*\)/~alpha\1/; s/b\([0-9]*\)/~b\1/'`" ; \
+ DEBIAN_FF3_DATE=$$DEBIAN_FF3_VERSION ; \
+ make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=xulbrowser $(DEBIAN_MOZ_CO_TAG) ; \
+ else \
if [ "$(DEBIAN_DATE)" != "" ] ; then DEBIAN_FF3_DATE=$(DEBIAN_DATE) ; else DEBIAN_FF3_DATE=`$(GET)` ; fi ; \
- DEBIAN_FF3_CO_DATE="`echo $$DEBIAN_FF3_DATE | sed -e 's/[rt]/ /'`" ; \
- DEBIAN_FF3_VERSION="`cat $(DEBIAN_FF3_FILE) | sed -e 's/a\([0-9]*\)pre/~alpha\1/; s/b\([0-9]*\)pre/b\1/'`~cvs$$DEBIAN_FF3_DATE" ; \
- make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=xulbrowser MOZ_CO_DATE="$$DEBIAN_FF3_CO_DATE" && \
+ DEBIAN_FF3_CO_DATE=`echo "$$DEBIAN_FF3_DATE" | sed -e 's/[rt]/ /'` ; \
+ DEBIAN_FF3_VERSION="`cat $(DEBIAN_FF3_FILE) | sed -e 's/pre//; s/a\([0-9]*\)/~alpha\1/; s/b\([0-9]*\)/~b\1/; s/$$/~cvs'"$$DEBIAN_FF3_DATE"'/'`" ; \
+ make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=xulbrowser MOZ_CO_DATE="$$DEBIAN_FF3_CO_DATE" ; \
+ fi ; \
rm -rf $(DEBIAN_FF3_APPNAME)-$$DEBIAN_FF3_VERSION $(DEBIAN_FF3_APPNAME)_$$DEBIAN_FF3_VERSION.orig.tar.gz && \
mkdir $(DEBIAN_FF3_APPNAME)-$$DEBIAN_FF3_VERSION && \
echo "Creating $(DEBIAN_FF3_APPNAME)-$$DEBIAN_FF3_VERSION/browser-snapshot-$$DEBIAN_FF3_DATE.tar.bz2 ..." && \
@@ -105,10 +131,15 @@ $(DEBIAN_FF3_TARGET): $(MOZ_CLIENT) $(STAMP) $(DEBIAN_FF3_FILE)
$(DEBIAN_XUL_TARGET): $(MOZ_CLIENT) $(STAMP) $(DEBIAN_XUL_FILE)
URL=$(DEBIAN_XUL_URL) ; \
+ if [ "$(DEBIAN_TAG)" != "" ] ; then \
+ DEBIAN_XUL_VERSION="`tail -1 $(DEBIAN_XUL_FILE) | sed -e 's/\([ab]\)\([0-9]*\)/~\1\2/'`" ; \
+ make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=xulrunner $(DEBIAN_MOZ_CO_TAG) ; \
+ else \
if [ "$(DEBIAN_DATE)" != "" ] ; then DEBIAN_XUL_DATE=$(DEBIAN_DATE) ; else DEBIAN_XUL_DATE=`$(GET)` ; fi ; \
DEBIAN_XUL_CO_DATE="`echo $$DEBIAN_XUL_DATE | sed -e 's/[rt]/ /'`" ; \
- DEBIAN_XUL_VERSION="`tail -1 $(DEBIAN_XUL_FILE) | sed -e 's/\([ab]\)\([0-9]*\)pre/~\1\2/'`~cvs$$DEBIAN_XUL_DATE" ; \
- make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=xulrunner MOZ_CO_DATE="$$DEBIAN_XUL_CO_DATE" && \
+ DEBIAN_XUL_VERSION="`tail -1 $(DEBIAN_XUL_FILE) | sed -e 's/pre//; s/\([ab]\)\([0-9]*\)/~\1\2/'`~cvs$$DEBIAN_XUL_DATE" ; \
+ make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=xulrunner MOZ_CO_DATE="$$DEBIAN_XUL_CO_DATE" ; \
+ fi ; \
mkdir $(DEBIAN_XUL_APPNAME)-$$DEBIAN_XUL_VERSION && \
mv mozilla $(DEBIAN_XUL_APPNAME)-$$DEBIAN_XUL_VERSION && \
rm -f $(DEBIAN_XUL_APPNAME)_$$DEBIAN_XUL_VERSION.orig.tar.gz && \
@@ -119,10 +150,15 @@ $(DEBIAN_XUL_TARGET): $(MOZ_CLIENT) $(STAMP) $(DEBIAN_XUL_FILE)
$(DEBIAN_NSS_TARGET): $(MOZ_CLIENT) $(STAMP) $(DEBIAN_NSS_FILE)
URL=$(DEBIAN_NSS_URL) ; \
+ if [ "$(DEBIAN_TAG)" != "" ] ; then \
+ DEBIAN_NSS_VERSION="`grep -E '^\#define NSS_V(MAJOR|MINOR|PATCH)' $(DEBIAN_NSS_FILE) | awk '{print $$3}' | tr '\n' '.' | sed -e 's,\.$$,,'`~tag$(DEBIAN_TAG)" ; \
+ make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=nss $(DEBIAN_MOZ_CO_TAG) ; \
+ else \
if [ "$(DEBIAN_DATE)" != "" ] ; then DEBIAN_NSS_DATE=$(DEBIAN_DATE) ; else DEBIAN_NSS_DATE=`$(GET)` ; fi ; \
DEBIAN_NSS_CO_DATE="`echo $$DEBIAN_NSS_DATE | sed -e 's/[rt]/ /'`" ; \
- DEBIAN_NSS_VERSION="`grep -E '^\#define NSS_V(MAJOR|MINOR|PATCH)' $(DEBIAN_NSS_FILE) | awk '{print $$3}' | tr '\n' '.' | sed -e 's,\.$$,,'`'~cvs$$DEBIAN_NSS_DATE" ; \
- make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=nss MOZ_CO_DATE="$$DEBIAN_NSS_CO_DATE" && \
+ DEBIAN_NSS_VERSION="`grep -E '^\#define NSS_V(MAJOR|MINOR|PATCH)' $(DEBIAN_NSS_FILE) | awk '{print $$3}' | tr '\n' '.' | sed -e 's,\.$$,,'`~cvs$$DEBIAN_NSS_DATE" ; \
+ make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=nss MOZ_CO_DATE="$$DEBIAN_NSS_CO_DATE" ; \
+ fi ; \
mkdir $(DEBIAN_NSS_APPNAME)-$$DEBIAN_NSS_VERSION && \
mv mozilla $(DEBIAN_NSS_APPNAME)-$$DEBIAN_NSS_VERSION && \
rm -f $(DEBIAN_NSS_APPNAME)_$$DEBIAN_NSS_VERSION.orig.tar.gz && \
@@ -133,10 +169,15 @@ $(DEBIAN_NSS_TARGET): $(MOZ_CLIENT) $(STAMP) $(DEBIAN_NSS_FILE)
$(DEBIAN_NSPR_TARGET): $(MOZ_CLIENT) $(STAMP) $(DEBIAN_NSPR_FILE)
URL=$(DEBIAN_NSPR_URL) ; \
+ if [ "$(DEBIAN_TAG)" != "" ] ; then \
+ DEBIAN_NSPR_VERSION="`grep -E '^MOD_(MAJOR|MINOR|PATCH)_VERSION' $(DEBIAN_NSPR_FILE) | cut -d= -f2 | tr '\n' '.' | sed -e 's,\.$$,,'`~tag$(DEBIAN_TAG)" ; \
+ make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=nspr $(DEBIAN_MOZ_CO_TAG) ; \
+ else \
if [ "$(DEBIAN_DATE)" != "" ] ; then DEBIAN_NSPR_DATE=$(DEBIAN_DATE) ; else DEBIAN_NSPR_DATE=`$(GET)` ; fi ; \
DEBIAN_NSPR_CO_DATE="`echo $$DEBIAN_NSPR_DATE | sed -e 's/[rt]/ /'`" ; \
DEBIAN_NSPR_VERSION="`grep -E '^MOD_(MAJOR|MINOR|PATCH)_VERSION' $(DEBIAN_NSPR_FILE) | cut -d= -f2 | tr '\n' '.' | sed -e 's,\.$$,,'`~cvs$$DEBIAN_NSPR_DATE" ; \
- make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=nspr MOZ_CO_DATE="$$DEBIAN_NSPR_CO_DATE" && \
+ make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=nspr MOZ_CO_DATE="$$DEBIAN_NSPR_CO_DATE" ; \
+ fi ; \
mkdir $(DEBIAN_NSPR_APPNAME)-$$DEBIAN_NSPR_VERSION && \
mv mozilla $(DEBIAN_NSPR_APPNAME)-$$DEBIAN_NSPR_VERSION && \
rm -f $(DEBIAN_NSPR_APPNAME)_$$DEBIAN_NSPR_VERSION.orig.tar.gz && \