From 4e1c30d30be470877575e967def23f0fc98f9087 Mon Sep 17 00:00:00 2001 From: Yves Arrouye Date: Tue, 29 Aug 2000 07:28:22 +0000 Subject: [PATCH] ICU-575 fixed a number of problems with the out of source build. The build now works with --srcdir=../a/relative/path, --srcdir=/an/absolute/one and in source. Auxiliary data in data and test/testdata is generated by new Makefiles in these directories (data is new inside source). Some cleanup is still needed, for example when makeconv generates test files... Test code now knows about out of source vs in source build. Sorry... (Will be fixed if data and source are at the same level some day.) X-SVN-Rev: 2373 --- icu4c/source/Makefile.in | 24 +--- icu4c/source/acconfig.h | 10 ++ icu4c/source/common/icucfg.h.in | 10 +- icu4c/source/configure | 18 ++- icu4c/source/configure.in | 12 +- icu4c/source/data/Makefile.in | 151 ++++++++++++++++++++++++ icu4c/source/test/Makefile.in | 2 +- icu4c/source/test/cintltst/cintltst.c | 8 ++ icu4c/source/test/intltest/cppcnvt.cpp | 4 +- icu4c/source/test/intltest/intltest.cpp | 22 +++- icu4c/source/test/testdata/Makefile.in | 147 +++++++++++++++++++++++ icu4c/source/tools/genrb/Makefile.in | 16 +-- icu4c/source/tools/makeconv/Makefile.in | 6 +- 13 files changed, 374 insertions(+), 56 deletions(-) create mode 100644 icu4c/source/data/Makefile.in create mode 100644 icu4c/source/test/testdata/Makefile.in diff --git a/icu4c/source/Makefile.in b/icu4c/source/Makefile.in index 21baa263a1..965a75c79b 100644 --- a/icu4c/source/Makefile.in +++ b/icu4c/source/Makefile.in @@ -61,7 +61,7 @@ UNICODE_VERSION = @UNICODE_VERSION@ CLEANFILES = *~ DOCDIRS = common i18n -SUBDIRS = common i18n $(EXTRA) tools $(TEST) $(SAMPLE) +SUBDIRS = data common i18n $(EXTRA) tools $(TEST) $(SAMPLE) ## Extra files to install [nothing at present] EXTRA_DATA = @@ -70,7 +70,7 @@ EXTRA_DATA = .PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \ install-recursive clean clean-local clean-recursive distclean \ distclean-local distclean-recursive doc dist dist-local dist-recursive \ -check check-local check-recursive builddata +check check-local check-recursive ## Clear suffix list .SUFFIXES : @@ -101,7 +101,7 @@ all-recursive install-recursive clean-recursive distclean-recursive dist-recursi $(MAKE) "$$target-local" || exit; \ fi -all-local: $(srcdir)/configure builddata +all-local: $(srcdir)/configure install-local: $(top_builddir)/config/Makefile.inc $(EXTRA_DATA:%=$(DESTDIR)$(pkgdatadir)/$(VERSION)/%) @$(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @@ -133,10 +133,6 @@ clean-local: distclean-local: clean-local $(RMV) Makefile config.cache config.log config.status config/Makefile $(RMV) common/unicode/platform.h common/icucfg.h -ifeq ($(patsubst ..%,,@RELATIVEDATADIR@),@RELATIVEDATADIR@) - $(RMV) @DATABUILDDIR@/../source/test/testdata/*.goo @DATABUILDDIR@/../source/test/testdata/*.txt @DATABUILDDIR@/../source/test/testdata/*.bin @DATABUILDDIR@/../source/test/testdata/*.uni - $(RMV) @DATABUILDDIR@/UnicodeData-$(UNICODE_VERSION).txt @DATABUILDDIR@/thaidict.brk -endif check-local: @@ -145,7 +141,7 @@ check-local: Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status $(top_builddir)/config/Makefile.inc: $(srcdir)/config/Makefile.inc.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -154,15 +150,3 @@ $(top_builddir)/config/Makefile.inc: $(srcdir)/config/Makefile.inc.in $(top_bui config.status: $(srcdir)/configure $(SHELL) ./config.status --recheck -builddata: @DATABUILDDIR@/UnicodeData-$(UNICODE_VERSION).txt @DATABUILDDIR@/thaidict.brk @DATABUILDDIR@/../source/test/testdata/default.goo - -@DATABUILDDIR@/UnicodeData-$(UNICODE_VERSION).txt: $(srcdir)/../data/UnicodeData-$(UNICODE_VERSION).txt - ln -sf $< @DATABUILDDIR@ - -@DATABUILDDIR@/thaidict.brk: $(srcdir)/../data/thaidict.brk - ln -sf $< @DATABUILDDIR@ - -@DATABUILDDIR@/../source/test/testdata/default.goo: $(srcdir)/test/testdata/default.goo - ln -sf $(srcdir)/test/testdata/*.goo $(srcdir)/test/testdata/*.txt $(srcdir)/test/testdata/*.bin $(srcdir)/test/testdata/*.uni @DATABUILDDIR@/../source/test/testdata/ - ln -sf $(srcdir)/../data/unidata @DATABUILDDIR@ - diff --git a/icu4c/source/acconfig.h b/icu4c/source/acconfig.h index cf598641bb..c81b965162 100644 --- a/icu4c/source/acconfig.h +++ b/icu4c/source/acconfig.h @@ -20,3 +20,13 @@ /* Define to signed char if not in */ #undef bool_t + +/* Define if your system has */ +#undef HAVE_WCHAR_H + +/* Define to the size of wchar_t */ +#undef SIZEOF_WCHAR_T + +/* Define if the build is out of source */ +#undef BUILD_OUT_OF_SOURCE + diff --git a/icu4c/source/common/icucfg.h.in b/icu4c/source/common/icucfg.h.in index e564fa826a..1817f32231 100644 --- a/icu4c/source/common/icucfg.h.in +++ b/icu4c/source/common/icucfg.h.in @@ -30,11 +30,17 @@ /* Define to signed char if not in */ #undef bool_t -/* The number of bytes in a wchar_t. */ +/* Define if your system has */ +#undef HAVE_WCHAR_H + +/* Define to the size of wchar_t */ #undef SIZEOF_WCHAR_T +/* Define if the build is out of source */ +#undef BUILD_OUT_OF_SOURCE + /* Define if you have the header file. */ -#undef U_HAVE_INTTYPES_H +#undef HAVE_INTTYPES_H /* Define if you have the cma library (-lcma). */ #undef HAVE_LIBCMA diff --git a/icu4c/source/configure b/icu4c/source/configure index 6f41d3a210..b53767dd3a 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -3027,6 +3027,10 @@ then else DATABUILDDIR=`pwd`/data/ RELATIVEDATADIR=data/ + cat >> confdefs.h <<\EOF +#define BUILD_OUT_OF_SOURCE 1 +EOF + fi @@ -3139,6 +3143,7 @@ ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile \ + data/Makefile \ common/Makefile config/Makefile.inc i18n/Makefile \ extra/Makefile extra/ustdio/Makefile \ tools/Makefile tools/ctestfw/Makefile tools/makeconv/Makefile \ @@ -3146,7 +3151,7 @@ trap 'rm -fr `echo "Makefile \ tools/pkgdata/Makefile tools/pkgdata/icupkg.inc \ tools/rbdump/Makefile tools/genccode/Makefile tools/gencmn/Makefile tools/gencnval/Makefile tools/gentz/Makefile \ tools/gennames/Makefile tools/toolutil/Makefile tools/gentest/Makefile tools/genprops/Makefile \ - test/Makefile test/intltest/Makefile test/cintltst/Makefile \ + test/Makefile test/testdata/Makefile test/intltest/Makefile test/cintltst/Makefile \ test/ieeetest/Makefile \ samples/Makefile samples/date/Makefile samples/cal/Makefile \ samples/XMLConverter/Makefile \ @@ -3275,6 +3280,7 @@ EOF cat >> $CONFIG_STATUS <&6 fi diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in index bb36dd9698..638ef71b46 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -451,6 +451,7 @@ then else DATABUILDDIR=`pwd`/data/ RELATIVEDATADIR=data/ + AC_DEFINE(BUILD_OUT_OF_SOURCE) fi AC_SUBST(DATABUILDDIR) @@ -464,6 +465,7 @@ fi dnl output the Makefiles AC_OUTPUT([Makefile \ + data/Makefile \ common/Makefile config/Makefile.inc i18n/Makefile \ extra/Makefile extra/ustdio/Makefile \ tools/Makefile tools/ctestfw/Makefile tools/makeconv/Makefile \ @@ -471,7 +473,7 @@ AC_OUTPUT([Makefile \ tools/pkgdata/Makefile tools/pkgdata/icupkg.inc \ tools/rbdump/Makefile tools/genccode/Makefile tools/gencmn/Makefile tools/gencnval/Makefile tools/gentz/Makefile \ tools/gennames/Makefile tools/toolutil/Makefile tools/gentest/Makefile tools/genprops/Makefile \ - test/Makefile test/intltest/Makefile test/cintltst/Makefile \ + test/Makefile test/testdata/Makefile test/intltest/Makefile test/cintltst/Makefile \ test/ieeetest/Makefile \ samples/Makefile samples/date/Makefile samples/cal/Makefile \ samples/XMLConverter/Makefile \ @@ -487,14 +489,6 @@ else mkdir -p $DATABUILDDIR fi -if test -d $DATABUILDDIR/../source/test/testdata -then - : -else - echo creating $DATABUILDDIR/../source/test/testdata - mkdir -p $DATABUILDDIR/../source/test/testdata -fi - if test $ICU_USE_THREADS = 0; then echo " *** Note: configuring the ICU without pthread support or testing. If this isn't what you want, then run configure with --enable-threads=yes or check the messages [above] to see why we couldn't find pthread_create()" 1>&6 fi diff --git a/icu4c/source/data/Makefile.in b/icu4c/source/data/Makefile.in new file mode 100644 index 0000000000..cee395a60f --- /dev/null +++ b/icu4c/source/data/Makefile.in @@ -0,0 +1,151 @@ +#****************************************************************************** +# +# Copyright (C) 1998-2000, International Business Machines +# Corporation and others. All Rights Reserved. +# +#****************************************************************************** +## Top-level Makefile.in for ICU +## Stephen F. Booth + +## Shell to use +SHELL = @SHELL@ + +## Install directory information +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +datadir = @datadir@ +libdir = @libdir@ +includedir = @includedir@ + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +## Build directory information +top_builddir = .. +subdir = data + +## Install program information +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ + +AUTOCONF = @AUTOCONF@ + + +## Platform-specific setup +@host_frag@ + + +## Pacakge information +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +UNICODE_VERSION = @UNICODE_VERSION@ + +## Optional directory setup +@EXTRAS_TRUE@EXTRA = extra +@EXTRAS_FALSE@EXTRA = +@TESTS_TRUE@TEST = test +@TESTS_FALSE@TEST = +@SAMPLES_TRUE@SAMPLE = samples +@SAMPLES_FALSE@SAMPLE = + +## Files to remove for 'make clean' +CLEANFILES = *~ + +DOCDIRS = +SUBDIRS = + +## Extra files to install [nothing at present] +EXTRA_DATA = + +## List of phony targets +.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \ +install-recursive clean clean-local clean-recursive distclean \ +distclean-local distclean-recursive doc dist dist-local dist-recursive \ +check check-local check-recursive builddata + +## Clear suffix list +.SUFFIXES : + +## List of standard targets +all: all-local all-recursive +install: install-recursive install-local +clean: clean-recursive clean-local +distclean : distclean-recursive distclean-local +dist: dist-recursive dist-local +check: all check-recursive check-local + +## Recursive targets +all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive: + @dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-local"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $$local_target) || exit; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) "$$target-local" || exit; \ + fi + +all-local: builddata + +install-local: + +## Generate HTML documentation +doc: + @uniq=`date '+%y%m%d9/30/99M%S'`; \ + tmpdir="/tmp/icu-$$uniq"; \ + list='$(DOCDIRS)'; for subdir in $$list; do \ + echo "Making install-headers in $$subdir"; \ + (cd $$subdir && \ + $(MAKE) includedir=$$tmpdir/include install-headers); \ + done; \ + echo "Generating html documentation..."; \ + doc++ -H -d $$tmpdir/html $$tmpdir/include/*.h > /dev/null 2>&1; \ + $(RMV) $$tmpdir + +dist-local: + +clean-local: + test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) + +distclean-local: clean-local + $(RMV) Makefile +ifeq ($(patsubst ..%,,@RELATIVEDATADIR@),@RELATIVEDATADIR@) + $(RMV) @DATABUILDDIR@/UnicodeData-$(UNICODE_VERSION).txt @DATABUILDDIR@/thaidict.brk +endif + +check-local: + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(top_builddir)/config/Makefile.inc: $(srcdir)/config/Makefile.inc.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +builddata: @DATABUILDDIR@/UnicodeData-$(UNICODE_VERSION).txt @DATABUILDDIR@/thaidict.brk + +@DATABUILDDIR@/UnicodeData-$(UNICODE_VERSION).txt: $(top_srcdir)/../data/UnicodeData-$(UNICODE_VERSION).txt + ln -sf $< @DATABUILDDIR@ + +@DATABUILDDIR@/thaidict.brk: $(top_srcdir)/../data/thaidict.brk + ln -sf $< @DATABUILDDIR@ + ln -sf $(top_srcdir)/../data/unidata @DATABUILDDIR@ + diff --git a/icu4c/source/test/Makefile.in b/icu4c/source/test/Makefile.in index bd48deca44..8a21079f03 100644 --- a/icu4c/source/test/Makefile.in +++ b/icu4c/source/test/Makefile.in @@ -46,7 +46,7 @@ VERSION = @VERSION@ ## Files to remove for 'make clean' CLEANFILES = *~ -SUBDIRS = intltest cintltst ieeetest +SUBDIRS = testdata intltest cintltst ieeetest ## List of phony targets .PHONY : all all-local all-recursive install install-local \ diff --git a/icu4c/source/test/cintltst/cintltst.c b/icu4c/source/test/cintltst/cintltst.c index 8338b6162a..3a9f907b46 100644 --- a/icu4c/source/test/cintltst/cintltst.c +++ b/icu4c/source/test/cintltst/cintltst.c @@ -30,6 +30,10 @@ U_CDECL_END #include "unicode/ucnv.h" #include "unicode/ures.h" +#ifdef HAVE_CONFIG_H +#include "icucfg.h" +#endif + #ifdef XP_MAC_CONSOLE # include #endif @@ -170,7 +174,11 @@ ctest_getTestDirectory() if (_testDirectory == NULL) { #if defined(_AIX) || defined(U_SOLARIS) || defined(U_LINUX) || defined(HPUX) || defined(POSIX) || defined(OS390) +#if BUILD_OUT_OF_SOURCE + ctest_setTestDirectory("test|testdata|"); +#else ctest_setTestDirectory("source|test|testdata|"); +#endif #else ctest_setTestDirectory("icu|source|test|testdata|"); #endif diff --git a/icu4c/source/test/intltest/cppcnvt.cpp b/icu4c/source/test/intltest/cppcnvt.cpp index 44220792d2..9d0cffcd0d 100644 --- a/icu4c/source/test/intltest/cppcnvt.cpp +++ b/icu4c/source/test/intltest/cppcnvt.cpp @@ -256,7 +256,9 @@ void ConvertTest::TestConvert() ucs_file_in = fopen(ucs_file_name, "rb"); if (!ucs_file_in) { - errln("Couldn't open the Unicode file..."); + char errmsg[UCS_FILE_NAME_SIZE + 128]; + sprintf(errmsg, "Couldn't open the Unicode file [%s]... Exiting...\n", ucs_file_name); + errln(errmsg); return; } diff --git a/icu4c/source/test/intltest/intltest.cpp b/icu4c/source/test/intltest/intltest.cpp index 4403e43c38..0cf0aa6ae0 100644 --- a/icu4c/source/test/intltest/intltest.cpp +++ b/icu4c/source/test/intltest/intltest.cpp @@ -5,18 +5,31 @@ ********************************************************************/ +#include "unicode/utypes.h" + +#ifdef HAVE_CONFIG_H + +#include "icucfg.h" + +#undef uint32_t +#undef uint16_t +#undef uint8_t +#undef int32_t +#undef int16_t +#undef int8_t + +#endif + /** * IntlTest is a base class for tests. */ - #include #include #include #include -#include "unicode/utypes.h" #include "unicode/unistr.h" #include "unicode/ures.h" #include "unicode/coll.h" @@ -30,6 +43,7 @@ #include #include "Files.h" #endif + static char* _testDirectory=NULL; //----------------------------------------------------------------------------- //convenience classes to ease porting code that uses the Java @@ -453,7 +467,11 @@ IntlTest::getTestDirectory() if (_testDirectory == NULL) { #if defined(_AIX) || defined(U_SOLARIS) || defined(U_LINUX) || defined(HPUX) || defined(POSIX) || defined(OS390) +#if BUILD_OUT_OF_SOURCE + setTestDirectory("test|testdata|"); +#else setTestDirectory("source|test|testdata|"); +#endif #else setTestDirectory("icu|source|test|testdata|"); #endif diff --git a/icu4c/source/test/testdata/Makefile.in b/icu4c/source/test/testdata/Makefile.in new file mode 100644 index 0000000000..45fc64b5c0 --- /dev/null +++ b/icu4c/source/test/testdata/Makefile.in @@ -0,0 +1,147 @@ +#****************************************************************************** +# +# Copyright (C) 1998-2000, International Business Machines +# Corporation and others. All Rights Reserved. +# +#****************************************************************************** +## Top-level Makefile.in for ICU +## Stephen F. Booth + +## Shell to use +SHELL = @SHELL@ + +## Install directory information +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +datadir = @datadir@ +libdir = @libdir@ +includedir = @includedir@ + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +## Build directory information +top_builddir = ../.. +subdir = test/testdata + +## Install program information +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ + +AUTOCONF = @AUTOCONF@ + + +## Platform-specific setup +@host_frag@ + + +## Pacakge information +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +UNICODE_VERSION = @UNICODE_VERSION@ + +## Optional directory setup +@EXTRAS_TRUE@EXTRA = extra +@EXTRAS_FALSE@EXTRA = +@TESTS_TRUE@TEST = test +@TESTS_FALSE@TEST = +@SAMPLES_TRUE@SAMPLE = samples +@SAMPLES_FALSE@SAMPLE = + +## Files to remove for 'make clean' +CLEANFILES = *~ + +DOCDIRS = +SUBDIRS = + +## Extra files to install [nothing at present] +EXTRA_DATA = + +## List of phony targets +.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \ +install-recursive clean clean-local clean-recursive distclean \ +distclean-local distclean-recursive doc dist dist-local dist-recursive \ +check check-local check-recursive builddata + +## Clear suffix list +.SUFFIXES : + +## List of standard targets +all: all-local all-recursive +install: install-recursive install-local +clean: clean-recursive clean-local +distclean : distclean-recursive distclean-local +dist: dist-recursive dist-local +check: all check-recursive check-local + +## Recursive targets +all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive: + @dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-local"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $$local_target) || exit; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) "$$target-local" || exit; \ + fi + +all-local: builddata + +install-local: + +## Generate HTML documentation +doc: + @uniq=`date '+%y%m%d9/30/99M%S'`; \ + tmpdir="/tmp/icu-$$uniq"; \ + list='$(DOCDIRS)'; for subdir in $$list; do \ + echo "Making install-headers in $$subdir"; \ + (cd $$subdir && \ + $(MAKE) includedir=$$tmpdir/include install-headers); \ + done; \ + echo "Generating html documentation..."; \ + doc++ -H -d $$tmpdir/html $$tmpdir/include/*.h > /dev/null 2>&1; \ + $(RMV) $$tmpdir + +dist-local: + +clean-local: + test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) + +distclean-local: clean-local + $(RMV) Makefile +ifeq ($(patsubst ..%,,@RELATIVEDATADIR@),@RELATIVEDATADIR@) + $(RMV) *.goo *.txt *.bin *.uni +endif + +check-local: + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(top_builddir)/config/Makefile.inc: $(top_srcdir)/config/Makefile.inc.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +builddata: default.goo + +default.goo: $(srcdir)/default.goo + ln -sf $(srcdir)/*.goo $(srcdir)/*.txt $(srcdir)*.bin $(srcdir)/*.uni . + diff --git a/icu4c/source/tools/genrb/Makefile.in b/icu4c/source/tools/genrb/Makefile.in index c653e69314..c5ea1b6166 100644 --- a/icu4c/source/tools/genrb/Makefile.in +++ b/icu4c/source/tools/genrb/Makefile.in @@ -71,10 +71,10 @@ TXT_FILES = $(TXT_SOURCE:%=$(top_srcdir)/../data/%) RES_FILES = $(TXT_FILES:$(top_srcdir)/../data/%.txt=@DATABUILDDIR@/%.res) #TRANSLIT_FILES = $(TRANSLIT_SOURCE:%=$(top_srcdir)/../data/translit/%) #TRANSLIT_RES = $(TRANSLIT_SOURCE:%.txt=@DATABUILDDIR@/translit/%.res) -TEST_FILES = @DATABUILDDIR@/../source/test/testdata/root.res \ -@DATABUILDDIR@/../source/test/testdata/te.res \ -@DATABUILDDIR@/../source/test/testdata/te_IN.res \ -@DATABUILDDIR@/../source/test/testdata/testtypes.res +TEST_FILES = $(top_builddir)/test/testdata/root.res \ +$(top_builddir)/test/testdata/te.res \ +$(top_builddir)/test/testdata/te_IN.res \ +$(top_builddir)/test/testdata/testtypes.res ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ @@ -119,13 +119,9 @@ $(TARGET) : $(OBJECTS) ## Rule to build a compiled res file. ## Note the order of the next three rules here is important! -@DATABUILDDIR@/../source/test/testdata/%.res : $(top_srcdir)/test/testdata/%.txt +$(top_builddir)/test/testdata/%.res : $(top_srcdir)/test/testdata/%.txt @echo "Creating testdata resource file for $<" - ICU_DATA=@DATABUILDDIR@ ./genrb -s $(top_srcdir)/test/testdata/ -d @DATABUILDDIR@../source/test/testdata/ $( " + @./makeconv -d @DATABUILDDIR@ $< + @DATABUILDDIR@/%.cnv : $(top_srcdir)/../data/%.ucm @echo -n "$< -> " @./makeconv -d @DATABUILDDIR@ $<