~ubuntu-branches/ubuntu/gutsy/icu/gutsy-updates

« back to all changes in this revision

Viewing changes to source/extra/uconv/makedata.mak

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2005-11-19 11:29:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20051119112931-vcizkrp10tli4enw
Tags: 3.4-3
Explicitly build with g++ 3.4.  The current ICU fails its test suite
with 4.0 but not with 3.4.  Future versions should work properly with
4.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#**********************************************************************
2
 
#* Copyright (C) 1999-2000, International Business Machines Corporation
3
 
#* and others.  All Rights Reserved.
4
 
#**********************************************************************
5
 
# nmake file for creating data files on win32
6
 
# invoke with
7
 
# nmake /f makedata.mak icup=<path_to_icu_instalation> [Debug|Release]
8
 
#
9
 
#       12/10/1999      weiv    Created
10
 
 
11
 
#If no config, we default to debug
12
 
!IF "$(CFG)" == ""
13
 
CFG=Debug
14
 
!MESSAGE No configuration specified. Defaulting to common - Win32 Debug.
15
 
!ENDIF
16
 
 
17
 
#Here we test if a valid configuration is given
18
 
!IF "$(CFG)" != "Release" && "$(CFG)" != "release" && "$(CFG)" != "Debug" && "$(CFG)" != "debug"
19
 
!MESSAGE Invalid configuration "$(CFG)" specified.
20
 
!MESSAGE You can specify a configuration when running NMAKE
21
 
!MESSAGE by defining the macro CFG on the command line. For example:
22
 
!MESSAGE
23
 
!MESSAGE NMAKE /f "makedata.mak" CFG="Debug"
24
 
!MESSAGE
25
 
!MESSAGE Possible choices for configuration are:
26
 
!MESSAGE
27
 
!MESSAGE "Release"
28
 
!MESSAGE "Debug"
29
 
!MESSAGE
30
 
!ERROR An invalid configuration is specified.
31
 
!ENDIF
32
 
 
33
 
#Let's see if user has given us a path to ICU
34
 
#This could be found according to the path to makefile, but for now it is this way
35
 
!IF "$(ICUP)"==""
36
 
!ERROR Can't find path!
37
 
!ENDIF
38
 
!MESSAGE ICU path is $(ICUP)
39
 
RESNAME=uconvmsg
40
 
RESDIR=.  #$(ICUP)\..\icuapps\uconv\$(RESNAME)
41
 
RESFILES=resfiles.mk
42
 
ICUDATA=$(ICUP)\data
43
 
 
44
 
DLL_OUTPUT=.\$(CFG)
45
 
# set the following to 'static' or 'dll' depending
46
 
PKGMODE=static
47
 
 
48
 
 
49
 
ICD=$(ICUDATA)^\
50
 
DATA_PATH=$(ICUP)\data^\
51
 
ICUTOOLS=$(ICUP)\bin
52
 
 
53
 
# We have to prepare params for pkgdata - to help it find the tools
54
 
!IF "$(CFG)" == "Debug" || "$(CFG)" == "debug"
55
 
PKGOPT=D:$(ICUP)
56
 
!ELSE
57
 
PKGOPT=R:$(ICUP)
58
 
!ENDIF
59
 
 
60
 
# This appears in original Microsofts makefiles
61
 
!IF "$(OS)" == "Windows_NT"
62
 
NULL=
63
 
!ELSE
64
 
NULL=nul
65
 
!ENDIF
66
 
 
67
 
PATH = $(PATH);$(ICUP)\bin
68
 
 
69
 
# Suffixes for data files
70
 
.SUFFIXES : .ucm .cnv .dll .dat .res .txt .c
71
 
 
72
 
# We're including a list of resource files.
73
 
FILESEPCHAR=\\
74
 
 
75
 
!IF EXISTS("$(RESFILES)")
76
 
!INCLUDE "$(RESFILES)"
77
 
!ELSE
78
 
!ERROR ERROR: cannot find "$(RESFILES)"
79
 
!ENDIF
80
 
RB_FILES = $(RESSRC:.txt=.res)
81
 
 
82
 
# This target should build all the data files
83
 
!IF "$(PKGMODE)" == "dll"
84
 
OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).dll"
85
 
!ELSE
86
 
OUTPUT = "$(DLL_OUTPUT)\$(RESNAME).lib"
87
 
!ENDIF
88
 
 
89
 
ALL : GODATA  $(OUTPUT) GOBACK #$(RESNAME).dat
90
 
        @echo All targets are up to date (mode $(PKGMODE))
91
 
 
92
 
 
93
 
# invoke pkgdata - static
94
 
"$(DLL_OUTPUT)\$(RESNAME).lib" :  $(RB_FILES) $(RESFILES)
95
 
        @echo Building $(RESNAME).lib
96
 
        @"$(ICUTOOLS)\pkgdata" -v -m static -c -p $(RESNAME) -O "$(PKGOPT)" -d "$(DLL_OUTPUT)" -s "$(RESDIR)" <<pkgdatain.txt
97
 
$(RB_FILES:.res =.res
98
 
)
99
 
<<KEEP
100
 
 
101
 
# utility to send us to the right dir
102
 
GODATA :
103
 
#       cd "$(RESDIR)"
104
 
 
105
 
# utility to get us back to the right dir
106
 
GOBACK :
107
 
#       cd "$(RESDIR)\.."
108
 
 
109
 
# This is to remove all the data files
110
 
CLEAN :
111
 
        @cd "$(RESDIR)"
112
 
        -@erase "*.res"
113
 
        -@erase "uconvmsg*.*"
114
 
        -@erase "*.obj"
115
 
        -@erase "base*.*"
116
 
        @cd "$(ICUTOOLS)"
117
 
    -@erase "$(RB_FILES)"
118
 
    -@"$(ICUTOOLS)\pkgdata" --clean -v -m static -c -p $(RESNAME) -O "$(PKGOPT)" -d "$(DLL_OUTPUT)" -s "$(RESDIR)" pkgdatain.txt
119
 
 
120
 
# Inference rule for creating resource bundles
121
 
.txt.res:
122
 
        @echo Making Resource Bundle files
123
 
        "$(ICUTOOLS)\genrb" -s $(@D) -d $(@D) $(?F)
124
 
 
125
 
 
126
 
$(RESSRC) : {"$(ICUTOOLS)"}genrb.exe