]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | # Copyright (C) 2016 and later: Unicode, Inc. and others. |
2 | # License & terms of use: http://www.unicode.org/copyright.html | |
729e4ab9 A |
3 | #****************************************************************************** |
4 | # | |
4388f060 | 5 | # Copyright (C) 2010-2011, International Business Machines Corporation and others. All Rights Reserved. |
729e4ab9 A |
6 | # |
7 | #****************************************************************************** | |
8 | # This is to be called from ../Makefile.in | |
9 | # | |
10 | # This will only work if subversion is installed. | |
f3c0d7a5 A |
11 | # You must checkout ICU4C at the `/icu` or `/icu/icu4c` level - not just `…/source` |
12 | # also note that `make dist` does NOT reflect any local modifications - it only does a fresh SVN export. | |
729e4ab9 A |
13 | |
14 | top_builddir = . | |
15 | ||
16 | include $(top_builddir)/icudefs.mk | |
17 | ||
0f5d89e8 | 18 | DISTY_DIR=dist |
729e4ab9 A |
19 | DISTY_TMP=dist/tmp |
20 | DISTY_ICU=$(DISTY_TMP)/icu | |
21 | DISTY_DATA=$(DISTY_ICU)/source/data | |
0f5d89e8 | 22 | DISTY_RMV=brkitr coll curr lang locales mappings rbnf region translit xml zone misc/*.txt misc/*.mk unit |
729e4ab9 A |
23 | DISTY_RMDIR=$(DISTY_RMV:%=$(DISTY_DATA)/%) |
24 | DISTY_IN=$(DISTY_DATA)/in | |
25 | DOCZIP=icu-docs.zip | |
26 | ||
27 | SVNTOP=$(top_srcdir)/.. | |
729e4ab9 A |
28 | SVNVER=$(shell svnversion $(SVNTOP) | cut -d: -f1 | tr -cd 'a-zA-Z0-9') |
29 | SVNURL=$(shell svn info $(SVNTOP) | grep '^URL:' | cut -d: -f2-) | |
30 | DISTY_VER=$(shell echo $(VERSION) | tr '.' '_' ) | |
31 | DISTY_PREFIX=icu4c | |
32 | DISTY_FILE_DIR=$(shell pwd)/$(DISTY_DIR) | |
33 | DISTY_FILE_TGZ=$(DISTY_FILE_DIR)/$(DISTY_PREFIX)-src-$(DISTY_VER)-r$(SVNVER).tgz | |
34 | DISTY_FILE_ZIP=$(DISTY_FILE_DIR)/$(DISTY_PREFIX)-src-$(DISTY_VER)-r$(SVNVER).zip | |
35 | DISTY_DOC_ZIP=$(DISTY_FILE_DIR)/$(DISTY_PREFIX)-docs-$(DISTY_VER)-r$(SVNVER).zip | |
4388f060 | 36 | DISTY_DATA_ZIP=$(DISTY_FILE_DIR)/$(DISTY_PREFIX)-data-$(DISTY_VER)-r$(SVNVER).zip |
0f5d89e8 | 37 | DISTY_DAT:=$(firstword $(wildcard data/out/tmp/icudt$(SO_TARGET_VERSION_MAJOR)*.dat)) |
729e4ab9 A |
38 | |
39 | DISTY_FILES_SRC=$(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) | |
40 | DISTY_FILES=$(DISTY_FILES_SRC) $(DISTY_DOC_ZIP) | |
0f5d89e8 A |
41 | # colon-equals because we watn to run this once! |
42 | EXCLUDES_FILE:=$(shell mktemp) | |
729e4ab9 | 43 | |
729e4ab9 A |
44 | $(DISTY_FILE_DIR): |
45 | $(MKINSTALLDIRS) $(DISTY_FILE_DIR) | |
46 | ||
47 | $(DISTY_TMP): | |
48 | $(MKINSTALLDIRS) $(DISTY_TMP) | |
49 | ||
f3c0d7a5 | 50 | $(DISTY_DOC_ZIP): $(DOCZIP) $(DISTY_FILE_DIR) |
729e4ab9 | 51 | cp $(DOCZIP) $(DISTY_DOC_ZIP) |
0f5d89e8 | 52 | ln -sf $(shell basename $(DISTY_DOC_ZIP)) $(DISTY_FILE_DIR)/icu4c-docs.zip |
729e4ab9 A |
53 | |
54 | $(DISTY_DAT): | |
55 | echo Missing $@ | |
56 | /bin/false | |
57 | ||
0f5d89e8 | 58 | # make sure we get the non-lgpl docs |
729e4ab9 | 59 | $(DOCZIP): |
0f5d89e8 A |
60 | -$(RMV) "$(top_builddir)"/doc |
61 | "$(MAKE)" -C . srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" builddir=. $@ | |
729e4ab9 | 62 | |
f3c0d7a5 | 63 | $(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) $(DISTY_DATA_ZIP): $(DISTY_DAT) $(DISTY_TMP) |
729e4ab9 A |
64 | @echo "svnversion of $(SVNTOP) is as follows (if this fails, make sure svn is installed..)" |
65 | svnversion $(SVNTOP) | |
66 | -$(RMV) $(DISTY_FILE) $(DISTY_TMP) | |
67 | $(MKINSTALLDIRS) $(DISTY_TMP) | |
0f5d89e8 A |
68 | @echo collecting excludes to $(EXCLUDES_FILE) |
69 | (cd "$(SVNTOP)" ; svn status --no-ignore | grep '^I' | cut -c2- > "$(EXCLUDES_FILE)" ) | |
70 | @echo pseudo-exporting $(SVNVER) | |
71 | @#svn export -r $(shell echo $(SVNVER) | tr -d 'a-zA-Z' ) $(SVNURL) "$(DISTY_TMP)/icu" | |
72 | rsync -a --exclude-from="$(EXCLUDES_FILE)" "$(SVNTOP)" "$(DISTY_TMP)/icu" | |
4388f060 | 73 | ( cd $(DISTY_TMP)/icu/source ; zip -rlq $(DISTY_DATA_ZIP) data ) |
729e4ab9 | 74 | $(MKINSTALLDIRS) $(DISTY_IN) |
f3c0d7a5 | 75 | echo DISTY_DAT=$(DISTY_DAT) |
729e4ab9 | 76 | cp $(DISTY_DAT) $(DISTY_IN) |
f3c0d7a5 A |
77 | $(RMV) $(DISTY_RMDIR) |
78 | ( cd $(DISTY_TMP)/icu ; python as_is/bomlist.py > as_is/bomlist.txt || rm -f as_is/bomlist.txt ) | |
79 | ( cd $(DISTY_TMP) ; tar cfpz $(DISTY_FILE_TGZ) icu ) | |
0f5d89e8 A |
80 | ( cd $(DISTY_TMP) ; zip -rlq $(DISTY_FILE_ZIP) icu ) |
81 | $(RMV) $(DISTY_TMP) | |
82 | ln -sf $(shell basename $(DISTY_FILE_ZIP)) $(DISTY_FILE_DIR)/icu4c-src.zip | |
83 | ln -sf $(shell basename $(DISTY_FILE_TGZ)) $(DISTY_FILE_DIR)/icu4c-src.tgz | |
84 | ln -sf $(shell basename $(DISTY_DATA_ZIP)) $(DISTY_FILE_DIR)/icu4c-data.zip | |
85 | ls -l $(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) $(DISTY_DATA_ZIP) | |
86 | ||
729e4ab9 A |
87 | |
88 | dist-local: $(DISTY_FILES) | |
89 | ||
90 | distcheck: distcheck-tgz | |
91 | ||
92 | DISTY_CHECK=$(DISTY_TMP)/check | |
93 | ||
94 | distcheck-tgz: $(DISTY_FILE_TGZ) | |
95 | @echo Checking $(DISTY_FILE_TGZ) | |
96 | @-$(RMV) $(DISTY_CHECK) | |
97 | @$(MKINSTALLDIRS) $(DISTY_CHECK) | |
98 | @(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)" ) |