#****************************************************************************** # # Copyright (C) 1998-2005, International Business Machines # Corporation and others. All Rights Reserved. # #****************************************************************************** ## Top-level Makefile.in for ICU ## Stephen F. Booth ## Source directory information srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = ../.. include $(top_builddir)/icudefs.mk ## Build directory information subdir = test/testdata ## Files to remove for 'make clean' CLEANFILES = *~ SUBDIRS = ## 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 build-dir .NOTPARALLEL: build-dir ## 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 all-local: build-dir build-testdata testdata packagetest install-local: dist-local: clean-local: test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) $(RMV) $(TESTOUTDIR) distclean-local: clean-local $(RMV) Makefile pkgdata.inc check-local: Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status pkgdata.inc: $(srcdir)/pkgdata.inc.in Makefile $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status ######################################################################### ############################## Test ## stuff ############################ ifeq ($(PKGDATA_OPTS),) PKGDATA_OPTS = -O $(top_builddir)/test/testdata/pkgdata.inc endif # relative lib links from pkgdata are the same as for tmp GENRBOPTS=-k TOOLDIR=$(top_builddir)/tools SRCDATADIR=$(top_srcdir)/data UNICODEDATADIR=$(SRCDATADIR)/unidata OUTDIR=$(top_builddir)/data/out OUTTMPDIR=$(top_builddir)/data/out/tmp BUILDDIR=$(OUTDIR)/build/$(ICUDATA_PLATFORM_NAME) TESTSRCDATADIR=$(top_srcdir)/test/testdata TESTOUTDIR=$(top_builddir)/test/testdata/out BUILD_DIRS = $(TESTOUTDIR) $(TESTBUILDDIR) ifeq ($(PKGDATA_MODE),common) ICU_DATA_OPT = -i $(OUTDIR) else ifeq ($(PKGDATA_MODE),dll) ICU_DATA_OPT = else ICU_DATA_OPT = -i $(BUILDDIR) endif endif PKGDATA = $(BINDIR)/pkgdata $(PKGDATA_OPTS) -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) PKGDATA_INVOKE:=$(INVOKE) $(PKGDATA_INVOKE_OPTS) # Contains all 'intermediate' files (and temp files) except for 'unpackaged data' below TESTBUILDDIR=$(TESTOUTDIR)/build # unpackaged files - live in 'out' so that the path can find them as part of the pkg UNPACKAGEDTESTDATA=$(TESTOUTDIR)/$(TESTDT)nam.typ # pkg name for testdata TESTDATA=testdata # prefix for files that are testdata TESTDT=$(TESTDATA)_ # File definitions TEST_DAT_FILES=$(TESTBUILDDIR)/$(TESTDT)test.icu $(TESTBUILDDIR)/$(TESTDT)nfscsi.spp $(TESTBUILDDIR)/$(TESTDT)nfscss.spp $(TESTBUILDDIR)/$(TESTDT)nfscis.spp $(TESTBUILDDIR)/$(TESTDT)nfsmxs.spp $(TESTBUILDDIR)/$(TESTDT)nfsmxp.spp TEST_UCM_SOURCE= test1.ucm test3.ucm test4.ucm test4x.ucm ibm9027.ucm TEST_UCM_FILES=$(TEST_UCM_SOURCE:%=$(TESTSRCDATADIR)/data/%) TEST_CNV_FILES=$(TEST_UCM_SOURCE:%.ucm=$(TESTBUILDDIR)/$(TESTDT)%.cnv) TEST_RES = casing.txt mc.txt root.txt sh.txt sh_YU.txt te.txt te_IN.txt te_IN_REVISED.txt testtypes.txt testaliases.txt testempty.txt structLocale.txt DataDrivenCollationTest.txt idna_rules.txt conversion.txt icuio.txt testtable32.txt TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/$(TESTDT)%.res) $(TESTBUILDDIR)/$(TESTDT)iscii.res $(TESTSRCDATADIR)/$(TESTDT)icu26_testtypes.res $(TESTSRCDATADIR)/$(TESTDT)icu26e_testtypes.res ALL_TEST_FILES = $(TEST_DAT_FILES) $(TEST_BRK_FILES) $(TEST_CNV_FILES) $(TEST_RES_FILES) $(TESTOUTDIR)/$(TESTDT)nam.typ # list $(TESTBUILDDIR)/testdata.lst: $(SRCLISTDEPS) @echo "generating $@ (list of data files)" @-$(RMV) $@ @for file in $(TEST_RES_FILES) $(TEST_DAT_FILES) $(TEST_CNV_FILES); do \ echo $$file >> $@; \ done; build-testdata: build-dir $(ALL_TEST_FILES) $(TESTBUILDDIR)/testdata.lst $(TESTBUILDDIR)/$(TESTDT)iscii.res # test.icu $(TESTBUILDDIR)/$(TESTDT)test.icu: $(TOOLDIR)/gentest/gentest$(EXEEXT) $(INVOKE) $(TOOLDIR)/gentest/gentest -d $(TESTBUILDDIR) $(TESTBUILDDIR)/testtable32.txt: $(TOOLDIR)/gentest/gentest$(EXEEXT) $(INVOKE) $(TOOLDIR)/gentest/gentest -r -d $(TESTBUILDDIR) $(TESTBUILDDIR)/$(TESTDT)testtable32.res: $(TESTBUILDDIR)/testtable32.txt $(BINDIR)/genrb$(EXEEXT) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -p $(TESTDATA) -q -s $(TESTBUILDDIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(/dev/null || ( echo "WARNING: could not open ISCII - it may have been disabled." | tee $@ ) @echo Finished testing genrb -e option ################################################################### TYP # TYP FILES $(TESTOUTDIR)/$(TESTDT)nam.typ: $(TESTBUILDDIR)/$(TESTDT)te_IN.res cp $< $@ testdata: build-dir $(ALL_TEST_FILES) $(UNPACKAGEDTESTDATA) #$(ALL_TEST_FILES) $(TESTBUILDDIR)/testtable32.txt $(TESTBUILDDIR)/testdata.lst: build-dir packagetest: build-dir testdata pkgdata.inc $(TESTBUILDDIR)/testdata.lst $(PKGDATA_INVOKE) $(PKGDATA) -T $(TESTBUILDDIR) -d $(TESTOUTDIR) -s $(TESTBUILDDIR) -p $(TESTDATA) -m common $(TESTBUILDDIR)/testdata.lst build-dir: $(BUILD_DIRS) $(BUILD_DIRS): -$(MKINSTALLDIRS) $(BUILD_DIRS)