Update from 1.0.0-stable
[openssl.git] / VMS / install.com
1 $! INSTALL.COM -- Installs the files in a given directory tree
2 $!
3 $! Author: Richard Levitte <richard@levitte.org>
4 $! Time of creation: 23-MAY-1998 19:22
5 $!
6 $! P1   root of the directory tree
7 $!
8 $       IF P1 .EQS. ""
9 $       THEN
10 $           WRITE SYS$OUTPUT "First argument missing."
11 $           WRITE SYS$OUTPUT "Should be the directory where you want things installed."
12 $           EXIT
13 $       ENDIF
14 $
15 $       IF (F$GETSYI("CPU").LT.128)
16 $       THEN
17 $           ARCH := VAX
18 $       ELSE
19 $           ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
20 $           IF (ARCH .EQS. "") THEN ARCH = "UNK"
21 $       ENDIF
22 $
23 $       ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
24 $       ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
25 $       ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
26                    - "[000000." - "][" - "[" - "]"
27 $       ROOT = ROOT_DEV + "[" + ROOT_DIR
28 $
29 $       DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
30 $       DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
31 $
32 $       IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
33            CREATE/DIR/LOG WRK_SSLROOT:[000000]
34 $       IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
35            CREATE/DIR/LOG WRK_SSLINCLUDE:
36 $       IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN -
37            CREATE/DIR/LOG WRK_SSLROOT:[VMS]
38 $
39 $       IF F$SEARCH("WRK_SSLINCLUDE:vms_idhacks.h") .NES. "" THEN -
40            DELETE WRK_SSLINCLUDE:vms_idhacks.h;*
41 $
42 $       OPEN/WRITE SF WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM
43 $       WRITE SYS$OUTPUT "%OPEN-I-CREATED,  ",F$SEARCH("WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM")," created."
44 $       WRITE SF "$! Startup file for Openssl"
45 $       WRITE SF "$!"
46 $       WRITE SF "$! Do not edit this file, as it will be regenerated during next installation."
47 $       WRITE SF "$! Instead, add or change SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"
48 $       WRITE SF "$!"
49 $       WRITE SF "$! P1 a qualifier to DEFINE.  For example ""/SYSTEM"" to get the logical names"
50 $       WRITE SF "$!    defined in the system logical name table."
51 $       WRITE SF "$!"
52 $       WRITE SF "$     IF (F$GETSYI(""CPU"").LT.128)"
53 $       WRITE SF "$     THEN"
54 $       WRITE SF "$         ARCH := VAX"
55 $       WRITE SF "$     ELSE"
56 $       WRITE SF "$         ARCH = F$EDIT( F$GETSYI( ""ARCH_NAME""), ""UPCASE"")"
57 $       WRITE SF "$         IF (ARCH .EQS. """") THEN ARCH = ""UNK"""
58 $       WRITE SF "$     ENDIF"
59 $       WRITE SF "$     DEFINE/NOLOG'P1 SSLROOT         ",ROOT,".] /TRANS=CONC"
60 $       WRITE SF "$     DEFINE/NOLOG'P1 SSLLIB          SSLROOT:['ARCH'_LIB]"
61 $       WRITE SF "$     DEFINE/NOLOG'P1 SSLINCLUDE      SSLROOT:[INCLUDE]"
62 $       WRITE SF "$     DEFINE/NOLOG'P1 SSLEXE          SSLROOT:['ARCH'_EXE]"
63 $       WRITE SF "$     DEFINE/NOLOG'P1 SSLCERTS        SSLROOT:[CERTS]"
64 $       WRITE SF "$     DEFINE/NOLOG'P1 SSLPRIVATE      SSLROOT:[PRIVATE]"
65 $       WRITE SF "$"
66 $       WRITE SF "$!    This is program can include <openssl/{foo}.h>"
67 $       WRITE SF "$     DEFINE/NOLOG'P1 OPENSSL         SSLINCLUDE:"
68 $       WRITE SF "$"
69 $       WRITE SF "$     IF F$SEARCH(""SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"") .NES."""" THEN -"
70 $       WRITE SF "         @SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"
71 $       WRITE SF "$"
72 $       WRITE SF "$     EXIT"
73 $       CLOSE SF
74 $       SET FILE/PROT=WORLD:RE WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM
75 $
76 $       COPY OPENSSL_UTILS.COM WRK_SSLROOT:[VMS]/LOG
77 $       SET FILE/PROT=WORLD:RE WRK_SSLROOT:[VMS]OPENSSL_UTILS.COM
78 $
79 $       EXIT