summaryrefslogtreecommitdiffstats
path: root/base/migrate/42SP2ToTxt/src/compile.bat
blob: 5b6c11566507a63aa6bee79b5dae15f4172fffcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
@ECHO OFF
REM  --- BEGIN COPYRIGHT BLOCK ---
REM  Copyright (C) 2007 Red Hat, Inc.
REM  All rights reserved.
REM  --- END COPYRIGHT BLOCK ---

REM
REM  This script creates the "42SP2ToTxt/classes/Main.class" and
REM  "42SP2ToTxt/classes/CMS42SP2LdifParser.class" which are
REM  used to create a normalized CMS 4.2 (SP 2) ldif text file.
REM


SETLOCAL


REM
REM  Set SERVER_ROOT - identify the CMS <server_root> used to compile 42SP2ToTxt
REM

REM SET SERVER_ROOT=C:\cms43


REM
REM  Set JDK_VERSION - specify the JDK version used by this version of CMS
REM
REM                    CMS 4.2 (SP 2) NOTE:          "WINNT" - 1.3.0
REM
REM                    CMS 4.2 (SP 2) CONSOLE NOTE:  "WINNT" - 1.1.7A
REM

REM SET JDK_VERSION=CMS_4.3


REM 
REM  Set JAVA_HOME - specify the complete path to the JDK
REM 
REM                  example:  \\bermuda.redhat.com\sbc mounted as Y:
REM 

REM SET JAVA_HOME=Y:\cms_jdk\WINNT\%JDK_VERSION%


REM
REM             *** DON'T CHANGE ANYTHING BELOW THIS LINE ***
REM


REM
REM  Script-defined constants
REM

SET CMS="CMS 4.2 (SP 2)"


REM
REM  Perform a usage check for the appropriate number of arguments:
REM

IF "%1" == "" GOTO CHECK_ENVIRONMENT_VARIABLES


:USAGE
ECHO.
ECHO Usage:  "%0"
ECHO.
ECHO          NOTE:  No arguments are required to build the
ECHO                 normalized %CMS% ldif text classes.
ECHO.
GOTO EXIT_PROCESS


REM
REM  Check presence of user-defined variables
REM

:CHECK_ENVIRONMENT_VARIABLES
IF !%SERVER_ROOT%==! GOTO ENVIRONMENT_VARIABLES_ERROR
IF !%JAVA_HOME%==! GOTO ENVIRONMENT_VARIABLES_ERROR
GOTO CHECK_SERVER_ROOT


:ENVIRONMENT_VARIABLES_ERROR
ECHO ERROR:  Please specify the SERVER_ROOT and JAVA_HOME
ECHO         environment variables for this script!
ECHO.
GOTO EXIT_PROCESS


REM
REM  Check that the specified SERVER_ROOT exists
REM

:CHECK_SERVER_ROOT
IF EXIST %SERVER_ROOT% GOTO CHECK_JAVA_HOME


ECHO ERROR:  The specified SERVER_ROOT does not exist!
ECHO.
GOTO EXIT_PROCESS


REM
REM  Check that the specified JAVA_HOME exists
REM

:CHECK_JAVA_HOME
IF EXIST %JAVA_HOME% GOTO SET_LIBRARY_PATH


ECHO ERROR:  The specified JAVA_HOME does not exist!
ECHO.
GOTO EXIT_PROCESS


REM
REM  Setup the appropriate library path environment variable
REM  based upon the platform (WINNT)
REM

:SET_LIBRARY_PATH
SET PATH=%SERVER_ROOT%\bin\cert\lib;%JAVA_HOME%\bin;%JAVA_HOME%\lib;%PATH%


REM
REM  Set TARGET - identify the complete path to the new classes target directory
REM

SET TARGET=..\classes


REM
REM  Create the new classes target directory (if it does not already exist)
REM

IF EXIST %TARGET% goto COMPILE_CLASSES
MKDIR %TARGET%


REM
REM  Compile 42SP2ToTxt - create "CMS42SP2LdifParser.class" and "Main.class"
REM

:COMPILE_CLASSES
%JAVA_HOME%\bin\javac.exe -d %TARGET% -classpath %JAVA_HOME%\jre\lib\rt.jar;%SERVER_ROOT%\bin\cert\jars\certsrv.jar;%SERVER_ROOT%\bin\cert\jars\jss21.jar Main.java


:EXIT_PROCESS


ENDLOCAL