1999-08-16 21:50:52 +00:00
|
|
|
## Makefile.in for ICU tools
|
2000-01-17 19:48:20 +00:00
|
|
|
## Copyright (c) 1999-2000, International Business Machines Corporation and
|
|
|
|
## others. All Rights Reserved.
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
## Shell to use
|
|
|
|
SHELL = @SHELL@
|
1999-11-23 04:49:35 +00:00
|
|
|
VERSION = @VERSION@
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
## Install directory information
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
1999-11-23 05:34:05 +00:00
|
|
|
CC = @CC@
|
|
|
|
CXX = @CXX@
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
@host_frag@
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
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 = tools
|
|
|
|
|
2000-06-14 00:50:58 +00:00
|
|
|
## Allow overriding of package build mode
|
|
|
|
ifeq ($(strip $(MODE)),)
|
2000-09-22 19:02:20 +00:00
|
|
|
MODE=@DATA_PACKAGING_MODE@
|
2000-06-14 00:50:58 +00:00
|
|
|
endif
|
|
|
|
|
2000-02-16 22:38:38 +00:00
|
|
|
# OBJDATADIR must be a short path (with ..'s) to the data.
|
|
|
|
|
|
|
|
ICUDATADIR=$(pkgdatadir)/$(VERSION)
|
|
|
|
SRCDATADIR=$(top_srcdir)/../data
|
2000-08-29 22:26:15 +00:00
|
|
|
OBJDATADIR=$(top_builddir)/data
|
2000-07-10 17:53:01 +00:00
|
|
|
# tmpdir is INSIDE pkgdata dir
|
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.
|
|
|
|
|
|
|
|
DATABUILDDIR=$(shell cd $(OBJDATADIR) && /bin/pwd)
|
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-08-29 22:26:15 +00:00
|
|
|
PKGDATA=../pkgdata/pkgdata -T . -s $(DATABUILDDIR) -O ./icupkg.inc -d $(DATABUILDDIR) -v -m $(MODE)
|
2000-02-16 22:38:38 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
## Install program information
|
|
|
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
|
|
|
|
|
|
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@
|
|
|
|
|
|
|
|
|
2000-07-13 18:19:21 +00:00
|
|
|
SUBDIRS = ctestfw toolutil makeconv genrb \
|
2000-06-14 00:50:58 +00:00
|
|
|
genccode genprops gennames gencmn gencnval gentz gentest pkgdata
|
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
|
|
|
install-recursive clean clean-local clean-recursive distclean \
|
|
|
|
distclean-local distclean-recursive dist dist-local dist-recursive \
|
2000-06-14 00:50:58 +00:00
|
|
|
check check-local check-recursive build-testdlls build-basetestdata build-local
|
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 \
|
|
|
|
echo "Making $$target in $$subdir"; \
|
|
|
|
if test "$$subdir" = "."; then \
|
|
|
|
dot_seen=yes; \
|
|
|
|
local_target="$$target-local"; \
|
|
|
|
else \
|
|
|
|
local_target="$$target"; \
|
|
|
|
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
|
|
|
|
|
2000-04-21 19:49:30 +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
|
2000-01-08 02:17:39 +00:00
|
|
|
BRK_FILES=char.brk line.brk line_th.brk sent.brk word.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
|
|
|
|
|
|
|
|
ifeq (@U_IS_BIG_ENDIAN@,1)
|
2000-02-16 22:38:38 +00:00
|
|
|
$(OBJDATADIR)/%.brk: $(SRCDATADIR)/%BE.brk
|
2000-01-08 02:17:39 +00:00
|
|
|
cp $< $@
|
|
|
|
else
|
2000-02-16 22:38:38 +00:00
|
|
|
$(OBJDATADIR)/%.brk: $(SRCDATADIR)/%LE.brk
|
2000-01-08 02:17:39 +00:00
|
|
|
cp $< $@
|
|
|
|
endif
|
1999-12-04 02:31:40 +00:00
|
|
|
|
2000-02-07 21:00:53 +00:00
|
|
|
include $(srcdir)/makeconv/ucmfiles.mk
|
|
|
|
-include $(srcdir)/makeconv/ucmlocal.mk
|
1999-12-04 02:31:40 +00:00
|
|
|
ALL_UCM_SOURCE= $(UCM_SOURCE) $(UCM_SOURCE_LOCAL)
|
|
|
|
|
2000-05-15 18:39:17 +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
|
|
|
|
|
|
|
UCM_FILES = $(ALL_UCM_SOURCE:%=$(top_srcdir)/../data/%)
|
2000-02-16 22:38:38 +00:00
|
|
|
CNV_FILES = $(ALL_UCM_SOURCE:%.ucm=$(OBJDATADIR)/%.cnv)
|
1999-12-04 02:31:40 +00:00
|
|
|
|
2000-05-15 18:39:17 +00:00
|
|
|
RES_SRC_FILES = $(ALL_RES_SOURCE:%=$(top_srcdir)/../data/%)
|
|
|
|
RES_FILES = $(ALL_RES_SOURCE:%.txt=$(OBJDATADIR)/%.res)
|
|
|
|
|
|
|
|
DATAFILESC=$(CNV_FILES)
|
|
|
|
DATAFILESR=$(RES_FILES)
|
1999-12-04 02:31:40 +00:00
|
|
|
|
2000-05-15 18:39:17 +00:00
|
|
|
DATAFILES=$(DATAFILESD) $(DATAFILESC) $(DATAFILESB) $(DATAFILESR)
|
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-06-14 00:50:58 +00:00
|
|
|
install-udata: install-pkgdata
|
1999-11-23 04:49:35 +00:00
|
|
|
|
2000-08-01 01:55:54 +00:00
|
|
|
install-local: all-local install-udata
|
1999-11-23 04:49:35 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
dist-local:
|
|
|
|
|
2000-07-10 17:53:01 +00:00
|
|
|
clean-local: clean-pkgdata
|
2000-08-15 02:41:58 +00:00
|
|
|
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) $(TMPDATADIR)/*
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-07-10 17:53:01 +00:00
|
|
|
# Clean up any old variations..
|
2000-04-10 23:24:53 +00:00
|
|
|
distclean-local: clean-local
|
2000-06-14 00:50:58 +00:00
|
|
|
$(RMV) Makefile $(SRCDATAFILES) $(DATAFILES) $(TESTDATAD) $(BASETESTDATA) icupkg.inc
|
2000-07-10 17:53:01 +00:00
|
|
|
-@if [ -f $(TMPDATADIR)/icudata_dll.mak ]; then \
|
2000-08-29 22:26:15 +00:00
|
|
|
(cd pkgdata ; ./pkgdata -T $(TMPDATADIR) -m dll -p icudata -O $(DATABUILDDIR)/icupkg.inc $(TMPDATADIR)/icudata.lst -d $(DATABUILDDIR) --clean ) \
|
2000-06-14 00:50:58 +00:00
|
|
|
fi
|
2000-07-10 17:53:01 +00:00
|
|
|
-@if [ -f $(TMPDATADIR)/icudata_common.mak ]; then \
|
2000-08-29 22:26:15 +00:00
|
|
|
(cd pkgdata; ./pkgdata -T $(TMPDATADIR) -m common -p icudata -O $(DATABUILDDIR)/icupkg.inc $(TMPDATADIR)/icudata.lst -d $(DATABUILDDIR) --clean ) \
|
2000-06-14 00:50:58 +00:00
|
|
|
fi
|
2000-07-10 17:53:01 +00:00
|
|
|
-@$(RMV) $(TMPDATADIR)
|
2000-06-14 00:50:58 +00:00
|
|
|
|
2000-08-15 02:41:58 +00:00
|
|
|
$(TMPDATADIR)/icudata.lst: Makefile $(srcdir)/Makefile.in $(srcdir)/genrb/genrbfiles.mk $(srcdir)/makeconv/ucmfiles.mk
|
2000-06-14 00:50:58 +00:00
|
|
|
@echo Generating $@ list of data files
|
2000-08-15 17:20:39 +00:00
|
|
|
@$(mkinstalldirs) $(TMPDATADIR)
|
2000-08-15 02:41:58 +00:00
|
|
|
@-$(RMV) $(TMPDATADIR)/icudata.lst
|
2000-09-27 22:09:04 +00:00
|
|
|
@pwd=`pwd`; \
|
|
|
|
for file in $(DATAFILES); do \
|
|
|
|
echo $$pwd/$$file >> $(TMPDATADIR)/icudata.lst; \
|
2000-06-14 00:50:58 +00:00
|
|
|
done;
|
|
|
|
|
2000-08-15 02:41:58 +00:00
|
|
|
$(TMPDATADIR)/testdata.lst: Makefile
|
|
|
|
@$(mkinstalldirs) $(TMPDATADIR)
|
2000-08-29 22:26:15 +00:00
|
|
|
@echo $(DATABUILDDIR)/test.dat > $@
|
2000-07-10 17:53:01 +00:00
|
|
|
|
2000-08-15 02:41:58 +00:00
|
|
|
$(TMPDATADIR)/icupkg.inc: pkgdata/icupkg.inc
|
|
|
|
@$(mkinstalldirs) $(TMPDATADIR)
|
|
|
|
cp pkgdata/icupkg.inc $(TMPDATADIR)/icupkg.inc
|
2000-06-14 00:50:58 +00:00
|
|
|
|
2000-07-10 17:53:01 +00:00
|
|
|
# build the ICU and test data
|
|
|
|
|
2000-08-29 22:26:15 +00:00
|
|
|
build-local build-pkgdata: $(TMPDATADIR)/icudata.lst $(TMPDATADIR)/testdata.lst $(TMPDATADIR)/icupkg.inc $(DATAFILES) $(DATABUILDDIR)/test.dat
|
2000-08-15 02:41:58 +00:00
|
|
|
@$(mkinstalldirs) $(TMPDATADIR)
|
2000-08-29 22:26:15 +00:00
|
|
|
(cd $(TMPDATADIR); $(PKGDATA) -p icudata ./icudata.lst )
|
2000-08-30 23:58:24 +00:00
|
|
|
(cd $(TMPDATADIR); $(PKGDATA) -p testdat1 ./testdata.lst )
|
|
|
|
(cd $(TMPDATADIR); $(PKGDATA) -p testdat2 ./testdata.lst )
|
2000-06-14 00:50:58 +00:00
|
|
|
|
2000-08-15 02:41:58 +00:00
|
|
|
install-pkgdata: $(TMPDATADIR)/icudata.lst $(TMPDATADIR)/icupkg.inc
|
2000-07-10 17:53:01 +00:00
|
|
|
$(mkinstalldirs) $(TMPDATADIR) $(DESTDIR)$(pkgdatadir)/$(VERSION)
|
2000-08-29 22:26:15 +00:00
|
|
|
(cd $(TMPDATADIR); $(PKGDATA) -p icudata ./icudata.lst -I $(DESTDIR)$(pkgdatadir)/$(VERSION) )
|
2000-06-14 00:50:58 +00:00
|
|
|
|
|
|
|
|
2000-08-15 02:55:36 +00:00
|
|
|
clean-pkgdata:
|
2000-07-10 17:53:01 +00:00
|
|
|
@$(mkinstalldirs) $(TMPDATADIR)
|
2000-08-29 22:26:15 +00:00
|
|
|
-@(cd $(TMPDATADIR); $(PKGDATA) -p icudata ./icudata.lst --clean || echo '### Warning, cannot clean up icu/data if pkgdata is already gone.' )
|
2000-08-15 02:41:58 +00:00
|
|
|
-$(RMV) $(TMPDATADIR)/icudata.lst $(TMPDATADIR)/icupkg.inc
|
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
|
|
|
|
|
|
|
|