scuffed-code/icu4c/source/tools/Makefile.in
Steven R. Loomis ab4ac6063a ICU-212 out-of-source build
X-SVN-Rev: 753
2000-02-12 05:54:43 +00:00

236 lines
5.8 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@
ICUDATADIR=$(pkgdatadir)/$(VERSION)
SRCDATADIR=$(top_srcdir)/../data
OBJDATADIR=$(top_builddir)/data
## Build directory information
top_builddir = ..
subdir = tools
## 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 gencol rbdump \
genccode gennames gencmn gencnval gentz
## 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
## Clear suffix list
.SUFFIXES :
## List of standard targets
all: all-recursive all-local
install: install-recursive install-local
clean: clean-recursive clean-local
distclean : distclean-recursive distclean-local
dist: dist-recursive dist-local
check: check-recursive check-local
## 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=unames.dat cnvalias.dat tz.dat
BRK_FILES=char.brk line.brk line_th.brk sent.brk word.brk word_th.brk
DATAFILESD=$(DAT_FILES:%=$(OBJDATADIR)/%)
DATAFILESB=$(BRK_FILES:%=$(OBJDATADIR)/%)
# copy the right endianness
ifeq (@U_IS_BIG_ENDIAN@,1)
%.brk: $(SRCDATADIR)/%BE.brk
cp $< $@
else
%.brk: $(SRCDATADIR)/%LE.brk
cp $< $@
endif
include $(srcdir)/makeconv/ucmfiles.mk
-include $(srcdir)/makeconv/ucmlocal.mk
ALL_UCM_SOURCE= $(UCM_SOURCE) $(UCM_SOURCE_LOCAL)
UCM_FILES = $(ALL_UCM_SOURCE:%=$(top_srcdir)/../data/%)
CNV_FILES = $(UCM_FILES:$(top_srcdir)/../data/%.ucm=$(OBJDATADIR)/%.cnv)
DATAFILESC=$(CNV_FILES)
DATAFILES=$(DATAFILESD) $(DATAFILESC) $(DATAFILESB)
SRCDATAFILESD=$(DATAFILESD:.dat=_dat.c)
SRCDATAFILESC=$(DATAFILESC:%.cnv=%_cnv.c)
SRCDATAFILESB=$(DATAFILESB:%.brk=%_brk.c)
SRCDATAFILES=$(SRCDATAFILESD) $(SRCDATAFILESC) $(SRCDATAFILESB)
OBJDATAFILES=$(SRCDATAFILES:%.c=%.o)
COMMONFILE=$(OBJDATADIR)/icudata.dat
COMMONDLL=$(OBJDATADIR)/libicudata.$(SO)
# the files to be installed -- the COMMON ones + any stragglers
UDATA_FILES=icudata.dat
UDATA_DLLS=libicudata.$(SO)
### use the "--enable-mapped=" option to configure, to get mapped file behavior.
# the case where '--enable-mapped=yes'
@USE_MAPPED_TRUE@build-local: build-data build-cmnfile
# the case where '--enable-mapped=no' (DEFAULT)
@USE_MAPPED_FALSE@build-local: build-data build-dll
###
# check for any other generated data here
install-data: $(DATAFILES)
build-cmnfile: $(COMMONFILE)
# the -Wpath [etc] has relative DLL paths in it
# so we have to cd into the other dir..
gencmn/mkmap.tmp: Makefile
$(COMMONFILE): $(DATAFILES)
@-rm -f gencmn/mkmap.tmp
@for file in $(DATAFILES); do \
echo `pwd`/$$file >> gencmn/mkmap.tmp; \
done;
@echo -n Generating common file $(COMMONFILE). Number of files:
-@wc -l gencmn/mkmap.tmp
-rm -f $(COMMONFILE)
@(cd gencmn ; ICU_DATA=$(OBJDATADIR) ./gencmn 1000000 mkmap.tmp )
-@ls -l $(COMMONFILE)
build-dll: $(COMMONDLL)
%_dat.c: %.dat
(cd genccode ; ./genccode ../$< )
%_cnv.c: %.cnv
(cd genccode ; ./genccode ../$< )
%_brk.c: %.brk
(cd genccode ; ./genccode ../$< )
# strip is optional
# -$(STRIP) $@
$(COMMONDLL): $(OBJDATAFILES)
$(SHLIB.c) -o $@ $^
-ls -l $@
srcs: $(SRCDATAFILES)
## Files to remove for 'make clean'
CLEANFILES = *~ $(BRK_FILES)
### use the "--enable-mapped=" option to configure, to get mapped file behavior.
# the case where '--enable-mapped=yes' - raw files [which can be mapped]
@USE_MAPPED_TRUE@install-udata: install-files
# the case where '--enable-mapped=no' (DEFAULT) - DLL's [so's to you]
@USE_MAPPED_FALSE@install-udata: install-dlls
###
install-local: build-local install-udata
install-everything: install-files install-dlls
install-files:
@for file in $(UDATA_FILES); do \
echo $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \
$(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \
done
install-dlls:
@for file in $(UDATA_DLLS); do \
echo $(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \
$(INSTALL_DATA) $(top_builddir)/data/$$file $(pkgdatadir)/$(VERSION)/$$file; \
done
dist-local:
clean-local:
test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-local:
rm -f Makefile
check-local:
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status