summaryrefslogtreecommitdiff
path: root/src/mozclient.mk.in
diff options
context:
space:
mode:
authorFabien Tassin <fta@sofaraway.org>2008-01-31 16:15:39 +0100
committerFabien Tassin <fta@sofaraway.org>2008-01-31 16:15:39 +0100
commitd86b223953fa5c006a7658531625f3c6e5561f7f (patch)
tree5e7ddcbe1669f516ec8d16a1ff9300056b2b59ab /src/mozclient.mk.in
parent773040a50388ad0fe682e93dbcad9881a5cf8b56 (diff)
* Add support in mozclient for DEBIAN_TAG for nss and nspr by not using
mozilla/client.mk for those two. - update src/mozclient.mk.in and README - update src/{nspr,nss}.mk.in - drop src/patches/{nspr,nss}_target.patch - update src/patches/xulbrowser_target.patch - update src/patches/series
Diffstat (limited to 'src/mozclient.mk.in')
-rw-r--r--src/mozclient.mk.in40
1 files changed, 32 insertions, 8 deletions
diff --git a/src/mozclient.mk.in b/src/mozclient.mk.in
index 3453834..459bee7 100644
--- a/src/mozclient.mk.in
+++ b/src/mozclient.mk.in
@@ -39,7 +39,9 @@
# project.mk contains the following parameters
# - MOZCLIENT_TARGET (mandatory): a label, usually 'project-orig'
# - MOZCLIENT_APPNAME (mandatory): package name
-# - MOZCLIENT_PROJECT (mandatory): CVS project name
+# - MOZCLIENT_MODULES (optional): list of modules/directories for direct checkout
+# - MOZCLIENT_PROJECT (mandatory): CVS project name. If $(NULL), then
+#  $(MOZCLIENT_MODULES) becomes mandatory
# - MOZCLIENT_BRANCH (optional): CVS branch name
# - MOZCLIENT_FILE (mandatory): source file containing the version
# - MOZCLIENT_GETVERSION (mandatory): how to transform the version
@@ -110,15 +112,17 @@ mozclient-deps:
@if [ ! -f /usr/bin/quilt ] ; then echo "**ERROR** Depends on missing quilt. Abort"; exit 1; fi
@if [ ! -f /usr/bin/wget ] ; then echo "**ERROR** Depends on missing wget. Abort"; exit 1; fi
+mozclient-dir:
+ rm -rf $(MOZCLIENT_TMP)
+ mkdir $(MOZCLIENT_TMP)
+
# Get the client
ifneq (,$(MOZCLIENT_BRANCH))
$(MOZ_CLIENT): MOZCLIENT_TBRANCH = -r $(MOZCLIENT_BRANCH)
else
$(MOZ_CLIENT): MOZCLIENT_TBRANCH = $(NULL)
endif
-$(MOZ_CLIENT): mozclient-deps
- rm -rf $(MOZCLIENT_TMP)
- mkdir $(MOZCLIENT_TMP)
+$(MOZ_CLIENT): mozclient-deps mozclient-dir
cd $(MOZCLIENT_TMP) && cvs -d $(MOZCLIENT_CVS_LOC) co $(MOZCLIENT_TBRANCH) $(DEBIAN_CO_DATE) $(DEBIAN_CO_TAG) $@
mozclient-client: $(MOZCLIENT_TMP)/$(MOZCLIENT_STAMP)
@@ -150,6 +154,9 @@ mozclient-clean:
rm -rf $(MOZCLIENT_TMP)
# Checkout using either a TAG, a date or nothing (last commit date)
+# Use mozclient.mk if $(MOZCLIENT_PROJECT) is specified, otherwise, do a direct cvs checkout
+# using $(MOZCLIENT_MODULES)
+ifneq (,$(MOZCLIENT_PROJECT))
ifneq (,$(DEBIAN_TAG))
mozclient-checkout: MOZCLIENT_DATE = $(NULL)
else
@@ -157,14 +164,27 @@ ifneq (,$(DEBIAN_DATE))
mozclient-checkout: MOZCLIENT_DATE = MOZ_CO_DATE="$(DEBIAN_DATE)"
else
mozclient-checkout: DEBIAN_DATE = $(shell $(MOZCLIENT_GETDATE))
-mozclient-checkout: MOZCLIENT_DATE = MOZ_CO_DATE="$(shell echo $(DEBIAN_DATE) | $(DATE_FILTER))"
+mozclient-checkout: MOZCLIENT_DATE = MOZ_CO_DATE="$(shell echo $(DEBIAN_DATE) | $(DATE_FILTER))"
endif
endif
mozclient-checkout:
- @echo DEBIAN_DATE=$(DEBIAN_DATE)
cd $(MOZCLIENT_TMP) && make -f $(MOZ_CLIENT) checkout MOZ_CO_PROJECT=$(MOZCLIENT_PROJECT) $(MOZCLIENT_DATE) $(DEBIAN_MOZ_CO_TAG)
- @echo DEBIAN_DATE=$(DEBIAN_DATE)
echo $(DEBIAN_DATE) > $(MOZCLIENT_TMP)/.date
+else
+ifneq (,$(DEBIAN_TAG))
+mozclient-checkout: MOZCLIENT_DATE = $(NULL)
+else
+ifneq (,$(DEBIAN_DATE))
+mozclient-checkout: MOZCLIENT_DATE = -D "$(DEBIAN_DATE)"
+else
+mozclient-checkout: DEBIAN_DATE = $(shell $(MOZCLIENT_GETDATE))
+mozclient-checkout: MOZCLIENT_DATE = -D "$(shell echo $(DEBIAN_DATE) | $(DATE_FILTER))"
+endif
+endif
+mozclient-checkout:
+ cd $(MOZCLIENT_TMP) && cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot -q -z 3 co -P -A $(MOZCLIENT_DATE) $(MOZCLIENT_MODULES)
+ echo $(DEBIAN_DATE) > $(MOZCLIENT_TMP)/.date
+endif
# Remove bin-only files using the remove.binonly.sh script.
# Keep a log in REMOVED+nobinonly.txt
@@ -198,8 +218,12 @@ endif
-ls -l $(MOZCLIENT_APPNAME)_$(MOZCLIENT_VERSION).orig.tar.gz
# The real target
+ifneq (,$(MOZCLIENT_PROJECT))
$(MOZCLIENT_TARGET): $(MOZ_CLIENT) $(MOZCLIENT_TMP)/$(MOZCLIENT_STAMP) mozclient-checkout mozclient-remove-bin mozclient-pack
+else
+$(MOZCLIENT_TARGET): mozclient-deps mozclient-dir mozclient-checkout mozclient-remove-bin mozclient-pack
+endif
get-orig-source: $(MOZCLIENT_TARGET)
-.PHONY: mozclient-patch mozclient-unpatch mozclient-checkout mozclient-remove-bin mozclient-pack $(MOZCLIENT_TARGET) get-orig-source
+.PHONY: mozclient-deps mozclient-dir mozclient-patch mozclient-unpatch mozclient-checkout mozclient-remove-bin mozclient-pack $(MOZCLIENT_TARGET) get-orig-source