2000-08-29 07:28:22 +00:00
#******************************************************************************
#
2004-04-04 09:04:47 +00:00
# Copyright (C) 1998-2004, International Business Machines
2000-08-29 07:28:22 +00:00
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
## Top-level Makefile.in for ICU
## Stephen F. Booth
2000-10-24 19:50:20 +00:00
## Source directory information
2000-08-29 07:28:22 +00:00
srcdir = @srcdir@
top_srcdir = @top_srcdir@
2000-10-26 19:28:33 +00:00
top_builddir = ../..
i n c l u d e $( top_builddir ) / i c u d e f s . m k
2000-08-29 07:28:22 +00:00
## 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 \
i n s t a l l - r e c u r s i v e c l e a n c l e a n - l o c a l c l e a n - r e c u r s i v e d i s t c l e a n \
d i s t c l e a n - l o c a l d i s t c l e a n - r e c u r s i v e d o c d i s t d i s t - l o c a l d i s t - r e c u r s i v e \
2004-07-19 14:10:08 +00:00
c h e c k c h e c k - l o c a l c h e c k - r e c u r s i v e c o p y d a t a b u i l d - d i r
2000-08-29 07:28:22 +00:00
## 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
2004-07-19 14:10:08 +00:00
all-local : build -dir copydata build -testdata testdata packagetest
2000-08-29 07:28:22 +00:00
install-local :
dist-local :
clean-local :
test -z " $( CLEANFILES) " || $( RMV) $( CLEANFILES)
2004-07-19 14:10:08 +00:00
$( RMV) $( TESTOUTDIR)
2000-08-29 22:26:15 +00:00
i f n e q ( $( wildcard .links ) , )
2002-07-20 00:26:32 +00:00
$( RMV) *.goo *.txt *.bin .links
2000-08-29 07:28:22 +00:00
e n d i f
2000-10-02 23:37:16 +00:00
distclean-local : clean -local
2004-07-19 14:10:08 +00:00
$( RMV) Makefile icupkg.inc
2000-10-02 23:37:16 +00:00
2000-08-29 07:28:22 +00:00
check-local :
2004-07-19 14:10:08 +00:00
Makefile : $( srcdir ) /Makefile .in $( top_builddir ) /config .status
2000-08-29 07:28:22 +00:00
cd $( top_builddir) \
2004-07-19 14:10:08 +00:00
&& CONFIG_FILES = $( subdir) /$@ CONFIG_HEADERS = $( SHELL) ./config.status
2000-08-29 07:28:22 +00:00
2004-07-19 14:10:08 +00:00
icupkg.inc : $( srcdir ) /icupkg .inc .in Makefile $( top_builddir ) /config .status
cd $( top_builddir) \
&& CONFIG_FILES = $( subdir) /$@ CONFIG_HEADERS = $( SHELL) ./config.status
copydata : default .goo
2000-08-29 07:28:22 +00:00
2000-08-29 22:26:15 +00:00
i f n e q ( $( srcdir ) , . )
2000-08-29 07:28:22 +00:00
default.goo : $( srcdir ) /default .goo
2002-07-20 00:26:32 +00:00
$( RMV) *.goo *.txt *.bin
ln -s $( srcdir) /*.goo $( srcdir) /*.txt $( srcdir) /*.bin .
2000-08-29 22:26:15 +00:00
touch .links
e n d i f
2000-08-29 07:28:22 +00:00
2004-07-19 14:10:08 +00:00
#########################################################################
############################## Test ## stuff ############################
i f e q ( $( PKGDATA_OPTS ) , )
PKGDATA_OPTS = -O $( top_builddir) /test/testdata/icupkg.inc
e n d i f
# 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
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 te.txt te_IN.txt testtypes.txt testaliases.txt testempty.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 : $( 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 ) /testtable 32.txt $( BINDIR ) /genrb $( EXEEXT )
$( INVOKE) $( BINDIR) /genrb $( GENRBOPTS) -p $( TESTDATA) -q -s $( TESTBUILDDIR) -i $( BUILDDIR) -d $( TESTBUILDDIR) $( <F)
# Targets for nfscsi.spp
$(TESTBUILDDIR)/$(TESTDT)nfscsi.spp : $( BINDIR ) /gensprep $( EXEEXT ) $( TESTSRCDATADIR ) /nfs 4_cs_prep_ci .txt
@echo Building nfscsi.icu
$( INVOKE) $( BINDIR) /gensprep -s $( TESTSRCDATADIR) -i $( BUILDDIR) -d $( TESTBUILDDIR) -b nfscsi -p $( TESTDATA) -u 3.2.0 nfs4_cs_prep_ci.txt
# Targets for nfscss.spp
$(TESTBUILDDIR)/$(TESTDT)nfscss.spp : $( BINDIR ) /gensprep $( EXEEXT ) $( TESTSRCDATADIR ) /nfs 4_cs_prep_cs .txt
@echo Building nfscss.icu
$( INVOKE) $( BINDIR) /gensprep -s $( TESTSRCDATADIR) -i $( BUILDDIR) -d $( TESTBUILDDIR) -b nfscss -p $( TESTDATA) -u 3.2.0 nfs4_cs_prep_cs.txt
# Targets for nfscis.spp
$(TESTBUILDDIR)/$(TESTDT)nfscis.spp : $( BINDIR ) /gensprep $( EXEEXT ) $( TESTSRCDATADIR ) /nfs 4_cis_prep .txt
@echo Building nfscis.spp
$( INVOKE) $( BINDIR) /gensprep -s $( TESTSRCDATADIR) -i $( BUILDDIR) -d $( TESTBUILDDIR) -b nfscis -p $( TESTDATA) -k -n $( UNICODEDATADIR) -u 3.2.0 nfs4_cis_prep.txt
# Targets for nfsmxs.spp
$(TESTBUILDDIR)/$(TESTDT)nfsmxs.spp : $( BINDIR ) /gensprep $( EXEEXT ) $( TESTSRCDATADIR ) /nfs 4_mixed_prep_s .txt
@echo Building nfsmxs.spp
$( INVOKE) $( BINDIR) /gensprep -s $( TESTSRCDATADIR) -i $( BUILDDIR) -d $( TESTBUILDDIR) -b nfsmxs -p $( TESTDATA) -k -n $( UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_s.txt
# Targets for nfsmxp.spp
$(TESTBUILDDIR)/$(TESTDT)nfsmxp.spp : $( BINDIR ) /gensprep $( EXEEXT ) $( TESTSRCDATADIR ) /nfs 4_mixed_prep_p .txt
@echo Building nfsmxp.spp
$( INVOKE) $( BINDIR) /gensprep -s $( TESTSRCDATADIR) -i $( BUILDDIR) -d $( TESTBUILDDIR) -b nfsmxp -p $( TESTDATA) -k -n $( UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_p.txt
$(TESTBUILDDIR)/$(TESTDT)%.cnv : $( TESTSRCDATADIR ) /%.ucm $( BINDIR ) /makeconv $( EXEEXT )
$( INVOKE) $( BINDIR) /makeconv -p $( TESTDATA) -c -d $( TESTBUILDDIR) $( TESTSRCDATADIR) /$( <F)
$(TESTBUILDDIR)/$(TESTDT)%.res : $( TESTSRCDATADIR ) /%.txt $( BINDIR ) /genrb $( EXEEXT ) $( DAT_FILES )
$( INVOKE) $( BINDIR) /genrb $( GENRBOPTS) -p $( TESTDATA) -q -s $( TESTSRCDATADIR) -i $( BUILDDIR) -d $( TESTBUILDDIR) $( <F)
$(TESTBUILDDIR)/$(TESTDT)iscii.res : $( TESTSRCDATADIR ) /iscii .bin $( BINDIR ) /genrb $( EXEEXT )
@echo Testing genrb -e option
@ICU_DATA= $( BUILDDIR) $( INVOKE) $( BINDIR) /genrb $( GENRBOPTS) -s $( TESTSRCDATADIR) -p $( TESTDATA) -eISCII,version= 0 -d $( TESTBUILDDIR) $( <F) >/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) : build -dir
packagetest : testdata icupkg .inc $( TESTBUILDDIR ) /testdata .lst
$( PKGDATA_INVOKE) $( PKGDATA) -T $( TESTBUILDDIR) -d $( TESTOUTDIR) -s $( TESTBUILDDIR) -p $( TESTDATA) -m common $( TESTBUILDDIR) /testdata.lst
build-dir :
-$( MKINSTALLDIRS) $( TESTOUTDIR) $( TESTBUILDDIR)