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
This commit is contained in:
parent
2e0449e0ad
commit
4e1c30d30b
@ -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@
|
||||
|
||||
|
@ -20,3 +20,13 @@
|
||||
|
||||
/* Define to signed char if not in <sys/types.h> */
|
||||
#undef bool_t
|
||||
|
||||
/* Define if your system has <wchar.h> */
|
||||
#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
|
||||
|
||||
|
@ -30,11 +30,17 @@
|
||||
/* Define to signed char if not in <sys/types.h> */
|
||||
#undef bool_t
|
||||
|
||||
/* The number of bytes in a wchar_t. */
|
||||
/* Define if your system has <wchar.h> */
|
||||
#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 <inttypes.h> header file. */
|
||||
#undef U_HAVE_INTTYPES_H
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the cma library (-lcma). */
|
||||
#undef HAVE_LIBCMA
|
||||
|
18
icu4c/source/configure
vendored
18
icu4c/source/configure
vendored
@ -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 <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile \
|
||||
data/Makefile \
|
||||
common/Makefile config/Makefile.inc i18n/Makefile \
|
||||
extra/Makefile extra/ustdio/Makefile \
|
||||
tools/Makefile tools/ctestfw/Makefile tools/makeconv/Makefile \
|
||||
@ -3282,7 +3288,7 @@ CONFIG_FILES=\${CONFIG_FILES-"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 \
|
||||
@ -3474,14 +3480,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
|
||||
|
@ -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
|
||||
|
151
icu4c/source/data/Makefile.in
Normal file
151
icu4c/source/data/Makefile.in
Normal file
@ -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@
|
||||
|
@ -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 \
|
||||
|
@ -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 <console.h>
|
||||
#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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/ures.h"
|
||||
#include "unicode/coll.h"
|
||||
@ -30,6 +43,7 @@
|
||||
#include <console.h>
|
||||
#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
|
||||
|
147
icu4c/source/test/testdata/Makefile.in
vendored
Normal file
147
icu4c/source/test/testdata/Makefile.in
vendored
Normal file
@ -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 .
|
||||
|
@ -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/ $(<F)
|
||||
|
||||
#@DATABUILDDIR@/translit/%.res : $(top_srcdir)/../data/translit/%.txt
|
||||
# @echo "Creating translit resource file for $<"
|
||||
# @ICU_DATA=@DATABUILDDIR@ ./genrb -d @DATABUILDDIR@/translit/ $<
|
||||
ICU_DATA=@DATABUILDDIR@ ./genrb -s $(top_srcdir)/test/testdata/ -d $(top_builddir)/test/testdata/ $(<F)
|
||||
|
||||
@DATABUILDDIR@/%.res : $(top_srcdir)/../data/%.txt
|
||||
@echo "Creating compiled resource file for $<"
|
||||
|
@ -68,7 +68,7 @@ CNV_FILES = $(ALL_UCM:%.ucm=@DATABUILDDIR@/%.cnv)
|
||||
|
||||
TEST_UCM_SOURCE= test1.ucm test3.ucm test4.ucm
|
||||
TEST_UCM_FILES=$(TEST_UCM_SOURCE:%=$(top_srcdir)/test/testdata/%)
|
||||
TEST_CNV_FILES=$(TEST_UCM_SOURCE:%.ucm=@DATABUILDDIR@/../source/test/testdata/%.cnv)
|
||||
TEST_CNV_FILES=$(TEST_UCM_SOURCE:%.ucm=@DATABUILDDIR@/%.cnv)
|
||||
|
||||
## List of phony targets
|
||||
.PHONY : all all-local install install-local clean clean-local \
|
||||
@ -121,6 +121,10 @@ $(TARGET) : $(OBJECTS)
|
||||
$(LINK.c) -o $@ $^ $(LIBS)
|
||||
|
||||
# Rule to build a compiled cnv file
|
||||
@DATABUILDDIR@/test%.cnv : $(top_srcdir)/test/testdata/test%.ucm
|
||||
@echo -n "$< -> "
|
||||
@./makeconv -d @DATABUILDDIR@ $<
|
||||
|
||||
@DATABUILDDIR@/%.cnv : $(top_srcdir)/../data/%.ucm
|
||||
@echo -n "$< -> "
|
||||
@./makeconv -d @DATABUILDDIR@ $<
|
||||
|
Loading…
Reference in New Issue
Block a user