ICU-3463 (1) allow command-line environment to override package data mode for icu-config (2) emit correct data dir from --icudatadir and --icudata-install-dir

X-SVN-Rev: 14550
This commit is contained in:
Steven R. Loomis 2004-02-20 01:11:44 +00:00
parent 05611f11f9
commit 2f5b44cbe2
2 changed files with 17 additions and 19 deletions

View file

@ -2,7 +2,7 @@
#******************************************************************************
# Copyright (C) 1999-2003, International Business Machines
# Corporation and others. All Rights Reserved.
# $Revision: 1.36 $
# $Revision: 1.37 $
#******************************************************************************
# This Makefile.inc is designed to be included into projects which make use
# of the ICU.
@ -206,21 +206,33 @@ ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@
# The default data dir changes depending on what packaging mode
# is being used
ifeq ($(strip $(PKGDATA_MODE)),)
#SH# if [ "x$PKGDATA_MODE" = "x" ];
#SH# then
PKGDATA_MODE=@DATA_PACKAGING_MODE@
#SH# fi
endif
#SH# case "$PKGDATA_MODE" in
ifeq ($(PKGDATA_MODE),common)
#SH# common)
ICUDATA_DIR = $(pkgdatadir)
ICUPKGDATA_DIR = $(ICUDATA_DIR)
#SH# ;;
else
ifeq ($(PKGDATA_MODE),dll)
#SH# dll)
ICUDATA_DIR = $(pkgdatadir)
ICUPKGDATA_DIR = $(libdir)
#SH# ;;
else
ICUDATA_DIR = $(pkglibdir)
#SH# *)
ICUDATA_DIR = $(pkgdatadir)
ICUPKGDATA_DIR = $(ICUDATA_DIR)
#SH# ;;
endif
endif
#SH# esac
##################################################################
##################################################################

View file

@ -1,5 +1,5 @@
## -*-sh-*-
## BEGIN of icu-config-bottom. $Revision: 1.9 $
## BEGIN of icu-config-bottom. $Revision: 1.10 $
## Copyright (c) 2002-2003, International Business Machines Corporation and
## others. All Rights Reserved.
@ -289,25 +289,11 @@ do
;;
--icudata-install-dir)
case "$PKGDATA_MODE" in
common)
echo "$pkgdatadir"
;;
dll)
echo "$libdir"
;;
*)
echo "## ${ME} Unknown pkgdata mode $PKGDATA_MODE" 1>&2
exit 4
;;
esac
echo $ICUPKGDATA_DIR
;;
--icudatadir)
echo $pkgdatadir
echo $ICUDATA_DIR
;;
--shlib-c)