2000-01-15 02:00:06 +00:00
#**********************************************************************
2000-08-08 23:20:37 +00:00
#* Copyright (C) 1999-2000, International Business Machines Corporation
2000-01-15 02:00:06 +00:00
#* and others. All Rights Reserved.
#**********************************************************************
1999-12-13 03:43:57 +00:00
# nmake file for creating data files on win32
# invoke with
# nmake /f makedata.mak icup=<path_to_icu_instalation> [Debug|Release]
#
# 12/10/1999 weiv Created
#If no config, we default to debug
! I F "$(CFG)" = = ""
CFG = Debug
! M E S S A G E N o c o n f i g u r a t i o n s p e c i f i e d . D e f a u l t i n g t o c o m m o n - W i n 3 2 D e b u g .
2000-01-08 02:05:05 +00:00
! E N D I F
1999-12-13 03:43:57 +00:00
2000-08-02 04:43:39 +00:00
#Here we test if a valid configuration is given
1999-12-14 16:30:15 +00:00
! I F "$(CFG)" ! = "Release" & & "$(CFG)" ! = "release" & & "$(CFG)" ! = "Debug" & & "$(CFG)" ! = "debug"
1999-12-13 03:43:57 +00:00
! M E S S A G E I n v a l i d c o n f i g u r a t i o n "$(CFG)" s p e c i f i e d .
! M E S S A G E Y o u c a n s p e c i f y a c o n f i g u r a t i o n w h e n r u n n i n g N M A K E
!MESSAGE by defining the macro CFG on the command line. For example :
2000-01-08 02:05:05 +00:00
! M E S S A G E
1999-12-13 03:43:57 +00:00
! M E S S A G E N M A K E / f "makedata.mak" CFG = "Debug"
2000-01-08 02:05:05 +00:00
! M E S S A G E
1999-12-13 03:43:57 +00:00
!MESSAGE Possible choices for configuration are :
2000-01-08 02:05:05 +00:00
! M E S S A G E
1999-12-13 03:43:57 +00:00
! M E S S A G E "Release"
! M E S S A G E "Debug"
2000-01-08 02:05:05 +00:00
! M E S S A G E
1999-12-13 03:43:57 +00:00
! E R R O R A n i n v a l i d c o n f i g u r a t i o n i s s p e c i f i e d .
2000-01-08 02:05:05 +00:00
! E N D I F
1999-12-13 03:43:57 +00:00
2000-08-02 04:43:39 +00:00
#Let's see if user has given us a path to ICU
#This could be found according to the path to makefile, but for now it is this way
! I F "$(ICUP)" = = ""
! E R R O R C a n ' t f i n d p a t h !
! E N D I F
2000-08-08 23:20:37 +00:00
! M E S S A G E i c u p a t h i s $( ICUP )
2000-08-02 04:43:39 +00:00
ICUDATA = $( ICUP) \d ata
TESTDATA = $( ICUP) \s ource\t est\t estdata
#If ICU_DATA is not set, we want to output stuff in binary directory
! I F "$(ICU_DATA)" = = ""
2000-10-25 17:02:52 +00:00
DLL_OUTPUT = $( ICUP) \b in
2000-08-02 04:43:39 +00:00
TESTDATAOUT = $( TESTDATA)
#TESTDATAOUT=$(DLL_OUTPUT)
! M E S S A G E I C U _ D A T A i s n o t s e t ! i c u d a t a . d l l w i l l g o t o $( DLL_OUTPUT )
! E L S E
DLL_OUTPUT = $( ICUDATA)
TESTDATAOUT = $( TESTDATA)
! E N D I F
ICD = $( ICUDATA) ^\
DATA_PATH = $( ICUP) \d ata^\
TEST = ..\s ource\t est\t estdata^\
ICUTOOLS = $( ICUP) \s ource\t ools
2000-07-20 03:32:51 +00:00
# We have to prepare params for pkgdata - to help it find the tools
2000-07-20 01:26:54 +00:00
! I F "$(CFG)" = = "Debug" | | "$(CFG)" = = "debug"
2000-07-19 20:58:13 +00:00
PKGOPT = D:$( ICUP)
! E L S E
PKGOPT = R:$( ICUP)
! E N D I F
1999-12-13 03:43:57 +00:00
# This appears in original Microsofts makefiles
! I F "$(OS)" = = "Windows_NT"
NULL =
2000-01-08 02:05:05 +00:00
! E L S E
1999-12-13 03:43:57 +00:00
NULL = nul
2000-01-08 02:05:05 +00:00
! E N D I F
1999-12-13 03:43:57 +00:00
2000-10-25 17:02:52 +00:00
# Adjust the path to find DLLs. If icudata.dll really needs to be in $(ICUP)\bin\$(CFG),
# then add $(ICUP)\bin\$(CFG) to this path, as the other DLLs are in $(ICUP)\bin.
PATH = $( PATH) ; $( ICUP) \b in
1999-12-15 21:48:10 +00:00
1999-12-13 03:43:57 +00:00
# Suffixes for data files
2000-05-24 20:55:44 +00:00
.SUFFIXES : .ucm .cnv .dll .dat .res .txt .c
1999-12-13 03:43:57 +00:00
2000-01-08 02:05:05 +00:00
# We're including a list of ucm files. There are two lists, one is essential 'ucmfiles.mk' and
1999-12-13 03:43:57 +00:00
# the other is optional 'ucmlocal.mk'
! I F E X I S T S ( "$(ICUTOOLS)\makeconv\ucmfiles.mk" )
! I N C L U D E "$(ICUTOOLS)\makeconv\ucmfiles.mk"
! I F E X I S T S ( "$(ICUTOOLS)\makeconv\ucmlocal.mk" )
! I N C L U D E "$(ICUTOOLS)\makeconv\ucmlocal.mk"
$(UCM_SOURCE) = $( UCM_SOURCE) $( UCM_SOURCE_LOCAL)
2000-01-08 02:05:05 +00:00
! E L S E
1999-12-13 03:43:57 +00:00
#!MESSAGE Warning: cannot find "ucmlocal.mk"
! E N D I F
2000-01-08 02:05:05 +00:00
! E L S E
1999-12-13 03:43:57 +00:00
!ERROR ERROR : cannot find "ucmfiles .mk "
2000-01-08 02:05:05 +00:00
! E N D I F
1999-12-13 03:43:57 +00:00
CNV_FILES = $( UCM_SOURCE:.ucm= .cnv)
# Read list of resource bundle files
! I F E X I S T S ( "$(ICUTOOLS)\genrb\genrbfiles.mk" )
! I N C L U D E "$(ICUTOOLS)\genrb\genrbfiles.mk"
! I F E X I S T S ( "$(ICUTOOLS)\genrb\genrblocal.mk" )
! I N C L U D E "$(ICUTOOLS)\genrb\genrblocal.mk"
GENRB_SOURCE = $( GENRB_SOURCE) $( GENRB_SOURCE_LOCAL)
2000-01-08 02:05:05 +00:00
! E L S E
1999-12-13 03:43:57 +00:00
#!MESSAGE Warning: cannot find "genrblocal.mk"
! E N D I F
2000-01-08 02:05:05 +00:00
! E L S E
1999-12-13 03:43:57 +00:00
!ERROR ERROR : cannot find "genrbfiles .mk "
2000-01-08 02:05:05 +00:00
! E N D I F
2000-08-08 23:20:37 +00:00
RB_FILES = $( GENRB_SOURCE:.txt= .res)
2000-05-15 18:39:17 +00:00
TRANSLIT_FILES = $( TRANSLIT_SOURCE:.txt= .res)
1999-12-13 03:43:57 +00:00
# This target should build all the data files
2000-08-14 23:56:37 +00:00
ALL : GODATA test .dat base_test .dat test_dat .dll base_test_dat .dll base_dat .dll "$( TESTDATAOUT ) \testdata .dll " "$( DLL_OUTPUT ) \icudata .dll " test 1.cnv test 3.cnv test 4.cnv GOBACK #icudata.dat
1999-12-13 03:43:57 +00:00
@echo All targets are up to date
2000-01-08 02:05:05 +00:00
2000-08-08 23:20:37 +00:00
BRK_FILES = " $( ICUDATA) \sent.brk " " $( ICUDATA) \char.brk " " $( ICUDATA) \line.brk " " $( ICUDATA) \word.brk " " $( ICUDATA) \line_th.brk " " $( ICUDATA) \word_th.brk "
2000-05-03 23:08:20 +00:00
2000-07-19 20:58:13 +00:00
#invoke pkgdata
2000-08-08 23:20:37 +00:00
"$(DLL_OUTPUT)\icudata.dll" : $( CNV_FILES ) $( BRK_FILES ) u p r o p s . d a t u n a m e s . d a t c n v a l i a s . d a t t z . d a t $( RB_FILES ) $( TRANSLIT_FILES )
2000-07-19 20:58:13 +00:00
@echo Building icu data
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \pkgdata\$(CFG)\pkgdata " -v -m dll -c -p icudata -O " $( PKGOPT) " -d " $( DLL_OUTPUT) " -s " $( ICUDATA) " <<pkgdatain.txt
2000-07-19 20:58:13 +00:00
u p r o p s . d a t
u n a m e s . d a t
c n v a l i a s . d a t
t z . d a t
2000-05-03 23:08:20 +00:00
$(CNV_FILES : .cnv =.cnv
)
2000-07-19 20:58:13 +00:00
$(RB_FILES : .res =.res
)
$(TRANSLIT_FILES : .res =.res
)
2000-08-08 23:20:37 +00:00
$(BRK_FILES : .brk " =.brk "
2000-07-19 20:58:13 +00:00
)
2000-08-08 23:20:37 +00:00
< < K E E P
2000-05-03 23:08:20 +00:00
2000-08-08 23:20:37 +00:00
"$(TESTDATAOUT)\testdata.dll" : "$(TESTDATA)\root.res" "$(TESTDATA)\te.res" "$(TESTDATA)\te_IN.res" "$(TESTDATA)\testtypes.res"
2000-07-19 20:58:13 +00:00
@echo Building test data
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \pkgdata\$(CFG)\pkgdata " -v -m dll -c -p testdata -O " $( PKGOPT) " -d " $( TESTDATAOUT) " -s " $( TESTDATA) " <<
2000-07-19 20:58:13 +00:00
r o o t . r e s
t e . r e s
t e _ I N . r e s
t e s t t y p e s . r e s
2000-08-08 23:20:37 +00:00
< <
2000-05-15 18:39:17 +00:00
2000-07-20 03:32:51 +00:00
test_dat.dll : test .dat
@echo Building test_dat.dll
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \pkgdata\$(CFG)\pkgdata " -v -m dll -c -p test_dat -O " $( PKGOPT) " -d " $( ICUDATA) " -s " $( ICUDATA) " <<
2000-07-20 03:32:51 +00:00
t e s t . d a t
< <
base_test_dat.dll : test .dat
@echo Building base_test_dat.dll
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \pkgdata\$(CFG)\pkgdata " -v -m dll -c -p base_test_dat -O " $( PKGOPT) " -d " $( ICUDATA) " -s " $( ICUDATA) " <<
2000-07-20 03:32:51 +00:00
t e s t . d a t
< <
base_dat.dll : test .dat
@echo Building base_dat.dll
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \pkgdata\$(CFG)\pkgdata " -v -m dll -c -p base_dat -O " $( PKGOPT) " -d " $( ICUDATA) " -s " $( ICUDATA) " <<
2000-07-20 03:32:51 +00:00
t e s t . d a t
< <
2000-03-03 01:09:33 +00:00
2000-08-08 23:20:37 +00:00
# Targets for test.dat
test.dat :
@echo Creating data file for test: $( ICUDATA) $( ICUP)
2000-03-03 01:09:33 +00:00
@set ICU_DATA = $( ICUDATA)
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \gentest\$(CFG)\gentest "
2000-05-15 18:39:17 +00:00
2000-03-04 00:02:50 +00:00
#Targets for base_test.dat
base_test.dat :
@echo Creating base data file test
@set ICU_DATA = $( ICUDATA)
2000-08-08 23:20:37 +00:00
@copy " $( ICUDATA) \test.dat " " $( ICUDATA) \base_test.dat "
2000-03-03 01:09:33 +00:00
2000-08-08 23:20:37 +00:00
"$(ICUDATA)\sent.brk" : "$(ICUDATA)\sentLE.brk"
copy " $( ICUDATA) \sentLE.brk " " $( ICUDATA) \sent.brk "
2000-01-08 02:05:05 +00:00
2000-08-08 23:20:37 +00:00
"$(ICUDATA)\char.brk" : "$(ICUDATA)\charLE.brk"
copy " $( ICUDATA) \charLE.brk " " $( ICUDATA) \char.brk "
2000-01-08 02:05:05 +00:00
2000-08-08 23:20:37 +00:00
"$(ICUDATA)\line.brk" : "$(ICUDATA)\lineLE.brk"
copy " $( ICUDATA) \lineLE.brk " " $( ICUDATA) \line.brk "
2000-01-08 02:05:05 +00:00
2000-08-08 23:20:37 +00:00
"$(ICUDATA)\word.brk" : "$(ICUDATA)\wordLE.brk"
copy " $( ICUDATA) \wordLE.brk " " $( ICUDATA) \word.brk "
2000-01-08 02:05:05 +00:00
2000-08-08 23:20:37 +00:00
"$(ICUDATA)\line_th.brk" : "$(ICUDATA)\line_thLE.brk"
copy " $( ICUDATA) \line_thLE.brk " " $( ICUDATA) \line_th.brk "
2000-01-08 02:05:05 +00:00
2000-08-08 23:20:37 +00:00
"$(ICUDATA)\word_th.brk" : "$(ICUDATA)\word_thLE.brk"
copy " $( ICUDATA) \word_thLE.brk " " $( ICUDATA) \word_th.brk "
2000-01-08 02:05:05 +00:00
1999-12-13 03:43:57 +00:00
# utility to send us to the right dir
2000-01-08 02:05:05 +00:00
GODATA :
2000-08-08 23:20:37 +00:00
@cd " $( ICUDATA) "
1999-12-13 03:43:57 +00:00
# utility to get us back to the right dir
GOBACK :
2000-08-08 23:20:37 +00:00
@cd " $( ICUTOOLS) "
1999-12-13 03:43:57 +00:00
# This is to remove all the data files
CLEAN :
2000-08-08 23:20:37 +00:00
@cd " $( ICUDATA) "
1999-12-14 16:30:15 +00:00
-@erase "*.cnv"
-@erase "*.res"
-@erase " $( TRANS) *.res "
2000-04-21 19:36:38 +00:00
-@erase "uprops*.*"
1999-12-14 16:30:15 +00:00
-@erase "unames*.*"
-@erase "cnvalias*.*"
-@erase "tz*.*"
-@erase "ibm*_cnv.c"
2000-01-08 02:05:05 +00:00
-@erase "*_brk.c"
1999-12-14 16:30:15 +00:00
-@erase "icudata.*"
-@erase "*.obj"
2000-01-08 02:05:05 +00:00
-@erase "sent.brk"
-@erase "char.brk"
-@erase "line.brk"
-@erase "word.brk"
-@erase "line_th.brk"
-@erase "word_th.brk"
2000-03-03 01:09:33 +00:00
-@erase "test*.*"
2000-03-04 00:02:50 +00:00
-@erase "base*.*"
1999-12-14 16:30:15 +00:00
@cd $( TEST)
-@erase "*.res"
2000-08-08 23:20:37 +00:00
@cd " $( ICUTOOLS) "
1999-12-13 03:43:57 +00:00
# Inference rule for creating resource bundles
2000-05-15 18:39:17 +00:00
.txt.res :
1999-12-22 20:24:20 +00:00
@echo Making Resource Bundle files
2000-08-09 15:38:22 +00:00
" $( ICUTOOLS) \genrb\$(CFG)\genrb " -s$( @D) -d$( @D) $( ?F)
1999-12-13 03:43:57 +00:00
# Inference rule for creating converters, with a kludge to create
# c versions of converters at the same time
.ucm.cnv ::
@echo Generating converters and c source files
2000-08-08 23:20:37 +00:00
@cd " $( ICUDATA) "
2000-01-21 02:15:42 +00:00
@set ICU_DATA = $( ICUDATA)
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \makeconv\$(CFG)\makeconv " $<
1999-12-13 03:43:57 +00:00
2000-08-14 23:56:37 +00:00
# Targets for test converter data
test1.cnv : "$( TESTDATA ) \test 1.ucm "
@cd " $( ICUDATA) "
@set ICU_DATA = $( ICUDATA)
@" $( ICUTOOLS) \makeconv\$(CFG)\makeconv " $* *
test3.cnv : "$( TESTDATA ) \test 3.ucm "
@cd " $( ICUDATA) "
@set ICU_DATA = $( ICUDATA)
@" $( ICUTOOLS) \makeconv\$(CFG)\makeconv " $* *
test4.cnv : "$( TESTDATA ) \test 4.ucm "
@cd " $( ICUDATA) "
@set ICU_DATA = $( ICUDATA)
@" $( ICUTOOLS) \makeconv\$(CFG)\makeconv " $* *
2000-04-21 19:36:38 +00:00
# Targets for uprops.dat
2000-08-08 23:20:37 +00:00
uprops.dat : unidata \UnicodeData .txt unidata \Mirror .txt "$( ICUTOOLS ) \genprops \$( CFG ) \genprops .exe "
2000-04-21 19:36:38 +00:00
@echo Creating data file for Unicode Character Properties
@set ICU_DATA = $( ICUDATA)
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \genprops\$(CFG)\genprops " -s " $( ICUDATA) \unidata "
2000-04-21 19:36:38 +00:00
1999-12-13 03:43:57 +00:00
# Targets for unames.dat
2000-08-08 23:20:37 +00:00
unames.dat : unidata \UnicodeData .txt "$( ICUTOOLS ) \gennames \$( CFG ) \gennames .exe "
1999-12-22 20:24:20 +00:00
@echo Creating data file for Unicode Names
2000-01-21 02:15:42 +00:00
@set ICU_DATA = $( ICUDATA)
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \gennames\$(CFG)\gennames " unidata\U nicodeData.txt
1999-12-13 03:43:57 +00:00
# Targets for converters
2000-08-08 23:20:37 +00:00
cnvalias.dat : convrtrs .txt "$( ICUTOOLS ) \gencnval \$( CFG ) \gencnval .exe "
1999-12-22 20:24:20 +00:00
@echo Creating data file for Converter Aliases
2000-01-21 02:15:42 +00:00
@set ICU_DATA = $( ICUDATA)
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \gencnval\$(CFG)\gencnval "
2000-01-08 02:05:05 +00:00
1999-12-13 03:43:57 +00:00
# Targets for tz
2000-08-08 23:20:37 +00:00
tz.dat : {"$( ICUTOOLS ) \gentz "}tz .txt {"$( ICUTOOLS ) \gentz \$( CFG ) "}gentz .exe
1999-12-22 20:24:20 +00:00
@echo Creating data file for Timezones
2000-01-21 02:15:42 +00:00
@set ICU_DATA = $( ICUDATA)
2000-08-08 23:20:37 +00:00
@" $( ICUTOOLS) \gentz\$(CFG)\gentz " " $( ICUTOOLS) \gentz\tz.txt "
1999-12-13 03:43:57 +00:00
1999-12-15 21:48:10 +00:00
# Dependencies on the tools
2000-08-08 23:20:37 +00:00
convrtrs.txt : {"$( ICUTOOLS ) \gencnval \$( CFG ) "}gencnval .exe
1999-12-15 21:48:10 +00:00
2000-08-08 23:20:37 +00:00
tz.txt : {"$( ICUTOOLS ) \gentz \$( CFG ) "}gentz .exe
1999-12-15 21:48:10 +00:00
2000-08-08 23:20:37 +00:00
uprops.dat unames.dat cnvalias.dat tz.dat : {"$( ICUTOOLS ) \genccode \$( CFG ) "}genccode .exe
1999-12-15 21:48:10 +00:00
2000-08-08 23:20:37 +00:00
$(GENRB_SOURCE) : {"$( ICUTOOLS ) \genrb \$( CFG ) "}genrb .exe
1999-12-15 21:48:10 +00:00
2000-08-08 23:20:37 +00:00
$(UCM_SOURCE) : {"$( ICUTOOLS ) \makeconv \$( CFG ) "}makeconv .exe {"$( ICUTOOLS ) \genccode \$( CFG ) "}genccode .exe
2000-03-03 01:09:33 +00:00
2000-08-08 23:20:37 +00:00
test.dat : {"$( ICUTOOLS ) \gentest \$( CFG ) "}gentest .exe
2000-03-03 01:09:33 +00:00