scuffed-code/icu4c/source/data/Makefile.in
Yves Arrouye bf6882566b ICU-620 another pass at having make clean do a better job.
It is to be noted that this build *is* quite convoluted, and that some files created in one
dir need to be deleted in another one or things break. Ugh. Somebody may clean up that packaging mess someday.

X-SVN-Rev: 7392
2002-01-05 04:57:17 +00:00

155 lines
5.4 KiB
Makefile

#******************************************************************************
#
# Copyright (C) 1998-2001, 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'
ifeq ($(strip $(PKGDATA_MODE)), dll)
CLEANFILES = *~ $(SPECIALTESTDATA) $(LIB_ICUDATA_NAME).$(SO)
else
CLEANFILES = *~ $(SPECIALTESTDATA)
endif
DOCDIRS =
SUBDIRS = build
#lib icu data for link
LIB_ICUDATA_NAME=lib$(ICUDATA_NAME)
## Extra files to install [nothing at present]
SPECIALTESTDATA=test1.cnv test3.cnv test4.cnv testudata_nam.typ
TESTDATAOBJDIR=../test/testdata
top_builddir_from_tmp = $(patsubst ..%,../..%,$(top_builddir))
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir_from_tmp)/common:$(top_builddir_from_tmp)/tools/toolutil:$(top_builddir_from_tmp)/stubdata:$$$(LDLIBRARYPATH_ENVVAR)
CURDIR=$(shell pwd)
PKGDATA = $(top_builddir_from_tmp)/tools/pkgdata/pkgdata -O $(top_builddir_from_tmp)/tools/pkgdata/icupkg.inc -d $(CURDIR)
PKGDATA_VERSIONING = -V $(SO_TARGET_VERSION)
## List of phony targets
.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls install-convrtrstxt \
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 "$(MAKE)[$(MAKELEVEL)]: 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
ifeq ($(OS390DATA),1)
OS390PKG= package390
OS390INSTALL= install390
endif
all-local: packagedata testdata packagetest $(OS390PKG)
dist-local:
cleanfiles:
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
clean-local: cleanpackage cleanfiles
$(RMV) testdata.dat
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) -e $(ICUDATA_BASENAME_VERSION) -s . -T . -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) icudata.lst
packagetest: $(TESTDATAOBJDIR)/testdata.lst $(top_builddir)/tools/pkgdata/icupkg.inc
cd $(TESTDATAOBJDIR) ; $(INVOKE) $(PKGDATA) -T . -s . -p testdata -m common testdata.lst
cleanpackage:
-cd build ; $(INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -s . -T . -p $(ICUDATA_NAME) icudata.lst --clean 2> /dev/null
-cd $(TESTDATAOBJDIR) ; $(INVOKE) $(PKGDATA) -m common -T . -s . -p testdata testdata.lst --clean 2> /dev/null
$(RMV) $(ICUDATA_NAME).* build/icudata.lst build/*.mak $(TESTDATAOBJDIR)/testdata.lst
## Install ICU data. Make a convenience link 'icudata' library if it's a library mode.
install-local: build/icudata.lst $(top_builddir)/tools/pkgdata/icupkg.inc install-convrtrstxt $(OS390INSTALL)
$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR)
cd build ; $(INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_BASENAME_VERSION) -T . -s . -p $(ICUDATA_NAME) icudata.lst -I $(DESTDIR)$(ICUPKGDATA_DIR)
install-convrtrstxt: $(top_srcdir)/../data/convrtrs.txt
$(MKINSTALLDIRS) $(DESTDIR)$(pkgsysconfdir)
$(INSTALL_DATA) $< $(DESTDIR)$(pkgsysconfdir)
# specials
testdata: $(SPECIALTESTDATA)
%.cnv: build/%.cnv
ln -sf $< .
testudata_nam.typ: build/te_IN.res
cp $< $@
####
####
#### 390 support
install390: build/icudata390.lst $(top_builddir)/tools/pkgdata/icupkg.inc
$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir)
cd build ; $(INVOKE) $(PKGDATA) -s . -T ../tmp3901 -p $(ICUDATA_NAME)$(BATCH_STUB_SUFFIX) -e $(ICUDATA_BASENAME_VERSION) icudata390.lst -m dll $(PKGDATA_VERSIONING) -I $(DESTDIR)$(ICUPKGDATA_DIR)
#### $(LIB_ICUDATA_NAME)$(BATCH_SUFFIX) is the subset data for batch mode
package390: build/icudata390.lst build/icudata.lst $(top_builddir)/tools/pkgdata/icupkg.inc
@$(MKINSTALLDIRS) tmp3901
cd build ; $(INVOKE) $(PKGDATA) -s . -T ../tmp3901 -p $(ICUDATA_NAME)$(BATCH_STUB_SUFFIX) -e $(ICUDATA_BASENAME_VERSION) icudata390.lst -m dll
cp $(top_builddir)/data/$(LIB_ICUDATA_NAME)$(BATCH_STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(BATCH_STUB_SUFFIX).$(SO)