ICU-8712 add instructions for building

X-SVN-Rev: 32929
This commit is contained in:
Steven R. Loomis 2012-12-06 05:25:15 +00:00
parent 8bb1a61c47
commit b08e77f290
3 changed files with 22 additions and 11 deletions

View File

@ -1,5 +1,5 @@
## Makefile.in for ICU - test/testmap
## Copyright (c) 2003-2011, International Business Machines Corporation and
## Copyright (c) 2003-2012, International Business Machines Corporation and
## others. All Rights Reserved.
## Source directory information
@ -20,7 +20,7 @@ CLEANFILES = *~ $(DEPS)
TARGET = testmap$(EXEEXT)
#DEFS = @DEFS@
CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n
CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)
#CFLAGS += @CFLAGS@
#CXXFLAGS = @CXXFLAGS@
@ -66,7 +66,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(TARGET) : $(OBJECTS)
$(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
$(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) $(CFLAGS) $(SHAREDLIBCFLAGS)
$(POST_BUILD_STEP)
ifeq (,$(MAKECMDGOALS))

View File

@ -0,0 +1,10 @@
# Copyright (C) 2012 IBM Corporation and Others. All Rights Reserved.
This test may be tested on a linux machine like so:
$ env XTRA_OPTS='-fPIC' icurun -i /path/to/icu-build testmap.c
Where /path/to/icu-build is the path to an ICU build dir
And where icurun is from : http://source.icu-project.org/repos/icu/tools/trunk/scripts/icurun

View File

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1998-2010, International Business Machines Corporation
* Copyright (C) 1998-2012, International Business Machines Corporation
* and others. All Rights Reserved.
**********************************************************************
*
@ -18,8 +18,9 @@
#include <string.h>
#include "unicode/udata.h"
#include "unicode/ucnv.h"
#include "ucmndata.h"
extern const char U_IMPORT U_ICUDATA_ENTRY_POINT [];
extern const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT;
int
main(int argc,
@ -37,8 +38,8 @@ main(int argc,
}
status = U_ZERO_ERROR;
udata_setCommonData(U_ICUDATA_ENTRY_POINT, &status);
printf("setCommonData(%p) -> %s\n", U_ICUDATA_ENTRY_POINT, u_errorName(status));
udata_setCommonData(&U_ICUDATA_ENTRY_POINT, &status);
printf("setCommonData(%p) -> %s\n", (void*)&U_ICUDATA_ENTRY_POINT, u_errorName(status));
if(U_FAILURE(status))
{
printf("*** FAIL: should have returned U_ZERO_ERROR\n");
@ -46,8 +47,8 @@ main(int argc,
}
status = U_ZERO_ERROR;
c = ucnv_open("iso-8859-7", &status);
printf("ucnv_open(iso-8859-7)-> %p, err = %s, name=%s\n",
c = ucnv_open("iso-8859-3", &status);
printf("ucnv_open(iso-8859-3)-> %p, err = %s, name=%s\n",
(void *)c, u_errorName(status), (!c)?"?":ucnv_getName(c,&status) );
if(status != U_ZERO_ERROR)
{
@ -60,8 +61,8 @@ main(int argc,
}
status = U_ZERO_ERROR;
udata_setCommonData(U_ICUDATA_ENTRY_POINT, &status);
printf("setCommonData(%p) -> %s [should pass]\n", U_ICUDATA_ENTRY_POINT, u_errorName(status));
udata_setCommonData(&U_ICUDATA_ENTRY_POINT, &status);
printf("setCommonData(%p) -> %s [should pass]\n", (void*) &U_ICUDATA_ENTRY_POINT, u_errorName(status));
if (U_FAILURE(status) || status == U_USING_DEFAULT_WARNING )
{
printf("\n*** FAIL: should pass and not set U_USING_DEFAULT_ERROR\n");