scuffed-code/icu4c/source/data/Makefile.in
Steven R. Loomis 282bf3d991 ICU-743 moving where data is built and tested
X-SVN-Rev: 3086
2000-12-01 17:20:26 +00:00

125 lines
3.9 KiB
Makefile

#******************************************************************************
#
# Copyright (C) 1998-2000, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
## ICU data directory. This is the directory where the final packaging
## of data goes, + some test data.
##
## Point ICU_DATA to this directory.
##
## Stephen F. Booth
## Steven R. Loomis
## Install directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..
include $(top_builddir)/icudefs.mk
## Build directory information
subdir = data
## Platform-specific setup
include @platform_make_fragment@
## Files to remove for 'make clean'
CLEANFILES = *~ $(SPECIALTESTDATA)
DOCDIRS =
SUBDIRS = build
## Extra files to install [nothing at present]
SPECIALTESTDATA=test1.cnv test3.cnv test4.cnv
TESTDATAOBJDIR=../test/testdata
top_builddir_from_tmp = $(patsubst ..%,../..%,$(top_builddir))
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir_from_tmp)/common:$(top_builddir_from_tmp)/tools/toolutil:$$$(LDLIBRARYPATH_ENVVAR)
CURDIR=$(shell /bin/pwd)
PKGDATA = $(top_builddir_from_tmp)/tools/pkgdata/pkgdata -O $(top_builddir_from_tmp)/tools/pkgdata/icupkg.inc -d $(CURDIR) -m $(PKGDATA_MODE)
## List of phony targets
.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \
install-recursive clean clean-local clean-recursive distclean \
distclean-local distclean-recursive doc dist dist-local dist-recursive \
check check-local check-recursive builddata
## Clear suffix list
.SUFFIXES :
## List of standard targets
all: all-recursive
install: install-recursive
clean: clean-recursive
distclean : distclean-recursive distclean-local
dist: dist-recursive dist-local
check: all 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; \
fi
all-local: packagedata testdata packagetest
dist-local:
cleanfiles:
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
clean-local: cleanpackage cleanfiles
distclean-local: clean-local
$(RMV) Makefile
check-local:
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
packagedata: build/icudata.lst $(top_builddir)/tools/pkgdata/icupkg.inc
( cd build ; $(INVOKE) $(PKGDATA) -s . -T . -p $(ICUDATA_NAME) icudata.lst )
packagetest: $(TESTDATAOBJDIR)/testdata.lst $(top_builddir)/tools/pkgdata/icupkg.inc
( cd $(TESTDATAOBJDIR) ; $(INVOKE) $(PKGDATA) -T . -s . -p testdata testdata.lst )
cleanpackage:
@echo Cleaning up packaged data..
@-( cd build ; $(INVOKE) $(PKGDATA) -s . -T . -p $(ICUDATA_NAME) icudata.lst --clean 2> /dev/null)
@-( cd $(TESTDATAOBJDIR) ; $(INVOKE) $(PKGDATA) -T . -s . -p testdata testdata.lst --clean 2> /dev/null )
$(RMV) $(ICUDATA_NAME).* build/icudata.lst build/*.mak
## Install ICU data. Make a convenience link 'icudata' library if it's a library mode.
install: build/icudata.lst $(top_builddir)/tools/pkgdata/icupkg.inc
$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUDATA_DIR)/$(VERSION)
( cd build ; $(INVOKE) $(PKGDATA) -T . -s . -p $(ICUDATA_NAME) icudata.lst -I $(DESTDIR)$(ICUDATA_DIR)/$(VERSION) )
ifeq ($(strip $(PKGDATA_MODE)),dll)
(cd $(DESTDIR)$(ICUDATA_DIR)/$(VERSION); $(RM) icudata.$(SO) && ln -s $(ICUDATA_NAME).$(SO) icudata.$(SO))
endif
# specials
testdata: $(SPECIALTESTDATA)
%.cnv: build/%.cnv
ln -sf $< .