ICU-6098 update to versioning and urename
X-SVN-Rev: 23948
This commit is contained in:
parent
d351db9e12
commit
297a478ee0
3
.gitignore
vendored
3
.gitignore
vendored
@ -543,6 +543,9 @@ icu4c/source/tools/genrb/genrb.[0-9]
|
||||
icu4c/source/tools/genrb/genrb.vcproj.*.*.user
|
||||
icu4c/source/tools/genrb/release
|
||||
icu4c/source/tools/genrb/temp
|
||||
icu4c/source/tools/genren/ICUunrenamed
|
||||
icu4c/source/tools/genren/Makefile.local
|
||||
icu4c/source/tools/genren/urename.*
|
||||
icu4c/source/tools/gensprep/*.8
|
||||
icu4c/source/tools/gensprep/*.d
|
||||
icu4c/source/tools/gensprep/*.o
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -163,7 +163,7 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
|
||||
# define U_ICU_NAMESPACE icu
|
||||
namespace U_ICU_NAMESPACE { }
|
||||
# else
|
||||
# define U_ICU_NAMESPACE icu_3_9
|
||||
# define U_ICU_NAMESPACE icu_4_0
|
||||
namespace U_ICU_NAMESPACE { }
|
||||
namespace icu = U_ICU_NAMESPACE;
|
||||
# endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
## -*-makefile-*-
|
||||
## Darwin-specific setup (Darwin is the Mac OS X developer preview, successor
|
||||
## to Rhapsody, aka Mac OS X Server)
|
||||
## Copyright (c) 1999-2007 International Business Machines Corporation and
|
||||
## Copyright (c) 1999-2008 International Business Machines Corporation and
|
||||
## others. All Rights Reserved.
|
||||
|
||||
## Flags for position independent code
|
||||
@ -84,4 +84,7 @@ MIDDLE_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO)
|
||||
# tzcode option
|
||||
TZORIG_EXTRA_CFLAGS=-DSTD_INSPIRED
|
||||
|
||||
# genren opts
|
||||
GENREN_PL_OPTS=-x Mach-O -n '-g' -p '| c++filt'
|
||||
|
||||
## End Darwin-specific setup
|
||||
|
@ -1,13 +1,19 @@
|
||||
#******************************************************************************
|
||||
#
|
||||
# Copyright (C) 2002-2007, International Business Machines
|
||||
# Copyright (C) 2002-2008, International Business Machines
|
||||
# Corporation and others. All Rights Reserved.
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
ICUDIR=ICUunrenamed
|
||||
TOP=../..
|
||||
SO=so
|
||||
srcdir = .
|
||||
top_srcdir = $(TOP)
|
||||
|
||||
top_builddir = $(TOP)
|
||||
|
||||
-include $(TOP)/icudefs.mk
|
||||
ICUDIR=ICUunrenamed
|
||||
#SO=so
|
||||
|
||||
COM=$(ICUDIR)/lib/libicuuc.$(SO)
|
||||
I18=$(ICUDIR)/lib/libicui18n.$(SO)
|
||||
@ -22,7 +28,7 @@ LIBS=$(COM) $(I18) $(LAY) $(LEX) $(UIO)
|
||||
# This is important because ELF (Linux) based platforms that don't hide internal
|
||||
# API will allow a duplicate internal name to resolve to an external library.
|
||||
# See the gcc manual on the "visibility" attribute for details.
|
||||
FLAG_OVERRIDE="LIBCFLAGS= LIBCXXFLAGS="
|
||||
FLAG_OVERRIDE= LIBCFLAGS= LIBCXXFLAGS= $(EXTRA_MAKE_OPTIONS)
|
||||
|
||||
all:
|
||||
@cat README
|
||||
@ -37,30 +43,33 @@ $(ICUDIR)/config.status:
|
||||
-(rm -rf $(ICUDIR)old &)
|
||||
mkdir $(ICUDIR)
|
||||
( cd $(ICUDIR) ; CPPFLAGS=-DURENAME_H $(TOP)/../configure --with-data-packaging=archive --enable-tests=no --prefix=`pwd` $(GENREN_CONFIGURE_OPTS) )
|
||||
# cause lib and bin to be created, and any other general sanity
|
||||
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) clean
|
||||
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) all-local
|
||||
|
||||
# build the libraries
|
||||
$(DAT): $(ICUDIR)/config.status Makefile
|
||||
gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/stubdata libicudata.$(SO)
|
||||
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/stubdata all-local
|
||||
|
||||
$(COM): $(DAT) $(ICUDIR)/config.status Makefile
|
||||
gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/common libicuuc.$(SO)
|
||||
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/common all-local
|
||||
|
||||
$(I18): $(DAT) $(COM) $(ICUDIR)/config.status Makefile
|
||||
gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/i18n libicui18n.$(SO)
|
||||
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/i18n all-local
|
||||
|
||||
$(LAY): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile
|
||||
gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/layout libicule.$(SO)
|
||||
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/layout all-local
|
||||
|
||||
$(LEX): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile
|
||||
gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/layoutex libiculx.$(SO)
|
||||
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/layoutex all-local
|
||||
|
||||
$(UIO): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile
|
||||
gmake $(FLAG_OVERRIDE) -C $(ICUDIR)/io libicuio.$(SO)
|
||||
$(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/io all-local
|
||||
|
||||
# the header itself
|
||||
urename.h: $(LIBS) genren.pl
|
||||
-cp urename.h urename.h.old
|
||||
perl ./genren.pl $(LIBS)
|
||||
perl ./genren.pl $(GENREN_PL_OPTS) $(LIBS)
|
||||
|
||||
sorts: urename.sort urename.old.sort
|
||||
@echo "*** Please check urename.h manually before committing it."
|
||||
@ -76,4 +85,5 @@ install-header: urename.h sorts
|
||||
cp $(TOP)/common/unicode/urename.h $(TOP)/common/unicode/urename.h.old
|
||||
cp urename.h $(TOP)/common/unicode/
|
||||
|
||||
-include Makefile.local
|
||||
|
||||
|
@ -20,6 +20,11 @@ $headername = 'urename.h';
|
||||
|
||||
$path = substr($0, 0, rindex($0, "/")+1)."../../common/unicode/uversion.h";
|
||||
|
||||
$nmopts = '-Cg -f s';
|
||||
$post = '';
|
||||
|
||||
$mode = 'LINUX';
|
||||
|
||||
(-e $path) || die "Cannot find uversion.h";
|
||||
|
||||
open(UVERSION, $path);
|
||||
@ -38,6 +43,9 @@ while($ARGV[0] =~ /^-/) { # detects whether there are any arguments
|
||||
/^-v/ && ($VERBOSE++, next); # verbose
|
||||
/^-h/ && (&printHelpMsgAndExit, next); # help
|
||||
/^-o/ && (($headername = shift (@ARGV)), next); # output file
|
||||
/^-n/ && (($nmopts = shift (@ARGV)), next); # nm opts
|
||||
/^-p/ && (($post = shift (@ARGV)), next); # nm opts
|
||||
/^-x/ && (($mode = shift (@ARGV)), next); # nm opts
|
||||
/^-S/ && (($U_ICU_VERSION_SUFFIX = shift(@ARGV)), next); # pick the suffix
|
||||
warn("Invalid option $_\n");
|
||||
&printHelpMsgAndExit;
|
||||
@ -89,15 +97,28 @@ print HEADER <<"EndOfHeaderComment";
|
||||
EndOfHeaderComment
|
||||
|
||||
for(;@ARGV; shift(@ARGV)) {
|
||||
@NMRESULT = `nm -Cg -f s $ARGV[0]`;
|
||||
@NMRESULT = `nm $nmopts $ARGV[0] $post`;
|
||||
if($?) {
|
||||
warn "Couldn't do 'nm' for $ARGV[0], continuing...\n";
|
||||
next; # Couldn't do nm for the file
|
||||
}
|
||||
splice @NMRESULT, 0, 6;
|
||||
|
||||
if($mode =~ /POSIX/) {
|
||||
splice @NMRESULT, 0, 6;
|
||||
} elsif ($mode =~ /Mach-O/) {
|
||||
# splice @NMRESULT, 0, 10;
|
||||
}
|
||||
foreach (@NMRESULT) { # Process every line of result and stuff it in $_
|
||||
($_, $address, $type) = split(/\|/);
|
||||
if($mode =~ /POSIX/) {
|
||||
($_, $address, $type) = split(/\|/);
|
||||
} elsif ($mode =~ /Mach-O/) {
|
||||
if(/^(?:[0-9a-fA-F]){8} ([A-Z]) (?:_)?(.*)$/) {
|
||||
($_, $type) = ($2, $1);
|
||||
} else {
|
||||
next;
|
||||
}
|
||||
} else {
|
||||
die "Unknown mode $mode";
|
||||
}
|
||||
&verbose( "type: \"$type\" ");
|
||||
if(!($type =~ /[UAwW?]/)) {
|
||||
if(/@@/) { # These would be imports
|
||||
@ -112,11 +133,19 @@ for(;@ARGV; shift(@ARGV)) {
|
||||
}
|
||||
## ures_getUnicodeStringByIndex(UResourceBundle -> ures_getUnicodeStringByIndex
|
||||
@CppName = split(/\(/, $CppName[0]); ## remove function args
|
||||
$CppClasses{$CppName[0]}++;
|
||||
if($CppName[0] =~ /^operator/) {
|
||||
&verbose ("Skipping C++ function: $_\n");
|
||||
} elsif($CppName[0] =~ /^~/) {
|
||||
&verbose ("Skipping C++ destructor: $_\n");
|
||||
} else {
|
||||
$CppClasses{$CppName[0]}++;
|
||||
}
|
||||
} elsif ( /\(/) { # These are strange functions
|
||||
print STDERR "$_\n";
|
||||
} elsif ( /icu_/) {
|
||||
print STDERR "Skipped strange mangled function $_\n";
|
||||
} elsif ( /operator\+/ ) {
|
||||
print STDERR "Skipped ignored function $_\n";
|
||||
} else { # This is regular C function
|
||||
&verbose( "C func: $_\n");
|
||||
@funcname = split(/[\(\s+]/);
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Makefile.in for ICU - tools/gentest
|
||||
## Copyright (c) 1999-2007, International Business Machines Corporation and
|
||||
## Copyright (c) 1999-2008, International Business Machines Corporation and
|
||||
## others. All Rights Reserved.
|
||||
## Madhu Katragadda
|
||||
|
||||
@ -21,9 +21,10 @@ CLEANFILES = *~ $(DEPS)
|
||||
TARGET = gentest$(EXEEXT)
|
||||
|
||||
ifneq ($(top_builddir),$(top_srcdir))
|
||||
CPPFLAGS += -I$(top_builddir)/common
|
||||
CPPFLAGS += -I$(top_builddir)/common
|
||||
endif
|
||||
CPPFLAGS += -I$(top_srcdir)/common -I$(srcdir)/../toolutil -I$(top_srcdir)/tools/ctestfw
|
||||
CPPFLAGS+= -I$(top_srcdir)/i18n
|
||||
LIBS = $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
|
||||
|
||||
OBJECTS = gentest.o genres32.o
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1999-2007, International Business Machines
|
||||
* Copyright (C) 1999-2008, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
@ -23,6 +23,7 @@
|
||||
#include "unicode/uclean.h"
|
||||
#include "unicode/udata.h"
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "unicode/ucal.h"
|
||||
#include "unewdata.h"
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
@ -137,11 +138,22 @@ createData(const char* outputDirectory, UErrorCode *errorCode) {
|
||||
|
||||
/* Create Java file ----------------------------------------------------- */
|
||||
|
||||
int getCurrentYear() {
|
||||
UErrorCode status=U_ZERO_ERROR;
|
||||
int year = 0;
|
||||
UCalendar *cal = ucal_open(NULL, -1, NULL, UCAL_TRADITIONAL, &status);
|
||||
ucal_setMillis(cal, ucal_getNow(), &status);
|
||||
year = ucal_get(cal, UCAL_YEAR, &status);
|
||||
ucal_close(cal);
|
||||
return year;
|
||||
}
|
||||
|
||||
static int
|
||||
outputJavaStuff(const char* progname, const char *outputDir) {
|
||||
int32_t i,t,count;
|
||||
char file[512];
|
||||
FILE *out;
|
||||
int year = getCurrentYear();
|
||||
|
||||
uprv_strcpy(file,outputDir);
|
||||
if(*outputDir && /* don't put a trailing slash if outputDir is empty */
|
||||
@ -158,7 +170,7 @@ outputJavaStuff(const char* progname, const char *outputDir) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
fprintf(out, "/** Copyright (C) 2007, International Business Machines Corporation and Others. All Rights Reserved. **/\n\n");
|
||||
fprintf(out, "/** Copyright (C) %d, International Business Machines Corporation and Others. All Rights Reserved. **/\n\n", year);
|
||||
fprintf(out, "/* NOTE: this file is AUTOMATICALLY GENERATED by gentest. */\n\n");
|
||||
fprintf(out, "package com.ibm.icu.dev.test.util;\n\n");
|
||||
fprintf(out, "public class DebugUtilitiesData extends Object {\n");
|
||||
|
Loading…
Reference in New Issue
Block a user