1 $! 16 November 2006. SMS.
3 $! Attempt to build Wget 1.10 automatically, using MMK or MMS.
7 $! @ wget_kit_device:[wget_kit_dir.VMS]VMS-WGET.COM -
8 $! [DASHD] [DBG] [HPSSL|NOSSL] [LARGE] [LIST] [MMS] -
9 $! [CLEAN] [CLEAN_ALL] [CLEAN_EXE] [HELP] [MULTINET]
11 $! To enable the "-d" (diagnostics) Wget command-line option, add
12 $! "DASHD" to the command line.
14 $! To enable large-file (>2GB) support (non-VAX systems), add "LARGE"
15 $! to the command line.
17 $! To build a debug executable, add "DBG" to the command line.
19 $! To get compiler listing files, add "LIST" to the command line.
21 $! This procedure prefers MMK to MMS.
22 $! To use MMS when both work, add "MMS" to the command line.
24 $! To prevent automatic detection and use of OpenSSL, add "NOSSL"
25 $! to the command line. This procedure prefers a generic SSL kit to HP
26 $! SSL. If the generic logical names OPENSSL and SSLLIB are defined,
27 $! they will be used instead of the the HP SSL logical names SSL$INCLUDE
28 $! and SYS$SHARE. To use HP SSL when these generic logical names are
29 $! defined, add "HPSSL" to the command line.
31 $! To build the "CLEAN" target (which deletes all object and
32 $! executable files for the current CPU type, add "CLEAN" to the command
33 $! line. Similarly, the "CLEAN_ALL", "CLEAN_EXE" or "HELP" target may be
34 $! specified. For details, see [.VMS]DESCRIP.MMS.
36 $! The source code contains some old Multinet-specific code which may
37 $! be useful for building the program with Multinet on old VMS versions
38 $! (probably VMS before V7.x). With more modern VMS and Multinet, there
39 $! should be no need to use any of the old Multinet-specific code. If
40 $! Multinet build problems occur, try adding "MULTINET" to the command
41 $! line. The source code contains no special code for PathWay or
42 $! TCPware IP software (or for the DEC/Compaq/HP UCX or TCPIP software).
45 $! Special usage for automatic dependency generation (MMS only):
47 $! @ wget_kit_device:[wget_kit_dir.VMS]VMS-WGET.COM -
48 $! DEPS [DASHD] [HPSSL|NOSSL] [NOSKIP] [CLEAN|PURGE]
50 $! See the [.VMS]DESCRIP_MKDEPS.MMS description file for more
51 $! details. Specifying the CLEAN target here deletes the dependency
52 $! files, not the usual objects and executables.
54 $! Note that by default, DESCRIP_MKDEPS.MMS will delete the
55 $! intermediate *.MMSD dependency files, leaving only the comprehensive
56 $! dependency file, DESCRIP_DEPS.MMS. To preserve the intermediate
57 $! files, specify "NOSKIP".
59 $! Specifying the PURGE target here deletes the intermediate *.MMSD
60 $! dependency files, and purges the comprehensive dependency file,
63 $!----------------------------------------------------------------------
65 $! Sense the current default directory.
67 $ def_orig = f$environment( "DEFAULT")
69 $! Arrange for clean-up.
71 $ on error then goto clean_up
72 $ on control_y then goto clean_up
74 $! Set default to the kit [.SRC] directory.
76 $ proc = f$environment( "PROCEDURE")
78 f$parse( proc, , , "DEVICE")+ f$parse( proc, , , "DIRECTORY")
79 $ set default 'proc_dev_dir'
82 $! Sense the VMS version.
84 $ VMS_VERS = f$edit( f$getsyi( "version"), "trim")
87 $! Analyze the command-line parameters.
106 $ P = f$edit( P, "TRIM, UPCASE")
108 $ if (P .eqs. "DASHD")
116 $ if (P .eqs. "DEPS")
124 $ if (P .eqs. "LARGE")
128 $ if (P .eqs. "LIST")
132 $ if (P .eqs. "MULTINET")
136 $ if (P .eqs. "NOSKIP")
140 $ if (P .eqs. "NOSSL")
144 $ if (P .eqs. "HPSSL")
168 $! Verify MMK, if not intending to use MMS. DEPS rquires MMS.
169 $! Accept a (non-blank) foreign command symbol "MMK", or the presence of
170 $! MMK.EXE on DCL$PATH.
174 $ if ((CMD .eqs. "") .and. (DEPS .eqs. ""))
180 $ if (f$search( "DCL$PATH:MMK.EXE") .nes. "") then CMD = "MMK"
182 $ if (f$edit( MMK, "TRIM") .nes. "") then CMD = "MMK"
187 $! Set MMK or MMS macros.
189 $ MACROS = """""VMS_VERS=''VMS_VERS'"""""
191 $ if (DASHD .nes. "")
193 $ MACROS = MACROS+ ", """"''DASHD'=1"""""
198 $ MACROS = MACROS+ ", """"''DBG'=1"""""
201 $ if (LARGE .nes. "")
203 $ MACROS = MACROS+ ", """"''LARGE'=1"""""
208 $ MACROS = MACROS+ ", """"''LIST'=1"""""
213 $ MACROS = MACROS+ ", """"''IP'=1"""""
216 $ if (NOSKIP .nes. "")
218 $ MACROS = MACROS+ ", """"''NOSKIP'=1"""""
221 $ NEED_HP_OPENSSL = 0
222 $ if (NOSSL .eqs. "")
224 $ if (HPSSL .nes. "")
226 $ if (f$search( "ssl$include:ssl.h") .nes. "")
228 $ MACROS = MACROS+ ", """"HPSSL=1"""""
231 $ if (f$search( "openssl:ssl.h") .nes. "")
233 $ if (f$trnlnm( "OPENSSL") .eqs. "SSL$INCLUDE:")
235 $ MACROS = MACROS+ ", """"HPSSL=1"""""
237 $ MACROS = MACROS+ ", """"SSL=1"""""
240 $ if (f$search( "ssl$include:ssl.h") .nes. "")
242 $ NEED_HP_OPENSSL = 1
243 $ MACROS = MACROS+ ", """"HPSSL=1"""""
249 $ if (MACROS .nes. "")
251 $ MACROS = "/MACRO = (''MACROS')"
254 $! Compose the MMK or MMS command with the appropriate options.
258 $ X := 'CMD' /DESCRIPTION = [-.vms]descrip.mms 'MACROS' 'TARGET'
261 $ if (NOSKIP .eqs. "")
263 $ CMD = CMD+ " /SKIP_INTERMEDIATE"
265 $ X := 'CMD' /EXTENDED_SYNTAX -
266 /DESCRIPTION = [-.vms]descrip_mkdeps.mms 'MACROS' 'TARGET'
269 $! If using HP SSL, define the logical name OPENSSL.
271 $ if (NEED_HP_OPENSSL)
273 $ define openssl ssl$include
276 $! If using any SSL, show the openssl definition.
278 $ if (NOSSL .eqs. "")
280 $ lnm = f$trnlnm( "OPENSSL")
285 $ write sys$output "OPENSSL = "+ lnm
288 $! Show the MMK or MMS command.
292 $! Run MMK or MMS with the appropriate options.
298 $! If using HP SSL, deassign the logical name OPENSSL.
300 $ if (NEED_HP_OPENSSL)
305 $! Restore the original default directory.
307 $ set default 'def_orig'