2 cpu option(-processor)name,allow(mc68020,i80860,pa7100,pa8000),=mc68020
3 recompile switch(-recompile),=1
4 rebind switch(-rebind),=1
5 tgt_mod option(-target_module)module_name,='(current_module)'
6 version option(-version)name,allow(alpha,ga),=ga
7 compiler option(-compiler)name,allow(cc,gcc)=cc
11 & This is a VOS command macro to build Perl 5 for the Stratus VOS
12 & operating system. You need to have the VOS POSIX.1 support
13 & loaded on your system. Change the following statement, if
14 & necessary, to assign the correct pathname of the directory that
15 & contains VOS POSIX.1 support.
18 &then &set_string POSIX >vos_ftp_site>pub>vos>alpha>posix
19 &else &set_string POSIX >system>posix_object_library
21 & See if the site has VOS POSIX.1 support loaded. If not, quit now.
23 &if ^ (exists &POSIX& -directory)
25 &display_line build: VOS POSIX.1 support not found. &POSIX&
29 &if &cpu& = mc68020 & &version& = ga | &cpu& = i80860 & &version& = ga
31 &display_line build: "-version ga" is incompatible with "-processor mc68020 or i80860"
35 &if &compiler& = gcc & &version& = alpha
37 &display_line build: "-compiler gcc" is incompatible with "-version alpha"
41 & Set up the appropriate directory suffix for each architecture.
44 &then &set_string obj ''
46 &then &set_string obj .860
48 &then &set_string obj .7100
50 &then &set_string obj .8000
53 &then &set_string obj2 .68k
54 &else &set_string obj2 &obj&
57 &then &set_string bindsize -size large
58 &else &set_string bindsize ''
62 &set_string cpu -processor &cpu&
70 & Suppress several harmless compiler warning and advice messages.
71 & Use -list -show_include all -show_macros both_ways when debugging.
73 &set_string cflags -D_SVID_SOURCE -D_POSIX_C_SOURCE=199506L -DPERL_CORE -O4
76 &then &set_string cflags &cflags& '-u'
77 &else &set_string cflags &cflags& '-c'
79 & The following is a work-around for stcp-1437,8,9
82 &then &set_string cflags &cflags& -D_BSD_SOURCE
85 &then &set_string diag -suppress_diag 2006 2064 2065
86 &else &set_string diag ''
88 & The following is a work-around for stcp-1570 and GCC.
89 & (and for some perl errors that only cc finds)
92 &then &set_string diag &diag& -w
93 &else &set_string diag &diag& -w1
96 &then !set_library_paths include << < &POSIX&>incl &+
97 (master_disk)>system>include_library
98 &else !set_library_paths include << < &+
99 (master_disk)>system>stcp>include_library &+
100 (master_disk)>system>include_library>sysv &+
101 (master_disk)>system>include_library
104 &then !set_library_paths command '(current_dir)' &+
105 (master_disk)>system>gnu_library>bin &+
106 (master_disk)>system>command_library
107 &else !set_library_paths command '(current_dir)' &+
108 (master_disk)>system>command_library
110 & If requested, compile the source code.
113 &then &goto CHECK_REBIND
115 & Some of the compiler invocations need more VM than
116 & the defaults allow. Raise the limits.
117 !update_process_cmd_limits -initial_total_limit 100000000 -no_ask
119 !&compiler& <<av.c &diag& &cpu& &cflags& -o av&s&
120 &if (command_status) ^= 0 &then &return
121 !&compiler& <<deb.c &diag& &cpu& &cflags& -o deb&s&
122 &if (command_status) ^= 0 &then &return
123 !&compiler& <<doio.c &diag& &cpu& &cflags& -o doio&s&
124 &if (command_status) ^= 0 &then &return
125 !&compiler& <<doop.c &diag& &cpu& &cflags& -o doop&s&
126 &if (command_status) ^= 0 &then &return
127 !&compiler& <<dump.c &diag& &cpu& &cflags& -o dump&s&
128 &if (command_status) ^= 0 &then &return
129 !&compiler& <<globals.c &diag& &cpu& &cflags& -o globals&s&
130 &if (command_status) ^= 0 &then &return
131 !&compiler& <<gv.c &diag& &cpu& &cflags& -o gv&s&
132 &if (command_status) ^= 0 &then &return
133 !&compiler& <<hv.c &diag& &cpu& &cflags& -o hv&s&
134 &if (command_status) ^= 0 &then &return
135 !&compiler& <<locale.c &diag& &cpu& &cflags& -o locale&s&
136 &if (command_status) ^= 0 &then &return
137 & !&compiler& <<malloc.c &diag& &cpu& &cflags& -o malloc&s&
138 & &if (command_status) ^= 0 &then &return
139 !&compiler& <<mg.c &diag& &cpu& &cflags& -o mg&s&
140 &if (command_status) ^= 0 &then &return
141 !&compiler& <<numeric.c &diag& &cpu& &cflags& -o numeric&s&
142 &if (command_status) ^= 0 &then &return
143 !&compiler& <<op.c &diag& &cpu& &cflags& -o op&s&
144 &if (command_status) ^= 0 &then &return
146 & We are essentially building miniperl for now. Until we
147 & get a POSIX shell on VOS we won't add any of the extensions.
149 & !link <<op.c opmini.c -delete
150 & &if (command_status) ^= 0 &then &return
151 & !&compiler& opmini.c &diag& &cpu& &cflags& -DPERL_EXTERNAL_GLOB -o opmini&s&
152 & &if (command_status) ^= 0 &then &return
154 & &if (command_status) ^= 0 &then &return
156 !&compiler& <<perl.c &diag& &cpu& &cflags& -o perl&s& &+
157 -DARCHLIB="/system/ported/perl/lib/5.7&obj2&" &+
158 -DARCHLIB_EXP="/system/ported/perl/lib/5.7&obj2&" &+
159 -DSITEARCH="/system/ported/perl/lib/site/5.7&obj2&" &+
160 -DSITEARCH_EXP="/system/ported/perl/lib/site/5.7&obj2&"
161 &if (command_status) ^= 0 &then &return
162 !&compiler& <<perlapi.c &diag& &cpu& &cflags& -o perlapi&s&
163 &if (command_status) ^= 0 &then &return
164 !&compiler& <<perlio.c &diag& &cpu& &cflags& -o perlio&s&
165 &if (command_status) ^= 0 &then &return
166 !&compiler& <<perly.c &diag& &cpu& &cflags& -o perly&s&
167 &if (command_status) ^= 0 &then &return
168 & compiling pp.c for the PA-RISC hits compiler bug pcg-98; avoid it.
169 & The bug is fixed in VOS 14.1.0 and all later releases.
170 &if (index (string &cpu&) pa) > 0 & (module_info os_release) < 'VOS Release 14.1.0'
171 &then !&compiler& <<pp.c &diag& &cpu& &cflags& -no_schedule -o pp&s&
172 &else !&compiler& <<pp.c &diag& &cpu& &cflags& -o pp&s&
173 &if (command_status) ^= 0 &then &return
174 !&compiler& <<pp_ctl.c &diag& &cpu& &cflags& -o pp_ctl&s&
175 &if (command_status) ^= 0 &then &return
176 !&compiler& <<pp_hot.c &diag& &cpu& &cflags& -o pp_hot&s&
177 &if (command_status) ^= 0 &then &return
178 !&compiler& <<pp_pack.c &diag& &cpu& &cflags& -o pp_pack&s&
179 &if (command_status) ^= 0 &then &return
180 !&compiler& <<pp_sort.c &diag& &cpu& &cflags& -o pp_sort&s&
181 &if (command_status) ^= 0 &then &return
182 !&compiler& <<pp_sys.c &diag& &cpu& &cflags& -o pp_sys&s&
183 &if (command_status) ^= 0 &then &return
184 !&compiler& <<regcomp.c &diag& &cpu& &cflags& -o regcomp&s&
185 &if (command_status) ^= 0 &then &return
186 !&compiler& <<regexec.c &diag& &cpu& &cflags& -o regexec&s&
187 &if (command_status) ^= 0 &then &return
188 !&compiler& <<run.c &diag& &cpu& &cflags& -o run&s&
189 &if (command_status) ^= 0 &then &return
190 !&compiler& <<scope.c &diag& &cpu& &cflags& -o scope&s&
191 &if (command_status) ^= 0 &then &return
192 !&compiler& <<sv.c &diag& &cpu& &cflags& -o sv&s&
193 &if (command_status) ^= 0 &then &return
194 !&compiler& <<taint.c &diag& &cpu& &cflags& -o taint&s&
195 &if (command_status) ^= 0 &then &return
196 !&compiler& <<toke.c &diag& &cpu& &cflags& -o toke&s&
197 &if (command_status) ^= 0 &then &return
198 !&compiler& <<universal.c &diag& &cpu& &cflags& -o universal&s&
199 &if (command_status) ^= 0 &then &return
200 !&compiler& <<utf8.c &diag& &cpu& &cflags& -o utf8&s&
201 &if (command_status) ^= 0 &then &return
202 !&compiler& <<util.c &diag& &cpu& &cflags& -o util&s&
203 &if (command_status) ^= 0 &then &return
204 !&compiler& <<xsutils.c &diag& &cpu& &cflags& -o xsutils&s&
205 &if (command_status) ^= 0 &then &return
206 &if &version& = alpha
208 !&compiler& <vos_dummies.c &cpu& -O4 -o vos_dummies&s&
209 &if (command_status) ^= 0 &then &return
215 !ar rc perl.a av.o deb.o doio.o doop.o dump.o globals.o gv.o hv.o locale.o &+
216 mg.o numeric.o op.o perl.o perlapi.o perlio.o perly.o pp.o pp_ctl.o &+
217 pp_hot.o pp_pack.o pp_sort.o pp_sys.o regcomp.o regexec.o run.o scope.o &+
218 sv.o taint.o toke.o universal.o utf8.o util.o xsutils.o
219 !delete_file *.o -no_ask -brief
222 !&compiler& <<miniperlmain.c &diag& &cpu& &cflags& -o miniperlmain&s&
223 &if (command_status) ^= 0 &then &return
226 & If requested, bind the executable program module.
232 &if (exists -directory (master_disk)>system>tcp_os>object_library&obj2&)
233 &then &set_string tcp_objlib (master_disk)>system>tcp_os>object_library&obj2&
234 &else &set_string tcp_objlib (master_disk)>system>tcp_os>object_library
236 &if (exists -directory (master_disk)>system>stcp>object_library&obj2&)
237 &then &set_string stcp_objlib (master_disk)>system>stcp>object_library&obj2&
238 &else &set_string stcp_objlib (master_disk)>system>stcp>object_library
240 &if (exists -directory (master_disk)>system>object_library&obj2&)
241 &then &set_string objlib (master_disk)>system>object_library&obj2&
242 &else &set_string objlib (master_disk)>system>object_library
244 &if (exists -directory (master_disk)>system>c_object_library&obj2&)
245 &then &set_string c_objlib (master_disk)>system>c_object_library&obj2&
246 &else &set_string c_objlib (master_disk)>system>c_object_library
248 &if (exists -directory (master_disk)>system>posix_object_library&obj2&)
249 &then &set_string posix_objlib (master_disk)>system>posix_object_library&obj2&
250 &else &set_string posix_objlib (master_disk)>system>posix_object_library
252 &if &version& = alpha
253 &then !set_library_paths object . &tcp_objlib& &+
254 &POSIX&>c>sysv_runtime>obj&obj& &+
255 &POSIX&>c>runtime>obj&obj& &+
257 &else !set_library_paths object . &stcp_objlib& &+
258 &stcp_objlib&>common &+
260 &stcp_objlib&>sbsd &+
261 &stcp_objlib&>socket &+
262 &posix_objlib&>sysv &+
263 &posix_objlib&>bsd &+
268 &set_string cflags (before &$cflags& -c)
269 !&compiler& <<miniperlmain.c perl.a &diag& &cpu& &cflags& -o perl.pm
270 &if (command_status) ^= 0 &then &return
274 &if &version& = alpha
275 &then !bind -control <perl.bind vos_dummies &+
276 &tcp_objlib&>tcp_runtime &tcp_objlib&>tcp_gethost &+
277 &cpu& -target_module &tgt_mod& &bindsize& -map
278 &else !bind -control <perl.bind &cpu& -target_module &tgt_mod& -map
279 &if (command_status) ^= 0 &then &return
281 !delete_file *&s& -no_ask -brief