Commit | Line | Data |
---|---|---|
495c5fdc PG |
1 | &begin_parameters |
2 | cpu option(-processor)name,allow(mc68020,i80860,pa7100,pa8000),=mc68020 | |
3 | recompile switch(-recompile),=1 | |
4 | rebind switch(-rebind),=1 | |
5b8c1387 JH |
5 | tgt_mod option(-target_module)module_name,='(current_module)' |
6 | version option(-version)name,allow(alpha,ga),=ga | |
495c5fdc PG |
7 | &end_parameters |
8 | &echo command_lines | |
9 | & | |
10 | & This is a VOS command macro to build Perl 5 for the Stratus VOS | |
11 | & operating system. You need to have the VOS POSIX.1 support | |
12 | & loaded on your system. Change the following statement, if | |
13 | & necessary, to assign the correct pathname of the directory that | |
14 | & contains VOS POSIX.1 support. | |
15 | & | |
5b8c1387 JH |
16 | &if &version& = alpha |
17 | &then &set_string POSIX >vos_ftp_site>pub>vos>alpha>posix | |
18 | &else &set_string POSIX >system>posix_object_library | |
495c5fdc PG |
19 | & |
20 | & See if the site has VOS POSIX.1 support loaded. If not, quit now. | |
21 | & | |
22 | &if ^ (exists &POSIX& -directory) | |
23 | &then &do | |
24 | &display_line build: VOS POSIX.1 support not found. &POSIX& | |
5b8c1387 JH |
25 | &return 1 |
26 | &end | |
27 | & | |
28 | &if &cpu& = mc68020 & &version& = ga | &cpu& = i80860 & &version& = ga | |
29 | &then &do | |
30 | &display_line build: "-version ga" is incompatible with "-processor mc68020 or i80860" | |
31 | &return 1 | |
495c5fdc PG |
32 | &end |
33 | & | |
34 | & Set up the appropriate directory suffix for each architecture. | |
35 | & | |
36 | &if &cpu& = mc68020 | |
37 | &then &set_string obj '' | |
38 | &if &cpu& = i80860 | |
39 | &then &set_string obj .860 | |
40 | &if &cpu& = pa7100 | |
41 | &then &set_string obj .7100 | |
42 | &if &cpu& = pa8000 | |
43 | &then &set_string obj .8000 | |
44 | & | |
24e8e380 GS |
45 | &if &cpu& = mc68020 |
46 | &then &set_string obj2 .68k | |
47 | &else &set_string obj2 &obj& | |
48 | & | |
495c5fdc PG |
49 | &set_string cpu -processor &cpu& |
50 | & | |
51 | & If requested, compile the source code. | |
52 | & | |
53 | &if &recompile& = 0 | |
54 | &then &goto CHECK_REBIND | |
55 | & | |
5b8c1387 JH |
56 | &if &version& = alpha |
57 | &then !set_library_paths include << < &POSIX&>incl &+ | |
58 | (master_disk)>system>include_library | |
59 | &else !set_library_paths include << < &+ | |
60 | (master_disk)>system>stcp>include_library &+ | |
495c5fdc PG |
61 | (master_disk)>system>include_library |
62 | & | |
24e8e380 GS |
63 | &if (exists *.obj -link) |
64 | &then !unlink *.obj -no_ask -brief | |
65 | & | |
495c5fdc | 66 | & Suppress several harmless compiler warning and advice messages. |
24e8e380 | 67 | & Use -list -show_include all -show_macros both_ways when debugging. |
495c5fdc | 68 | & |
5b8c1387 JH |
69 | &set_string cflags '-u -O4 -D_POSIX_C_SOURCE=199506L -DPERL_CORE' |
70 | & | |
71 | & The following is a work-around for stcp-1437,8,9 | |
72 | & | |
73 | &if &version& = ga | |
74 | &then &set_string cflags &cflags& -D_BSD_SOURCE | |
24e8e380 GS |
75 | & |
76 | !cc <<av.c -suppress_diag 2006 2064 2065 &cpu& &cflags& | |
495c5fdc | 77 | &if (command_status) ^= 0 &then &return |
24e8e380 | 78 | !cc <<deb.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 79 | &if (command_status) ^= 0 &then &return |
24e8e380 | 80 | !cc <<doio.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 81 | &if (command_status) ^= 0 &then &return |
24e8e380 | 82 | !cc <<doop.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 83 | &if (command_status) ^= 0 &then &return |
24e8e380 | 84 | !cc <<dump.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 85 | &if (command_status) ^= 0 &then &return |
24e8e380 | 86 | !cc <<ebcdic.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 87 | &if (command_status) ^= 0 &then &return |
24e8e380 | 88 | !cc <<globals.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 89 | &if (command_status) ^= 0 &then &return |
24e8e380 | 90 | !cc <<gv.c -suppress_diag 2006 2065 &cpu& &cflags& |
495c5fdc | 91 | &if (command_status) ^= 0 &then &return |
24e8e380 | 92 | !cc <<hv.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 93 | &if (command_status) ^= 0 &then &return |
24e8e380 | 94 | & !cc <<malloc.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 95 | & &if (command_status) ^= 0 &then &return |
24e8e380 GS |
96 | !cc <<mg.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
97 | &if (command_status) ^= 0 &then &return | |
5b8c1387 | 98 | !cc <<miniperlmain.c -suppress_diag 2006 2065 &cpu& &cflags& |
24e8e380 GS |
99 | &if (command_status) ^= 0 &then &return |
100 | !cc <<op.c -suppress_diag 2006 2064 2065 &cpu& &cflags& | |
101 | &if (command_status) ^= 0 &then &return | |
5b8c1387 JH |
102 | & |
103 | & We are essentially building miniperl for now. Until we | |
104 | & get a POSIX shell on VOS we won't add any of the extensions. | |
105 | & | |
106 | & !link <<op.c opmini.c -delete | |
107 | & &if (command_status) ^= 0 &then &return | |
108 | & !cc opmini.c -suppress_diag 2006 2064 2065 &cpu& &cflags& -DPERL_EXTERNAL_GLOB | |
109 | & &if (command_status) ^= 0 &then &return | |
110 | & !unlink opmini.c | |
111 | & &if (command_status) ^= 0 &then &return | |
112 | & | |
24e8e380 | 113 | !cc <<perl.c -suppress_diag 2006 2053 2065 &cpu& &cflags& &+ |
5b8c1387 JH |
114 | -DARCHLIB="/system/ported/perl/lib/5.7&obj2&" &+ |
115 | -DARCHLIB_EXP="/system/ported/perl/lib/5.7&obj2&" &+ | |
116 | -DSITEARCH="/system/ported/perl/lib/site/5.7&obj2&" &+ | |
117 | -DSITEARCH_EXP="/system/ported/perl/lib/site/5.7&obj2&" | |
495c5fdc | 118 | &if (command_status) ^= 0 &then &return |
24e8e380 | 119 | !cc <<perlapi.c &cpu& &cflags& |
495c5fdc | 120 | &if (command_status) ^= 0 &then &return |
24e8e380 | 121 | !cc <<perlio.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 122 | &if (command_status) ^= 0 &then &return |
24e8e380 | 123 | !cc <<perly.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 124 | &if (command_status) ^= 0 &then &return |
24e8e380 GS |
125 | & compiling pp.c for the PA-RISC hits compiler bug pcg-98; avoid it. |
126 | & The bug is fixed in VOS 14.1.0 and all later releases. | |
127 | &if (index (string &cpu&) pa) > 0 & (module_info os_release) < 'VOS Release 14.1.0' | |
128 | &then !cc <<pp.c -suppress_diag 2006 2064 2065 &cpu& &cflags& -no_schedule | |
129 | &else !cc <<pp.c -suppress_diag 2006 2064 2065 &cpu& &cflags& | |
495c5fdc | 130 | &if (command_status) ^= 0 &then &return |
24e8e380 | 131 | !cc <<pp_ctl.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc | 132 | &if (command_status) ^= 0 &then &return |
24e8e380 | 133 | !cc <<pp_hot.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc | 134 | &if (command_status) ^= 0 &then &return |
24e8e380 | 135 | !cc <<pp_sys.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc | 136 | &if (command_status) ^= 0 &then &return |
24e8e380 | 137 | !cc <<regcomp.c -suppress_diag 2006 2064 &cpu& &cflags& |
495c5fdc | 138 | &if (command_status) ^= 0 &then &return |
24e8e380 | 139 | !cc <<regexec.c -suppress_diag 2006 2064 &cpu& &cflags& |
495c5fdc | 140 | &if (command_status) ^= 0 &then &return |
24e8e380 | 141 | !cc <<run.c -suppress_diag 2006 2065 &cpu& &cflags& |
495c5fdc | 142 | &if (command_status) ^= 0 &then &return |
24e8e380 | 143 | !cc <<scope.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc | 144 | &if (command_status) ^= 0 &then &return |
24e8e380 | 145 | !cc <<sv.c -suppress_diag 2006 2065 &cpu& &cflags& |
495c5fdc | 146 | &if (command_status) ^= 0 &then &return |
24e8e380 | 147 | !cc <<taint.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 148 | &if (command_status) ^= 0 &then &return |
24e8e380 | 149 | !cc <<toke.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc | 150 | &if (command_status) ^= 0 &then &return |
24e8e380 | 151 | !cc <<universal.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc | 152 | &if (command_status) ^= 0 &then &return |
24e8e380 | 153 | !cc <<utf8.c -suppress_diag 2065 &cpu& &cflags& |
495c5fdc | 154 | &if (command_status) ^= 0 &then &return |
24e8e380 | 155 | !cc <<util.c -suppress_diag 2006 2065 &cpu& &cflags& |
495c5fdc | 156 | &if (command_status) ^= 0 &then &return |
24e8e380 | 157 | !cc <<xsutils.c &cpu& &cflags& |
495c5fdc | 158 | &if (command_status) ^= 0 &then &return |
5b8c1387 JH |
159 | &if &version& = alpha |
160 | &then &do | |
495c5fdc PG |
161 | !cc <vos_dummies.c &cpu& -O4 |
162 | &if (command_status) ^= 0 &then &return | |
5b8c1387 | 163 | &end |
495c5fdc PG |
164 | & |
165 | & If requested, bind the executable program module. | |
166 | & | |
167 | &label CHECK_REBIND | |
168 | &if &rebind& = 0 | |
169 | &then &return | |
170 | & | |
24e8e380 GS |
171 | &if (exists -directory (master_disk)>system>tcp_os>object_library&obj2&) |
172 | &then &set_string tcp_objlib (master_disk)>system>tcp_os>object_library&obj2& | |
495c5fdc PG |
173 | &else &set_string tcp_objlib (master_disk)>system>tcp_os>object_library |
174 | & | |
5b8c1387 JH |
175 | &if (exists -directory (master_disk)>system>stcp>object_library&obj2&) |
176 | &then &set_string stcp_objlib (master_disk)>system>stcp>object_library&obj2& | |
177 | &else &set_string stcp_objlib (master_disk)>system>stcp>object_library | |
178 | & | |
24e8e380 GS |
179 | &if (exists -directory (master_disk)>system>object_library&obj2&) |
180 | &then &set_string objlib (master_disk)>system>object_library&obj2& | |
495c5fdc PG |
181 | &else &set_string objlib (master_disk)>system>object_library |
182 | & | |
24e8e380 GS |
183 | &if (exists -directory (master_disk)>system>c_object_library&obj2&) |
184 | &then &set_string c_objlib (master_disk)>system>c_object_library&obj2& | |
495c5fdc PG |
185 | &else &set_string c_objlib (master_disk)>system>c_object_library |
186 | & | |
5b8c1387 JH |
187 | &if (exists -directory (master_disk)>system>posix_object_library&obj2&) |
188 | &then &set_string posix_objlib (master_disk)>system>posix_object_library&obj2& | |
189 | &else &set_string posix_objlib (master_disk)>system>posix_object_library | |
190 | & | |
191 | &if &version& = alpha | |
192 | &then !set_library_paths object . &tcp_objlib& &+ | |
495c5fdc | 193 | &POSIX&>c>sysv_runtime>obj&obj& &+ |
5b8c1387 JH |
194 | &POSIX&>c>runtime>obj&obj& &+ |
195 | &c_objlib& &objlib& | |
196 | &else !set_library_paths object . &stcp_objlib& &+ | |
197 | &stcp_objlib&>common &+ | |
198 | &stcp_objlib&>net &+ | |
199 | &stcp_objlib&>sbsd &+ | |
200 | &stcp_objlib&>socket &+ | |
201 | &posix_objlib&>bsd &+ | |
202 | &posix_objlib& &+ | |
203 | &c_objlib& &objlib& | |
204 | &if &version& = alpha | |
205 | &then !bind -control <perl.bind vos_dummies &+ | |
206 | &tcp_objlib&>tcp_runtime &tcp_objlib&>tcp_gethost &+ | |
207 | &cpu& -target_module &tgt_mod& -map | |
208 | &else !bind -control <perl.bind &cpu& -target_module &tgt_mod& -map | |
495c5fdc PG |
209 | &if (command_status) ^= 0 &then &return |
210 | !delete_file *.obj -no_ask -brief | |
211 | !unlink *.obj -no_ask -brief |