# This is to be called from ../Makefile.in
#
# This will only work if subversion is installed.
+# You must checkout ICU4C at the `/icu` or `/icu/icu4c` level - not just `…/source`
+# also note that `make dist` does NOT reflect any local modifications - it only does a fresh SVN export.
top_builddir = .
DOCZIP=icu-docs.zip
SVNTOP=$(top_srcdir)/..
-SVNDOT=$(SVNTOP)/.svn
SVNVER=$(shell svnversion $(SVNTOP) | cut -d: -f1 | tr -cd 'a-zA-Z0-9')
SVNURL=$(shell svn info $(SVNTOP) | grep '^URL:' | cut -d: -f2-)
DISTY_VER=$(shell echo $(VERSION) | tr '.' '_' )
DISTY_FILES_SRC=$(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP)
DISTY_FILES=$(DISTY_FILES_SRC) $(DISTY_DOC_ZIP)
-$(SVNDOT):
- @echo "ERROR: 'dist' will not work unless the parent of the top_srcdir ( $(SVNTOP) ) is checked out from svn, and svn is installed."
- false
-
$(DISTY_FILE_DIR):
$(MKINSTALLDIRS) $(DISTY_FILE_DIR)
$(DISTY_TMP):
$(MKINSTALLDIRS) $(DISTY_TMP)
-$(DISTY_DOC_ZIP): $(SVNDOT) $(DOCZIP) $(DISTY_FILE_DIR)
+$(DISTY_DOC_ZIP): $(DOCZIP) $(DISTY_FILE_DIR)
cp $(DOCZIP) $(DISTY_DOC_ZIP)
$(DISTY_DAT):
$(DOCZIP):
$(MAKE) -C . srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" builddir=. $@
-$(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) $(DISTY_DATA_ZIP): $(SVNDOT) $(DISTY_DAT) $(DISTY_TMP)
+$(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) $(DISTY_DATA_ZIP): $(DISTY_DAT) $(DISTY_TMP)
@echo "svnversion of $(SVNTOP) is as follows (if this fails, make sure svn is installed..)"
svnversion $(SVNTOP)
-$(RMV) $(DISTY_FILE) $(DISTY_TMP)
$(MKINSTALLDIRS) $(DISTY_TMP)
+ echo exporting $(SVNVER)
svn export -r $(shell echo $(SVNVER) | tr -d 'a-zA-Z' ) $(SVNURL) "$(DISTY_TMP)/icu"
( cd $(DISTY_TMP)/icu/source ; zip -rlq $(DISTY_DATA_ZIP) data )
$(RMV) $(DISTY_RMDIR)