1999-08-16 21:50:52 +00:00
## Makefile.in for ICU tools
2003-06-03 20:58:22 +00:00
## Copyright (c) 1999-2003, International Business Machines Corporation and
2000-01-17 19:48:20 +00:00
## others. All Rights Reserved.
1999-08-16 21:50:52 +00:00
2000-10-24 19:50:20 +00:00
## Source directory information
1999-08-16 21:50:52 +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-10-24 19:50:20 +00:00
i n c l u d e @ p l a t f o r m _ m a k e _ f r a g m e n t @
##
1999-11-23 05:34:05 +00:00
2000-02-12 05:54:43 +00:00
CPPFLAGS = @CPPFLAGS@ -I$( top_srcdir) /common -I$( top_builddir) /common
1999-11-23 05:34:05 +00:00
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
1999-11-23 04:49:35 +00:00
1999-08-16 21:50:52 +00:00
## Build directory information
subdir = tools
2000-02-16 22:38:38 +00:00
# OBJDATADIR must be a short path (with ..'s) to the data.
SRCDATADIR = $( top_srcdir) /../data
2000-10-05 00:03:01 +00:00
2001-03-22 22:02:05 +00:00
OBJDATADIR = $( top_builddir) /data
2000-10-03 23:19:26 +00:00
# tmpdir is INSIDE pkgdata dir. if you change TMPDATADIR then the invokation
# of pkgdata will break...
2000-08-29 22:26:15 +00:00
TMPDATADIR = tmp
# DATABUILDDIR must be an absolute path because of the way pkgdata is invoked
# from the temporary directory.
2001-03-22 22:02:05 +00:00
DATABUILDDIR = $( OBJDATADIR)
2000-07-10 17:53:01 +00:00
2000-08-15 02:41:58 +00:00
# relative lib links from pkgdata are the same as for tmp
2000-10-03 23:19:26 +00:00
top_builddir_from_tmp = $( patsubst ..%,../..%,$( top_builddir) )
INVOKE = $( LDLIBRARYPATH_ENVVAR) = $( top_builddir_from_tmp) /common:$( top_builddir_from_tmp) /tools/toolutil:$$ $( LDLIBRARYPATH_ENVVAR)
2001-08-15 22:39:42 +00:00
PKGDATA = ../pkgdata/pkgdata -T . -s $( DATABUILDDIR) -O ./icupkg.inc -d $( DATABUILDDIR)
2002-01-17 21:19:54 +00:00
PKGDATA_VERSIONING = -r $( SO_TARGET_VERSION)
2000-02-16 22:38:38 +00:00
1999-08-16 21:50:52 +00:00
## Install program information
2000-10-13 00:26:21 +00:00
MKINSTALLDIRS = $( SHELL) $( top_srcdir) /mkinstalldirs
1999-08-16 21:50:52 +00:00
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
1999-11-23 04:49:35 +00:00
## for cleaning up libraries
STRIP = @STRIP@
1999-08-16 21:50:52 +00:00
## Package information
PACKAGE = @PACKAGE@
VERSION = @VERSION@
2002-06-25 17:23:07 +00:00
SUBDIRS = ctestfw toolutil makeconv genrb genuca genbrk \
2003-07-25 00:20:50 +00:00
g e n c c o d e g e n p r o p s g e n n a m e s g e n p n a m e g e n n o r m g e n c m n g e n c n v a l g e n t z g e n t e s t g e n s p r e p p k g d a t a
1999-08-16 21:50:52 +00:00
## List of phony targets
2000-07-10 17:53:01 +00:00
.PHONY : all all -local all -recursive install install -local install -files install -dlls build -cmnfile build -dll \
1999-08-16 21:50:52 +00:00
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 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 \
2000-06-14 00:50:58 +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 b u i l d - t e s t d l l s b u i l d - b a s e t e s t d a t a b u i l d - l o c a l
1999-08-16 21:50:52 +00:00
## Clear suffix list
.SUFFIXES :
## List of standard targets
2000-06-14 00:50:58 +00:00
all : all -recursive
install : install -recursive
2000-07-12 02:00:43 +00:00
clean : clean -local clean -recursive
2000-06-14 00:50:58 +00:00
distclean : distclean -recursive
dist : dist -recursive
2000-08-01 01:55:54 +00:00
check : all check -recursive
1999-08-16 21:50:52 +00:00
## 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 \
2002-01-04 23:48:46 +00:00
echo " $( MAKE) [ $( MAKELEVEL) ]: Making \` $$ target' in \` $$ subdir' " ; \
1999-08-16 21:50:52 +00:00
if test " $$ subdir " = "." ; then \
2001-03-06 23:27:17 +00:00
dot_seen = yes; \
local_target = " $$ target-local " ; \
1999-08-16 21:50:52 +00:00
else \
2001-03-06 23:27:17 +00:00
local_target = " $$ target " ; \
1999-08-16 21:50:52 +00:00
fi ; \
2000-02-04 22:34:43 +00:00
( cd $$ subdir && $( MAKE) $$ local_target) || exit; \
1999-08-16 21:50:52 +00:00
done ; \
if test " $$ dot_seen " = "no" ; then \
2000-08-11 22:08:11 +00:00
$( MAKE) " $$ target-local " || exit; \
1999-08-16 21:50:52 +00:00
fi
1999-11-23 04:49:35 +00:00
all-local : build -local
2001-08-17 00:23:28 +00:00
DAT_FILES = uprops.dat unames.dat cnvalias.dat tz.dat
2000-06-14 00:50:58 +00:00
# ALL of these files can be deleted (the following BRK files) - they are copied
2002-02-28 01:28:04 +00:00
BRK_FILES = char.brk line.brk line_th.brk sent.brk word.brk title.brk word_th.brk
2000-06-14 00:50:58 +00:00
# don't include thaidict.brk - it goes into a resource bundle - plus it isn't deleted
1999-12-04 02:31:40 +00:00
2000-02-07 21:00:53 +00:00
DATAFILESD = $( DAT_FILES:%= $( OBJDATADIR) /%)
DATAFILESB = $( BRK_FILES:%= $( OBJDATADIR) /%)
2000-01-08 02:17:39 +00:00
# copy the right endianness
i f e q ( @ U _ I S _ B I G _ E N D I A N @ , 1 )
2000-02-16 22:38:38 +00:00
$(OBJDATADIR)/%.brk : $( SRCDATADIR ) /%BE .brk
2000-01-08 02:17:39 +00:00
cp $< $@
e l s e
2000-02-16 22:38:38 +00:00
$(OBJDATADIR)/%.brk : $( SRCDATADIR ) /%LE .brk
2000-01-08 02:17:39 +00:00
cp $< $@
e n d i f
1999-12-04 02:31:40 +00:00
2000-12-01 17:24:45 +00:00
#include $(srcdir)/makeconv/ucmfiles.mk
2001-03-06 23:27:17 +00:00
#-include $(srcdir)/makeconv/ucmebcdic.mk
2000-12-01 17:24:45 +00:00
#-include $(srcdir)/makeconv/ucmlocal.mk
2001-03-06 23:27:17 +00:00
ALL_UCM_SOURCE = $( UCM_SOURCE) $( UCM_EBCDIC_SOURCE) $( UCM_SOURCE_LOCAL)
1999-12-04 02:31:40 +00:00
2000-12-01 17:24:45 +00:00
#include $(srcdir)/genrb/genrbfiles.mk
#-include $(srcdir)/genrb/reslocal.mk
2000-06-13 19:46:54 +00:00
ALL_RES_SOURCE = $( GENRB_SOURCE) $( TRANSLIT_SOURCE) $( RESOURCE_SRC) $( GENRB_SOURCE_LOCAL)
1999-12-04 02:31:40 +00:00
2000-10-05 00:03:01 +00:00
UCM_FILES = $( ALL_UCM_SOURCE:%= $( SRCDATADIR) /%)
2000-02-16 22:38:38 +00:00
CNV_FILES = $( ALL_UCM_SOURCE:%.ucm= $( OBJDATADIR) /%.cnv)
2000-11-03 02:53:20 +00:00
CNV_FILESL = $( ALL_UCM_SOURCE:%.ucm= %.cnv)
1999-12-04 02:31:40 +00:00
2000-10-05 00:03:01 +00:00
RES_SRC_FILES = $( ALL_RES_SOURCE:%= $( SRCDATADIR) /%)
2000-05-15 18:39:17 +00:00
RES_FILES = $( ALL_RES_SOURCE:%.txt= $( OBJDATADIR) /%.res)
2000-11-03 02:53:20 +00:00
RES_FILESL = $( ALL_RES_SOURCE:%.txt= %.res)
2000-05-15 18:39:17 +00:00
DATAFILESC = $( CNV_FILES)
DATAFILESR = $( RES_FILES)
1999-12-04 02:31:40 +00:00
2000-11-03 02:53:20 +00:00
DATAFILES = $( DATAFILESD) $( CNV_FILES) $( DATAFILESB) $( RES_FILES)
DATAFILESL = $( DAT_FILES) $( CNV_FILESL) $( BRK_FILES) $( RES_FILESL)
1999-12-04 02:31:40 +00:00
2000-01-08 02:17:39 +00:00
## Files to remove for 'make clean'
2000-08-15 02:41:58 +00:00
CLEANFILES = *~ $( BRK_FILES)
1999-11-23 04:49:35 +00:00
2000-12-01 17:24:45 +00:00
install-local :
1999-08-16 21:50:52 +00:00
dist-local :
2000-07-10 17:53:01 +00:00
clean-local : clean -pkgdata
2000-10-02 23:37:16 +00:00
test -z " $( CLEANFILES) " || $( RMV) $( CLEANFILES)
2001-10-26 20:28:17 +00:00
test -z " $( SRCDATAFILES) " || $( RMV) $( SRCDATAFILES)
2000-11-03 02:53:20 +00:00
$( RMV) $( DATAFILES)
$( RMV) icupkg.inc
2000-11-22 05:08:51 +00:00
-@if [ -f $( TMPDATADIR) /$( ICUDATA_NAME) _dll.mak ] ; then \
2001-12-21 20:10:23 +00:00
( cd pkgdata ; $( INVOKE) ./pkgdata -T $( TMPDATADIR) -m dll $( PKGDATA_VERSIONING) -p $( ICUDATA_NAME) -O $( DATABUILDDIR) /icupkg.inc $( TMPDATADIR) /$( ICUDATA_NAME) .lst -d $( DATABUILDDIR) --clean ) \
2000-06-14 00:50:58 +00:00
fi
2000-11-22 05:08:51 +00:00
-@if [ -f $( TMPDATADIR) /$( ICUDATA_NAME) _common.mak ] ; then \
( cd pkgdata; $( INVOKE) ./pkgdata -T $( TMPDATADIR) -m common -p $( ICUDATA_NAME) -O $( DATABUILDDIR) /icupkg.inc $( TMPDATADIR) /$( ICUDATA_NAME) .lst -d $( DATABUILDDIR) --clean ) \
2000-06-14 00:50:58 +00:00
fi
2000-10-13 21:03:49 +00:00
-@$( RMV) $( TMPDATADIR) $( TMPDATADIR) 2
2000-06-14 00:50:58 +00:00
2000-10-02 23:37:16 +00:00
# Clean up any old variations..
distclean-local : clean -local
$( RMV) Makefile
2000-11-22 05:08:51 +00:00
$(TMPDATADIR)/$(ICUDATA_NAME).lst : Makefile $( srcdir ) /Makefile .in $( srcdir ) /genrb /genrbfiles .mk $( srcdir ) /makeconv /ucmfiles .mk
2002-01-04 23:48:46 +00:00
@echo " generating $@ (list of data files) "
2000-10-13 00:26:21 +00:00
@$( MKINSTALLDIRS) $( TMPDATADIR)
2000-11-22 05:08:51 +00:00
@-$( RMV) $( TMPDATADIR) /$( ICUDATA_NAME) .lst
2000-11-03 02:53:20 +00:00
@for file in $( DATAFILESL) ; do \
2000-11-22 05:08:51 +00:00
echo $( OBJDATADIR) /$$ file >> $( TMPDATADIR) /$( ICUDATA_NAME) .lst; \
2000-06-14 00:50:58 +00:00
done ;
2000-08-15 02:41:58 +00:00
$(TMPDATADIR)/testdata.lst : Makefile
2002-01-04 23:48:46 +00:00
$( MKINSTALLDIRS) $( TMPDATADIR)
echo $( DATABUILDDIR) /test.dat > $@
2000-07-10 17:53:01 +00:00
2000-11-01 19:29:51 +00:00
$(TMPDATADIR)2/testdata.lst : Makefile $( top_builddir ) /test /testdata /root .res
2002-01-04 23:48:46 +00:00
$( MKINSTALLDIRS) $( TMPDATADIR) 2
echo $( DATABUILDDIR) /test.dat > $@
echo $( DATABUILDDIR) /../test/testdata/root.res >> $@
2000-10-13 21:03:49 +00:00
2000-08-15 02:41:58 +00:00
$(TMPDATADIR)/icupkg.inc : pkgdata /icupkg .inc
2002-01-04 23:48:46 +00:00
$( MKINSTALLDIRS) $( TMPDATADIR)
2000-08-15 02:41:58 +00:00
cp pkgdata/icupkg.inc $( TMPDATADIR) /icupkg.inc
2000-06-14 00:50:58 +00:00
2000-10-13 21:03:49 +00:00
$(TMPDATADIR)2/icupkg.inc : pkgdata /icupkg .inc
2002-01-04 23:48:46 +00:00
$( MKINSTALLDIRS) $( TMPDATADIR) 2
2000-10-13 21:03:49 +00:00
cp pkgdata/icupkg.inc $( TMPDATADIR) 2/icupkg.inc
2000-07-10 17:53:01 +00:00
# build the ICU and test data
2000-12-01 17:24:45 +00:00
build-local :
2000-08-15 02:55:36 +00:00
clean-pkgdata :
2001-08-15 22:39:42 +00:00
-( cd $( TMPDATADIR) ; $( INVOKE) $( PKGDATA) -m dll -p $( ICUDATA_NAME) ./$( ICUDATA_NAME) .lst --clean || echo '### Warning, cannot clean up icu/data if pkgdata is already gone.' )
-( cd $( TMPDATADIR) ; $( INVOKE) $( PKGDATA) -m common -p testdat1 ./testdata.lst --clean || echo '### Warning, cannot clean up icu/data if pkgdata is already gone.' )
-( cd $( TMPDATADIR) 2; $( INVOKE) $( PKGDATA) -m common -p testdat2 ./testdata.lst --clean || echo '### Warning, cannot clean up icu/data if pkgdata is already gone.' )
2000-11-22 05:08:51 +00:00
-$( RMV) $( TMPDATADIR) /$( ICUDATA_NAME) .lst $( TMPDATADIR) /testdata.lst $( TMPDATADIR) /icupkg.inc $( TMPDATADIR) 2/testdata.lst
1999-08-16 21:50:52 +00:00
check-local :
Makefile : $( srcdir ) /Makefile .in $( top_builddir ) /config .status
cd $( top_builddir) \
&& CONFIG_FILES = $( subdir) /$@ CONFIG_HEADERS = $( SHELL) ./config.status
2000-08-15 02:41:58 +00:00