Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | #****************************************************************************** |
michael@0 | 2 | # |
michael@0 | 3 | # Copyright (C) 2010-2011, International Business Machines Corporation and others. All Rights Reserved. |
michael@0 | 4 | # |
michael@0 | 5 | #****************************************************************************** |
michael@0 | 6 | # This is to be called from ../Makefile.in |
michael@0 | 7 | # |
michael@0 | 8 | # This will only work if subversion is installed. |
michael@0 | 9 | |
michael@0 | 10 | top_builddir = . |
michael@0 | 11 | |
michael@0 | 12 | include $(top_builddir)/icudefs.mk |
michael@0 | 13 | |
michael@0 | 14 | |
michael@0 | 15 | DISTY_TMP=dist/tmp |
michael@0 | 16 | DISTY_ICU=$(DISTY_TMP)/icu |
michael@0 | 17 | DISTY_DATA=$(DISTY_ICU)/source/data |
michael@0 | 18 | DISTY_RMV=brkitr coll curr lang locales mappings rbnf region translit xml zone |
michael@0 | 19 | DISTY_RMDIR=$(DISTY_RMV:%=$(DISTY_DATA)/%) |
michael@0 | 20 | DISTY_IN=$(DISTY_DATA)/in |
michael@0 | 21 | DOCZIP=icu-docs.zip |
michael@0 | 22 | |
michael@0 | 23 | SVNTOP=$(top_srcdir)/.. |
michael@0 | 24 | SVNDOT=$(SVNTOP)/.svn |
michael@0 | 25 | SVNVER=$(shell svnversion $(SVNTOP) | cut -d: -f1 | tr -cd 'a-zA-Z0-9') |
michael@0 | 26 | SVNURL=$(shell svn info $(SVNTOP) | grep '^URL:' | cut -d: -f2-) |
michael@0 | 27 | DISTY_VER=$(shell echo $(VERSION) | tr '.' '_' ) |
michael@0 | 28 | DISTY_PREFIX=icu4c |
michael@0 | 29 | DISTY_FILE_DIR=$(shell pwd)/$(DISTY_DIR) |
michael@0 | 30 | DISTY_FILE_TGZ=$(DISTY_FILE_DIR)/$(DISTY_PREFIX)-src-$(DISTY_VER)-r$(SVNVER).tgz |
michael@0 | 31 | DISTY_FILE_ZIP=$(DISTY_FILE_DIR)/$(DISTY_PREFIX)-src-$(DISTY_VER)-r$(SVNVER).zip |
michael@0 | 32 | DISTY_DOC_ZIP=$(DISTY_FILE_DIR)/$(DISTY_PREFIX)-docs-$(DISTY_VER)-r$(SVNVER).zip |
michael@0 | 33 | DISTY_DATA_ZIP=$(DISTY_FILE_DIR)/$(DISTY_PREFIX)-data-$(DISTY_VER)-r$(SVNVER).zip |
michael@0 | 34 | DISTY_DAT=$(firstword $(wildcard data/out/tmp/icudt$(SO_TARGET_VERSION_MAJOR)*.dat)) |
michael@0 | 35 | |
michael@0 | 36 | DISTY_FILES_SRC=$(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) |
michael@0 | 37 | DISTY_FILES=$(DISTY_FILES_SRC) $(DISTY_DOC_ZIP) |
michael@0 | 38 | |
michael@0 | 39 | $(SVNDOT): |
michael@0 | 40 | @echo "ERROR: 'dist' will not work unless the parent of the top_srcdir ( $(SVNTOP) ) is checked out from svn, and svn is installed." |
michael@0 | 41 | false |
michael@0 | 42 | |
michael@0 | 43 | $(DISTY_FILE_DIR): |
michael@0 | 44 | $(MKINSTALLDIRS) $(DISTY_FILE_DIR) |
michael@0 | 45 | |
michael@0 | 46 | $(DISTY_TMP): |
michael@0 | 47 | $(MKINSTALLDIRS) $(DISTY_TMP) |
michael@0 | 48 | |
michael@0 | 49 | $(DISTY_DOC_ZIP): $(SVNDOT) $(DOCZIP) $(DISTY_FILE_DIR) |
michael@0 | 50 | cp $(DOCZIP) $(DISTY_DOC_ZIP) |
michael@0 | 51 | |
michael@0 | 52 | $(DISTY_DAT): |
michael@0 | 53 | echo Missing $@ |
michael@0 | 54 | /bin/false |
michael@0 | 55 | |
michael@0 | 56 | $(DOCZIP): |
michael@0 | 57 | $(MAKE) -C . srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" builddir=. $@ |
michael@0 | 58 | |
michael@0 | 59 | $(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) $(DISTY_DATA_ZIP): $(SVNDOT) $(DISTY_DAT) $(DISTY_TMP) |
michael@0 | 60 | @echo "svnversion of $(SVNTOP) is as follows (if this fails, make sure svn is installed..)" |
michael@0 | 61 | svnversion $(SVNTOP) |
michael@0 | 62 | -$(RMV) $(DISTY_FILE) $(DISTY_TMP) |
michael@0 | 63 | $(MKINSTALLDIRS) $(DISTY_TMP) |
michael@0 | 64 | svn export -r $(shell echo $(SVNVER) | tr -d 'a-zA-Z' ) $(SVNURL) "$(DISTY_TMP)/icu" |
michael@0 | 65 | ( cd $(DISTY_TMP)/icu/source ; zip -rlq $(DISTY_DATA_ZIP) data ) |
michael@0 | 66 | $(RMV) $(DISTY_RMDIR) |
michael@0 | 67 | $(MKINSTALLDIRS) $(DISTY_IN) |
michael@0 | 68 | cp $(DISTY_DAT) $(DISTY_IN) |
michael@0 | 69 | ( cd $(DISTY_TMP)/icu ; python as_is/bomlist.py > as_is/bomlist.txt || rm -f as_is/bomlist.txt ) |
michael@0 | 70 | ( cd $(DISTY_TMP) ; tar cfpz $(DISTY_FILE_TGZ) icu ) |
michael@0 | 71 | ( cd $(DISTY_TMP) ; zip -rlq $(DISTY_FILE_ZIP) icu ) |
michael@0 | 72 | ls -l $(DISTY_FILE) |
michael@0 | 73 | |
michael@0 | 74 | dist-local: $(DISTY_FILES) |
michael@0 | 75 | |
michael@0 | 76 | distcheck: distcheck-tgz |
michael@0 | 77 | |
michael@0 | 78 | DISTY_CHECK=$(DISTY_TMP)/check |
michael@0 | 79 | |
michael@0 | 80 | distcheck-tgz: $(DISTY_FILE_TGZ) |
michael@0 | 81 | @echo Checking $(DISTY_FILE_TGZ) |
michael@0 | 82 | @-$(RMV) $(DISTY_CHECK) |
michael@0 | 83 | @$(MKINSTALLDIRS) $(DISTY_CHECK) |
michael@0 | 84 | @(cd $(DISTY_CHECK) && tar xfpz $(DISTY_FILE_TGZ) && cd icu/source && $(SHELL) ./configure $(DISTCHECK_CONFIG_OPTIONS) && $(MAKE) check $(DISTCHECK_MAKE_OPTIONS) ) && (echo "!!! PASS: $(DISTY_FILE_TGZ)" ) |