From bf89e792e35f0ae6291a2c142f8402c0d9a4d181 Mon Sep 17 00:00:00 2001 From: Yves Arrouye Date: Mon, 7 Feb 2000 21:00:53 +0000 Subject: [PATCH] ICU-212 out-of-source build. configure now creates data/ and data/translit in the build dir. Changed every Makefile to correctly use $(srcdir), $(builddir), and the new data location. X-SVN-Rev: 727 --- icu4c/source/Makefile.in | 9 +++--- icu4c/source/common/Makefile.in | 8 ++--- icu4c/source/configure | 15 +++++++++ icu4c/source/configure.in | 16 ++++++++++ icu4c/source/extra/ustdio/Makefile.in | 6 ++-- icu4c/source/i18n/Makefile.in | 6 ++-- icu4c/source/samples/XMLConverter/Makefile.in | 2 +- icu4c/source/samples/cal/Makefile.in | 2 +- icu4c/source/samples/date/Makefile.in | 2 +- icu4c/source/test/cintltst/Makefile.in | 4 +-- icu4c/source/test/ieeetest/Makefile.in | 4 +-- icu4c/source/test/intltest/Makefile.in | 4 +-- icu4c/source/test/intltest/transapi.cpp | 3 +- icu4c/source/tools/Makefile.in | 31 ++++++++++--------- icu4c/source/tools/genccode/Makefile.in | 2 +- icu4c/source/tools/gencmn/Makefile.in | 2 +- icu4c/source/tools/gencnval/Makefile.in | 8 ++--- icu4c/source/tools/gencol/Makefile.in | 2 +- icu4c/source/tools/gennames/Makefile.in | 6 ++-- icu4c/source/tools/genprops/Makefile.in | 2 +- icu4c/source/tools/genrb/Makefile.in | 20 ++++++------ icu4c/source/tools/gentz/Makefile.in | 8 ++--- icu4c/source/tools/makeconv/Makefile.in | 20 ++++++------ icu4c/source/tools/rbdump/Makefile.in | 2 +- icu4c/source/tools/toolutil/Makefile.in | 2 +- 25 files changed, 111 insertions(+), 75 deletions(-) diff --git a/icu4c/source/Makefile.in b/icu4c/source/Makefile.in index 9ddf8b73b71..8f31ab818b7 100644 --- a/icu4c/source/Makefile.in +++ b/icu4c/source/Makefile.in @@ -96,16 +96,16 @@ all-recursive install-recursive clean-recursive distclean-recursive dist-recursi $(MAKE) "$$target-local" || exit 1; \ fi -all-local: configure +all-local: $(srcdir)/configure install-local: @for file in $(EXTRA_DATA); do \ - echo $(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ - $(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ + echo $(INSTALL_DATA) $(top_srcdir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ + $(INSTALL_DATA) $(top_srcdir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ done $(INSTALL_DATA) $(top_builddir)/config/Makefile $(pkgdatadir)/Makefile.inc - $(INSTALL_SCRIPT) mkinstalldirs $(sbindir)/mkinstalldirs + $(INSTALL_SCRIPT) $(top_srcdir)/mkinstalldirs $(sbindir)/mkinstalldirs ## Generate HTML documentation doc: @@ -128,6 +128,7 @@ clean-local: distclean-local: rm -f Makefile config.cache config.log config.status config/Makefile rm -f common/unicode/platform.h common/icucfg.h + rm -rf data check-local: diff --git a/icu4c/source/common/Makefile.in b/icu4c/source/common/Makefile.in index 57ce863dcee..7596090fc39 100644 --- a/icu4c/source/common/Makefile.in +++ b/icu4c/source/common/Makefile.in @@ -53,7 +53,7 @@ CLEANFILES = *~ TARGET = libicu-uc.$(SO) DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -DICU_DATA_DIR=\"$(pkgdatadir)/$(VERSION)/\" -DUDATA_SO_SUFFIX=\".$(SO)\" -DU_COMMON_LIBNAME=\"$(TARGET)\" +CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir) -DICU_DATA_DIR=\"$(pkgdatadir)/$(VERSION)/\" -DUDATA_SO_SUFFIX=\".$(SO)\" -DU_COMMON_LIBNAME=\"$(TARGET)\" CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ @@ -80,7 +80,7 @@ ucnv2022.o ucnvlat1.o ucnv_utf.o ucnvsbcs.o ucnvmbcs.o DEPS = $(OBJECTS:.o=.d) ## Header files to install -HEADERS = unicode/*.h +HEADERS = unicode/*.h $(srcdir)/unicode/*.h ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ @@ -109,8 +109,8 @@ install-library: all-local install-headers: $(mkinstalldirs) $(includedir)/unicode @for file in $(HEADERS); do \ - echo " $(INSTALL_DATA) $$file $(includedir)/$$file"; \ - $(INSTALL_DATA) $$file $(includedir)/$$file; \ + echo "$(INSTALL_DATA) $$file $(includedir)/unicode"; \ + $(INSTALL_DATA) $$file $(includedir)/unicode; \ done dist-local: diff --git a/icu4c/source/configure b/icu4c/source/configure index 6d1d98b044b..78e2f3c64c5 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -3009,6 +3009,21 @@ rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +if test -d data +then + : +else + echo creating data + mkdir data +fi +if test -d data/translit +then + : +else + echo creating data/translit + mkdir data/translit +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/configure.in b/icu4c/source/configure.in index 7070fb122b6..3e23b374294 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -369,6 +369,22 @@ AC_OUTPUT([Makefile \ samples/Makefile samples/date/Makefile samples/cal/Makefile \ samples/XMLConverter/Makefile]) +dnl create the data directory +if test -d data +then + : +else + echo creating data + mkdir data +fi +if test -d data/translit +then + : +else + echo creating data/translit + mkdir data/translit +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/extra/ustdio/Makefile.in b/icu4c/source/extra/ustdio/Makefile.in index 57f1020ea2c..64760e55a6e 100644 --- a/icu4c/source/extra/ustdio/Makefile.in +++ b/icu4c/source/extra/ustdio/Makefile.in @@ -53,7 +53,7 @@ CLEANFILES = *~ TARGET = libustdio.$(SO) DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ @@ -93,8 +93,8 @@ install-library: all-local install-headers: $(mkinstalldirs) $(includedir)/unicode @list='$(HEADERS)'; for file in $$list; do \ - echo " $(INSTALL_DATA) $$file $(includedir)/$$file"; \ - $(INSTALL_DATA) $$file $(includedir)/$$file; \ + echo " $(INSTALL_DATA) $(srcdir)/$$file $(includedir)/$$file"; \ + $(INSTALL_DATA) $(srcdir)/$$file $(includedir)/$$file; \ done diff --git a/icu4c/source/i18n/Makefile.in b/icu4c/source/i18n/Makefile.in index 1d138d615a8..95dd64038e7 100644 --- a/icu4c/source/i18n/Makefile.in +++ b/icu4c/source/i18n/Makefile.in @@ -47,7 +47,7 @@ CLEANFILES = *~ TARGET = libicu-i18n.$(SO) DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common +CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_builddir)/common -I$(top_srcdir)/common CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) @@ -95,8 +95,8 @@ install-library: all-local install-headers: $(mkinstalldirs) $(includedir)/unicode @list='$(HEADERS)'; for file in $$list; do \ - echo " $(INSTALL_DATA) $$file $(includedir)/$$file"; \ - $(INSTALL_DATA) $$file $(includedir)/$$file; \ + echo " $(INSTALL_DATA) $(srcdir)/$$file $(includedir)/$$file"; \ + $(INSTALL_DATA) $(srcdir)/$$file $(includedir)/$$file; \ done dist-local: diff --git a/icu4c/source/samples/XMLConverter/Makefile.in b/icu4c/source/samples/XMLConverter/Makefile.in index 4f3b2e8b764..c46b71ec559 100644 --- a/icu4c/source/samples/XMLConverter/Makefile.in +++ b/icu4c/source/samples/XMLConverter/Makefile.in @@ -47,7 +47,7 @@ CLEANFILES = *~ TARGET = XMLConverter DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/samples/cal/Makefile.in b/icu4c/source/samples/cal/Makefile.in index 010cae20cad..1596e0abb86 100644 --- a/icu4c/source/samples/cal/Makefile.in +++ b/icu4c/source/samples/cal/Makefile.in @@ -48,7 +48,7 @@ CLEANFILES = *~ TARGET = cal DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/samples/date/Makefile.in b/icu4c/source/samples/date/Makefile.in index eb91a9c2f52..86720a017b9 100644 --- a/icu4c/source/samples/date/Makefile.in +++ b/icu4c/source/samples/date/Makefile.in @@ -48,7 +48,7 @@ CLEANFILES = *~ TARGET = date DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/test/cintltst/Makefile.in b/icu4c/source/test/cintltst/Makefile.in index 6280540162b..099b372473b 100644 --- a/icu4c/source/test/cintltst/Makefile.in +++ b/icu4c/source/test/cintltst/Makefile.in @@ -54,7 +54,7 @@ TARGET = cintltst DEFS = @DEFS@ # we define ICU_UNICODE_VERSION so we can test it -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw \ +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw \ -DICU_UNICODE_VERSION=\"$(UNICODE_VERSION)\" CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ @@ -101,7 +101,7 @@ distclean-local: clean-local rm -f Makefile $(DEPS) check-local: $(TARGET) - HOME=$(top_builddir)/../.. ICU_DATA=$(top_builddir)/../data/ TZ=PST8PDT ./$(TARGET) + HOME=$(top_srcdir)/../.. ICU_DATA=$(top_srcdir)/../data/ TZ=PST8PDT ./$(TARGET) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ diff --git a/icu4c/source/test/ieeetest/Makefile.in b/icu4c/source/test/ieeetest/Makefile.in index 7af0807864c..9be5b557906 100644 --- a/icu4c/source/test/ieeetest/Makefile.in +++ b/icu4c/source/test/ieeetest/Makefile.in @@ -48,7 +48,7 @@ CLEANFILES = *~ TARGET = ieeetest DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ $(LD_RPATH)$(LD_RPATH_PRE)$(top_builddir)/common @@ -87,7 +87,7 @@ distclean-local: clean-local rm -f Makefile $(DEPS) check-local: $(TARGET) - ICU_DATA=$(top_builddir)/../data/ ./$(TARGET) + ICU_DATA=$(top_srcdir)/../data/ ./$(TARGET) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ diff --git a/icu4c/source/test/intltest/Makefile.in b/icu4c/source/test/intltest/Makefile.in index 005aec48da2..0e3518c3ab1 100644 --- a/icu4c/source/test/intltest/Makefile.in +++ b/icu4c/source/test/intltest/Makefile.in @@ -48,7 +48,7 @@ CLEANFILES = *~ TARGET = intltest DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ @@ -98,7 +98,7 @@ distclean-local: clean-local rm -f Makefile $(DEPS) check-local: $(TARGET) - HOME=$(top_builddir)/../.. ICU_DATA=$(top_builddir)/../data/ TZ=PST8PDT ./$(TARGET) + HOME=$(top_srcdir)/../.. ICU_DATA=$(top_srcdir)/../data/ TZ=PST8PDT ./$(TARGET) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ diff --git a/icu4c/source/test/intltest/transapi.cpp b/icu4c/source/test/intltest/transapi.cpp index 7537931312b..5985f4959dd 100644 --- a/icu4c/source/test/intltest/transapi.cpp +++ b/icu4c/source/test/intltest/transapi.cpp @@ -427,8 +427,9 @@ void TransliteratorAPITest::TestKeyboardTransliterator1(){ Transliterator::Position index = {0, 0, 0}; UErrorCode status=U_ZERO_ERROR; UnicodeString s; + int i; logln("Testing transliterate(Replaceable, int32_t, UnicodeString, UErrorCode)"); - for (int i=0; i<10; i=i+2) { + for (i=0; i<10; i=i+2) { UnicodeString log; if (Data[i+0] != "") { log = s + " + " + Data[i+0] + " -> "; diff --git a/icu4c/source/tools/Makefile.in b/icu4c/source/tools/Makefile.in index 27bbeaff5a4..e51c6617da5 100644 --- a/icu4c/source/tools/Makefile.in +++ b/icu4c/source/tools/Makefile.in @@ -33,7 +33,8 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ ICUDATADIR=$(pkgdatadir)/$(VERSION) -SRCDATADIR=$(top_builddir)/../data +SRCDATADIR=$(top_srcdir)/../data +OBJDATADIR=$(top_builddir)/data ## Build directory information top_builddir = .. @@ -98,26 +99,26 @@ all-local: build-local DAT_FILES=unames.dat cnvalias.dat tz.dat BRK_FILES=char.brk line.brk line_th.brk sent.brk word.brk word_th.brk -DATAFILESD=$(DAT_FILES:%=$(SRCDATADIR)/%) -DATAFILESB=$(BRK_FILES:%=$(SRCDATADIR)/%) +DATAFILESD=$(DAT_FILES:%=$(OBJDATADIR)/%) +DATAFILESB=$(BRK_FILES:%=$(OBJDATADIR)/%) # copy the right endianness ifeq (@U_IS_BIG_ENDIAN@,1) -%.brk: %BE.brk +%.brk: $(SRCDATADIR)/%BE.brk cp $< $@ else -%.brk: %LE.brk +%.brk: $(SRCDATADIR)/%LE.brk cp $< $@ endif -include makeconv/ucmfiles.mk --include makeconv/ucmlocal.mk +include $(srcdir)/makeconv/ucmfiles.mk +-include $(srcdir)/makeconv/ucmlocal.mk ALL_UCM_SOURCE= $(UCM_SOURCE) $(UCM_SOURCE_LOCAL) UCM_FILES = $(ALL_UCM_SOURCE:%=$(top_srcdir)/../data/%) -CNV_FILES = $(UCM_FILES:.ucm=.cnv) +CNV_FILES = $(UCM_FILES:$(top_srcdir)/../data/%.ucm=$(OBJDATADIR)/%.cnv) DATAFILESC=$(CNV_FILES) @@ -131,8 +132,8 @@ SRCDATAFILES=$(SRCDATAFILESD) $(SRCDATAFILESC) $(SRCDATAFILESB) OBJDATAFILES=$(SRCDATAFILES:%.c=%.o) -COMMONFILE=$(SRCDATADIR)/icudata.dat -COMMONDLL=$(SRCDATADIR)/libicudata.$(SO) +COMMONFILE=$(OBJDATADIR)/icudata.dat +COMMONDLL=$(OBJDATADIR)/libicudata.$(SO) # the files to be installed -- the COMMON ones + any stragglers UDATA_FILES=icudata.dat @@ -165,7 +166,7 @@ $(COMMONFILE): $(DATAFILES) @echo -n Generating common file $(COMMONFILE). Number of files: -@wc -l gencmn/mkmap.tmp -rm -f $(COMMONFILE) - @(cd gencmn ; ICU_DATA=../$(SRCDATADIR) ./gencmn 1000000 mkmap.tmp ) + @(cd gencmn ; ICU_DATA=$(OBJDATADIR) ./gencmn 1000000 mkmap.tmp ) -@ls -l $(COMMONFILE) build-dll: $(COMMONDLL) @@ -208,14 +209,14 @@ install-everything: install-files install-dlls install-files: @for file in $(UDATA_FILES); do \ - echo $(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ - $(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ + echo $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ + $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ done install-dlls: @for file in $(UDATA_DLLS); do \ - echo $(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ - $(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ + echo $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ + $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ done diff --git a/icu4c/source/tools/genccode/Makefile.in b/icu4c/source/tools/genccode/Makefile.in index 2e410b08222..2cba0f16995 100644 --- a/icu4c/source/tools/genccode/Makefile.in +++ b/icu4c/source/tools/genccode/Makefile.in @@ -49,7 +49,7 @@ CLEANFILES = *~ TARGET = genccode DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I../toolutil +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(srcdir)/../toolutil CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/tools/gencmn/Makefile.in b/icu4c/source/tools/gencmn/Makefile.in index cfe9f94a9d7..b2fa20aa65b 100644 --- a/icu4c/source/tools/gencmn/Makefile.in +++ b/icu4c/source/tools/gencmn/Makefile.in @@ -49,7 +49,7 @@ CLEANFILES = *~ mkmap.tmp TARGET = gencmn DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I../toolutil +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(srcdir)/../toolutil CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/tools/gencnval/Makefile.in b/icu4c/source/tools/gencnval/Makefile.in index 8833a28d223..0d658be9679 100644 --- a/icu4c/source/tools/gencnval/Makefile.in +++ b/icu4c/source/tools/gencnval/Makefile.in @@ -7,8 +7,8 @@ SHELL = @SHELL@ VERSION = @VERSION@ -ICUDATADIR=$(top_builddir)/../data/ -CONVRTRSFILE=$(top_builddir)/../data/convrtrs.txt +ICUDATADIR=$(top_builddir)/data/ +CONVRTRSFILE=$(top_srcdir)/../data/convrtrs.txt ## Install directory information srcdir = @srcdir@ @@ -53,7 +53,7 @@ CLEANFILES = *~ TARGET = gencnval DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I../toolutil +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(srcdir)/../toolutil CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ @@ -92,7 +92,7 @@ build-data: $(ICUDATADIR)/cnvalias.dat # we set the ICU_DATA directory here so that unames.dat ends up in # icu/data rather than PREFIX/share/icu/VERSION/ $(ICUDATADIR)/cnvalias.dat: $(CONVRTRSFILE) $(TARGET) - ICU_DATA=$(ICUDATADIR) ./$(TARGET) + ICU_DATA=$(ICUDATADIR) ./$(TARGET) $(CONVRTRSFILE) dist-local: diff --git a/icu4c/source/tools/gencol/Makefile.in b/icu4c/source/tools/gencol/Makefile.in index 10b6ad264c6..4a3e1b6d559 100644 --- a/icu4c/source/tools/gencol/Makefile.in +++ b/icu4c/source/tools/gencol/Makefile.in @@ -48,7 +48,7 @@ CLEANFILES = *~ TARGET = gencol DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/tools/gennames/Makefile.in b/icu4c/source/tools/gennames/Makefile.in index 92e0da626d2..e2140e679ff 100644 --- a/icu4c/source/tools/gennames/Makefile.in +++ b/icu4c/source/tools/gennames/Makefile.in @@ -8,8 +8,8 @@ SHELL = @SHELL@ VERSION = @VERSION@ UNICODE_VERSION = @UNICODE_VERSION@ -ICUDATADIR=$(top_builddir)/../data/ -UNICODEFILE=$(top_builddir)/../data/UnicodeData-$(UNICODE_VERSION).txt +ICUDATADIR=$(top_builddir)/data/ +UNICODEFILE=$(top_srcdir)/../data/UnicodeData-$(UNICODE_VERSION).txt ## Install directory information srcdir = @srcdir@ @@ -54,7 +54,7 @@ CLEANFILES = *~ TARGET = gennames DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I../toolutil +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(srcdir)/../toolutil CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/tools/genprops/Makefile.in b/icu4c/source/tools/genprops/Makefile.in index 92c6ad35840..4f95d63e0bc 100644 --- a/icu4c/source/tools/genprops/Makefile.in +++ b/icu4c/source/tools/genprops/Makefile.in @@ -8,7 +8,7 @@ SHELL = @SHELL@ VERSION = @VERSION@ UNICODE_VERSION = @UNICODE_VERSION@ -ICUDATADIR=$(top_builddir)/../data/ +ICUDATADIR=$(top_builddir)/data/ UNICODEFILE=$(top_builddir)/../data/UnicodeData-$(UNICODE_VERSION).txt ## Install directory information diff --git a/icu4c/source/tools/genrb/Makefile.in b/icu4c/source/tools/genrb/Makefile.in index 4f8aac67b37..eecce4296e7 100644 --- a/icu4c/source/tools/genrb/Makefile.in +++ b/icu4c/source/tools/genrb/Makefile.in @@ -48,7 +48,7 @@ CLEANFILES = *~ TARGET = genrb DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I../toolutil +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/extra/ustdio -I$(srcdir)/../toolutil CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ @@ -89,9 +89,9 @@ lgreek.txt fullhalf.txt lhebrew.txt lkana.txt lcyril.txt \ quotes.txt ucname.txt index.txt ljamo.txt TXT_FILES = $(TXT_SOURCE:%=$(top_srcdir)/../data/%) -RES_FILES = $(TXT_FILES:.txt=.res) +RES_FILES = $(TXT_FILES:$(top_srcdir)/../data/%.txt=$(top_builddir)/data/%.res) TRANSLIT_FILES = $(TRANSLIT_SOURCE:%=$(top_srcdir)/../data/translit/%) -TRANSLIT_RES = $(TRANSLIT_FILES:.txt=.res) +TRANSLIT_RES = $(TRANSLIT_FILES:$(top_srcdir)/../data/translit/%.txt=$(top_builddir)/data/translit/%.res) TEST_FILES = $(top_srcdir)/test/testdata/default.res \ $(top_srcdir)/test/testdata/te.res \ $(top_srcdir)/test/testdata/te_IN.res @@ -119,13 +119,13 @@ install-local: target-clean-local all-local $(INSTALL) $(TARGET) $(sbindir)/$(TARGET) $(mkinstalldirs) $(pkgdatadir)/$(VERSION) @list='$(notdir $(RES_FILES))'; for file in $$list; do \ - echo $(INSTALL_DATA) $(top_srcdir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ - $(INSTALL_DATA) $(top_srcdir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ + echo $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ + $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ done $(mkinstalldirs) $(pkgdatadir)/$(VERSION)/translit @list='$(notdir $(TRANSLIT_RES))'; for file in $$list; do \ - echo $(INSTALL_DATA) $(top_srcdir)/../data/translit/$$file $(pkgdatadir)/$(VERSION)/translit/$$file; \ - $(INSTALL_DATA) $(top_srcdir)/../data/translit/$$file $(pkgdatadir)/$(VERSION)/translit/$$file; \ + echo $(INSTALL_DATA) $(top_builddir)/data/translit/$$file $(pkgdatadir)/$(VERSION)/translit/$$file; \ + $(INSTALL_DATA) $(top_builddir)/data/translit/$$file $(pkgdatadir)/$(VERSION)/translit/$$file; \ done dist-local: @@ -150,13 +150,15 @@ $(TARGET) : $(OBJECTS) $(LINK.c) -o $@ $^ $(LIBS) ## Rule to build a compiled cnv file -%.res : %.txt +$(top_builddir)/data/%.res : $(top_srcdir)/../data/%.txt @echo "Creating compiled resource file for $<" - @ICU_DATA=$(top_builddir)/../data/ ./genrb $< > /dev/null 2>&1 + @ICU_DATA=$(top_builddir)/data/ ./genrb $< > /dev/null 2>&1 ifneq ($(MAKECMDGOALS),distclean) -include $(DEPS) endif +all-local: +install-local: diff --git a/icu4c/source/tools/gentz/Makefile.in b/icu4c/source/tools/gentz/Makefile.in index 8227bf36377..4da5cd1e437 100644 --- a/icu4c/source/tools/gentz/Makefile.in +++ b/icu4c/source/tools/gentz/Makefile.in @@ -7,9 +7,9 @@ SHELL = @SHELL@ VERSION = @VERSION@ -ICUDATADIR=$(top_builddir)/../data/ -TZFILE=tz.txt -TZALIAS=tz.alias +ICUDATADIR=$(top_builddir)/data/ +TZFILE=$(srcdir)/tz.txt +TZALIAS=$(srcdir)/tz.alias ## Install directory information srcdir = @srcdir@ @@ -54,7 +54,7 @@ CLEANFILES = *~ TARGET = gentz DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I../toolutil +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/tools/makeconv/Makefile.in b/icu4c/source/tools/makeconv/Makefile.in index 7fa5965695d..777fcb49244 100644 --- a/icu4c/source/tools/makeconv/Makefile.in +++ b/icu4c/source/tools/makeconv/Makefile.in @@ -1,10 +1,6 @@ ## Makefile.in for ICU - tools/makeconv ## Stephen F. Booth -## List of converter tables to build -include ucmfiles.mk --include ucmlocal.mk - ## Shell to use SHELL = @SHELL@ @@ -24,6 +20,10 @@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +## List of converter tables to build +include $(srcdir)/ucmfiles.mk +-include $(srcdir)/ucmlocal.mk + ## Install program information mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -51,7 +51,7 @@ CLEANFILES = *~ TARGET = makeconv DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I../toolutil +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(srcdir)/../toolutil CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ @@ -64,7 +64,7 @@ DEPS = $(OBJECTS:.o=.d) ALL_UCM = $(UCM_SOURCE) $(UCM_SOURCE_LOCAL) UCM_FILES = $(ALL_UCM:%=$(top_srcdir)/../data/%) -CNV_FILES = $(UCM_FILES:.ucm=.cnv) +CNV_FILES = $(UCM_FILES:$(top_srcdir)/../data/%.ucm=$(top_builddir)/data/%.cnv) ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ @@ -90,8 +90,8 @@ all-local: $(TARGET) $(CNV_FILES) # $(INSTALL) $(TARGET) $(sbindir)/$(TARGET) # $(mkinstalldirs) $(pkgdatadir)/$(VERSION) # @list='$(notdir $(CNV_FILES)) convrtrs.txt'; for file in $$list; do \ -# echo $(INSTALL_DATA) $(top_srcdir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ -# $(INSTALL_DATA) $(top_srcdir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ +# echo $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ +# $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \ # done dist-local: @@ -120,9 +120,9 @@ $(TARGET) : $(OBJECTS) $(LINK.c) -o $@ $^ $(LIBS) # Rule to build a compiled cnv file -%.cnv : %.ucm +$(top_builddir)/data/%.cnv : $(top_srcdir)/../data/%.ucm @echo -n "$< -> " - @ICU_DATA=$(top_builddir)/../data/ ./makeconv $< + @ICU_DATA=$(top_builddir)/data ./makeconv $< ifneq ($(MAKECMDGOALS),distclean) -include $(DEPS) diff --git a/icu4c/source/tools/rbdump/Makefile.in b/icu4c/source/tools/rbdump/Makefile.in index f359de4140c..79b6382887e 100644 --- a/icu4c/source/tools/rbdump/Makefile.in +++ b/icu4c/source/tools/rbdump/Makefile.in @@ -47,7 +47,7 @@ CLEANFILES = *~ TARGET = rbdump DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ \ diff --git a/icu4c/source/tools/toolutil/Makefile.in b/icu4c/source/tools/toolutil/Makefile.in index 4e0d0cffecc..faf089787ef 100644 --- a/icu4c/source/tools/toolutil/Makefile.in +++ b/icu4c/source/tools/toolutil/Makefile.in @@ -47,7 +47,7 @@ CLEANFILES = *~ TARGET = libicu-toolutil.$(SO) DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw +CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)