scuffed-code/icu4c/source/tools/Makefile.in
Steven R. Loomis a432d46851 ICU-360 pkgdata tool
X-SVN-Rev: 1626
2000-06-14 23:56:41 +00:00

220 lines
6.7 KiB
Makefile

## Makefile.in for ICU tools
## Copyright (c) 1999-2000, International Business Machines Corporation and
## others. All Rights Reserved.
## Shell to use
SHELL = @SHELL@
VERSION = @VERSION@
## Install directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
CC = @CC@
CXX = @CXX@
CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_builddir)/common
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
@host_frag@
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
## Type of build
@USE_MAPPED_TRUE@ DEFAULT_MODE=common
@USE_MAPPED_FALSE@ DEFAULT_MODE=dll
## Allow overriding of package build mode
ifeq ($(strip $(MODE)),)
MODE=$(DEFAULT_MODE)
endif
# OBJDATADIR must be a short path (with ..'s) to the data.
# @RELATIVEDATADIR@ exists solely for this line.
ICUDATADIR=$(pkgdatadir)/$(VERSION)
SRCDATADIR=$(top_srcdir)/../data
OBJDATADIR=$(top_builddir)/@RELATIVEDATADIR@
## Install program information
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
## for cleaning up libraries
STRIP = @STRIP@
## Package information
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SUBDIRS = ctestfw toolutil makeconv genrb rbdump \
genccode genprops gennames gencmn gencnval gentz gentest pkgdata
## List of phony targets
.PHONY : all all-local all-recursive install install-local install-everything install-files install-dlls build-data build-cmnfile build-dll \
install-recursive clean clean-local clean-recursive distclean \
distclean-local distclean-recursive dist dist-local dist-recursive \
check check-local check-recursive build-testdlls build-basetestdata build-local
## Clear suffix list
.SUFFIXES :
## List of standard targets
all: all-recursive
install: install-recursive
clean: clean-recursive
distclean : distclean-recursive
dist: dist-recursive
check: check-recursive
## 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 1; \
fi
all-local: build-local
DAT_FILES=uprops.dat unames.dat cnvalias.dat tz.dat
# ALL of these files can be deleted (the following BRK files) - they are copied
BRK_FILES=char.brk line.brk line_th.brk sent.brk word.brk word_th.brk
# don't include thaidict.brk - it goes into a resource bundle - plus it isn't deleted
DATAFILESD=$(DAT_FILES:%=$(OBJDATADIR)/%)
DATAFILESB=$(BRK_FILES:%=$(OBJDATADIR)/%)
# copy the right endianness
ifeq (@U_IS_BIG_ENDIAN@,1)
$(OBJDATADIR)/%.brk: $(SRCDATADIR)/%BE.brk
cp $< $@
else
$(OBJDATADIR)/%.brk: $(SRCDATADIR)/%LE.brk
cp $< $@
endif
include $(srcdir)/makeconv/ucmfiles.mk
-include $(srcdir)/makeconv/ucmlocal.mk
ALL_UCM_SOURCE= $(UCM_SOURCE) $(UCM_SOURCE_LOCAL)
include $(srcdir)/genrb/genrbfiles.mk
-include $(srcdir)/genrb/reslocal.mk
ALL_RES_SOURCE= $(GENRB_SOURCE) $(TRANSLIT_SOURCE) $(RESOURCE_SRC) $(GENRB_SOURCE_LOCAL)
UCM_FILES = $(ALL_UCM_SOURCE:%=$(top_srcdir)/../data/%)
CNV_FILES = $(ALL_UCM_SOURCE:%.ucm=$(OBJDATADIR)/%.cnv)
RES_SRC_FILES = $(ALL_RES_SOURCE:%=$(top_srcdir)/../data/%)
RES_FILES = $(ALL_RES_SOURCE:%.txt=$(OBJDATADIR)/%.res)
DATAFILESC=$(CNV_FILES)
DATAFILESR=$(RES_FILES)
DATAFILES=$(DATAFILESD) $(DATAFILESC) $(DATAFILESB) $(DATAFILESR)
## Files to remove for 'make clean'
CLEANFILES = *~ $(BRK_FILES)
install-udata: install-pkgdata
install-local: build-local install-udata
install-everything: install-files install-dlls
install-files:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(VERSION)/
@for file in $(UDATA_FILES); do \
echo $(INSTALL_DATA) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file; \
$(INSTALL_DATA) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file || exit; \
done
install-dlls:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(VERSION)/
@for file in $(UDATA_DLLS); do \
echo $(INSTALL_DATA) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file; \
$(INSTALL-S) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file || exit; \
done
dist-local:
clean-local:
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
distclean-local: clean-local
$(RMV) Makefile $(SRCDATAFILES) $(DATAFILES) $(TESTDATAD) $(BASETESTDATA) icupkg.inc
# Clean up any old variations..
-@if [ -f @DATABUILDDIR@/icudata_dll.mak ]; then \
(cd pkgdata; ./pkgdata -m dll -p icudata -O @DATABUILDDIR@/icupkg.inc @DATABUILDDIR@/icudata.lst -d @DATABUILDDIR@ --clean ) \
fi
-@if [ -f @DATABUILDDIR@/icudata_common.mak ]; then \
(cd pkgdata; ./pkgdata -m common -p icudata -O @DATABUILDDIR@/icupkg.inc @DATABUILDDIR@/icudata.lst -d @DATABUILDDIR@ --clean ) \
fi
-@$(RMV) @DATABUILDDIR@/icudata.lst @DATABUILDDIR@/icupkg.inc @DATABUILDDIR@/*.o @DATABUILDDIR@/*.c @DATABUILDDIR@/*.mak @DATABUILDDIR@/*.lst
@DATABUILDDIR@/icudata.lst: Makefile
@echo Generating $@ list of data files
@-$(RMV) @DATABUILDDIR@/icudata.lst
@for file in $(DATAFILES); do \
echo `pwd`/$$file >>@DATABUILDDIR@/icudata.lst; \
done;
@DATABUILDDIR@/icupkg.inc: icupkg.inc
cp icupkg.inc @DATABUILDDIR@/icupkg.inc
build-local build-pkgdata: @DATABUILDDIR@/icudata.lst @DATABUILDDIR@/icupkg.inc $(DATAFILES)
(cd pkgdata; ./pkgdata -v -m $(MODE) -p icudata -O @DATABUILDDIR@/icupkg.inc @DATABUILDDIR@/icudata.lst -d @DATABUILDDIR@ )
install-pkgdata: @DATABUILDDIR@/icudata.lst @DATABUILDDIR@/icupkg.inc
(cd pkgdata; ./pkgdata -v -m $(MODE) -p icudata -O @DATABUILDDIR@/icupkg.inc @DATABUILDDIR@/icudata.lst -d @DATABUILDDIR@ -I $(DESTDIR)$(pkgdatadir)/$(VERSION) )
icupkg.inc: $(srcdir)/icupkg.inc.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
clean-pkgdata: @DATABUILDDIR@/icudata.lst @DATABUILDDIR@/icupkg.inc
-(cd pkgdata; ./pkgdata -m $(MODE) -p icudata -O @DATABUILDDIR@/icupkg.inc @DATABUILDDIR@/icudata.lst -d @DATABUILDDIR@ --clean )
-$(RMV) @DATABUILDDIR@/icudata.lst @DATABUILDDIR@/icupkg.inc
check-local:
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status