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 & Set up the appropriate directory suffix for each architecture.
38 &then &set_string obj ''
40 &then &set_string obj .860
42 &then &set_string obj .7100
44 &then &set_string obj .8000
47 &then &set_string obj2 .68k
48 &else &set_string obj2 &obj&
52 &set_string cpu -processor &cpu&
60 & If requested, compile the source code.
63 &then &goto CHECK_REBIND
66 &then !set_library_paths include << < &POSIX&>incl &+
67 (master_disk)>system>include_library
68 &else !set_library_paths include << < &+
69 (master_disk)>system>stcp>include_library &+
70 (master_disk)>system>include_library
72 &if (exists *.obj -link)
73 &then !unlink *.obj -no_ask -brief
75 & Suppress several harmless compiler warning and advice messages.
76 & Use -list -show_include all -show_macros both_ways when debugging.
79 &then &set_string cflags '-O4 -D_POSIX_C_SOURCE=199506L -DPERL_CORE -u'
80 &else &set_string cflags '-O4 -D_POSIX_C_SOURCE=199506L -DPERL_CORE -c'
82 & The following is a work-around for stcp-1437,8,9
85 &then &set_string cflags &cflags& -D_BSD_SOURCE
88 &then &set_string diag -suppress_diag 2006 2064 2065
89 &else &set_string diag ''
91 & The following is a work-around for stcp-1570 and GCC.
94 &then &set_string diag &diag& -w
96 !&compiler& <<av.c &diag& &cpu& &cflags& -o av&s&
97 &if (command_status) ^= 0 &then &return
98 !&compiler& <<deb.c &diag& &cpu& &cflags& -o deb&s&
99 &if (command_status) ^= 0 &then &return
100 !&compiler& <<doio.c &diag& &cpu& &cflags& -o doio&s&
101 &if (command_status) ^= 0 &then &return
102 !&compiler& <<doop.c &diag& &cpu& &cflags& -o doop&s&
103 &if (command_status) ^= 0 &then &return
104 !&compiler& <<dump.c &diag& &cpu& &cflags& -o dump&s&
105 &if (command_status) ^= 0 &then &return
106 !&compiler& <<globals.c &diag& &cpu& &cflags& -o globals&s&
107 &if (command_status) ^= 0 &then &return
108 !&compiler& <<gv.c &diag& &cpu& &cflags& -o gv&s&
109 &if (command_status) ^= 0 &then &return
110 !&compiler& <<hv.c &diag& &cpu& &cflags& -o hv&s&
111 &if (command_status) ^= 0 &then &return
112 !&compiler& <<locale.c &diag& &cpu& &cflags& -o locale&s&
113 &if (command_status) ^= 0 &then &return
114 & !&compiler& <<malloc.c &diag& &cpu& &cflags& -o malloc&s&
115 & &if (command_status) ^= 0 &then &return
116 !&compiler& <<mg.c &diag& &cpu& &cflags& -o mg&s&
117 &if (command_status) ^= 0 &then &return
118 !&compiler& <<numeric.c &diag& &cpu& &cflags& -o numeric&s&
119 &if (command_status) ^= 0 &then &return
120 !&compiler& <<op.c &diag& &cpu& &cflags& -o op&s&
121 &if (command_status) ^= 0 &then &return
123 & We are essentially building miniperl for now. Until we
124 & get a POSIX shell on VOS we won't add any of the extensions.
126 & !link <<op.c opmini.c -delete
127 & &if (command_status) ^= 0 &then &return
128 & !&compiler& opmini.c &diag& &cpu& &cflags& -DPERL_EXTERNAL_GLOB -o opmini&s&
129 & &if (command_status) ^= 0 &then &return
131 & &if (command_status) ^= 0 &then &return
133 !&compiler& <<perl.c &diag& &cpu& &cflags& -o perl&s& &+
134 -DARCHLIB="/system/ported/perl/lib/5.7&obj2&" &+
135 -DARCHLIB_EXP="/system/ported/perl/lib/5.7&obj2&" &+
136 -DSITEARCH="/system/ported/perl/lib/site/5.7&obj2&" &+
137 -DSITEARCH_EXP="/system/ported/perl/lib/site/5.7&obj2&"
138 &if (command_status) ^= 0 &then &return
139 !&compiler& <<perlapi.c &diag& &cpu& &cflags& -o perlapi&s&
140 &if (command_status) ^= 0 &then &return
141 !&compiler& <<perlio.c &diag& &cpu& &cflags& -o perlio&s&
142 &if (command_status) ^= 0 &then &return
143 !&compiler& <<perly.c &diag& &cpu& &cflags& -o perly&s&
144 &if (command_status) ^= 0 &then &return
145 & compiling pp.c for the PA-RISC hits compiler bug pcg-98; avoid it.
146 & The bug is fixed in VOS 14.1.0 and all later releases.
147 &if (index (string &cpu&) pa) > 0 & (module_info os_release) < 'VOS Release 14.1.0'
148 &then !&compiler& <<pp.c &diag& &cpu& &cflags& -no_schedule -o pp&s&
149 &else !&compiler& <<pp.c &diag& &cpu& &cflags& -o pp&s&
150 &if (command_status) ^= 0 &then &return
151 !&compiler& <<pp_ctl.c &diag& &cpu& &cflags& -o pp_ctl&s&
152 &if (command_status) ^= 0 &then &return
153 !&compiler& <<pp_hot.c &diag& &cpu& &cflags& -o pp_hot&s&
154 &if (command_status) ^= 0 &then &return
155 !&compiler& <<pp_pack.c &diag& &cpu& &cflags& -o pp_pack&s&
156 &if (command_status) ^= 0 &then &return
157 !&compiler& <<pp_sort.c &diag& &cpu& &cflags& -o pp_sort&s&
158 &if (command_status) ^= 0 &then &return
159 !&compiler& <<pp_sys.c &diag& &cpu& &cflags& -o pp_sys&s&
160 &if (command_status) ^= 0 &then &return
161 !&compiler& <<regcomp.c &diag& &cpu& &cflags& -o regcomp&s&
162 &if (command_status) ^= 0 &then &return
163 !&compiler& <<regexec.c &diag& &cpu& &cflags& -o regexec&s&
164 &if (command_status) ^= 0 &then &return
165 !&compiler& <<run.c &diag& &cpu& &cflags& -o run&s&
166 &if (command_status) ^= 0 &then &return
167 !&compiler& <<scope.c &diag& &cpu& &cflags& -o scope&s&
168 &if (command_status) ^= 0 &then &return
169 !&compiler& <<sv.c &diag& &cpu& &cflags& -o sv&s&
170 &if (command_status) ^= 0 &then &return
171 !&compiler& <<taint.c &diag& &cpu& &cflags& -o taint&s&
172 &if (command_status) ^= 0 &then &return
173 !&compiler& <<toke.c &diag& &cpu& &cflags& -o toke&s&
174 &if (command_status) ^= 0 &then &return
175 !&compiler& <<universal.c &diag& &cpu& &cflags& -o universal&s&
176 &if (command_status) ^= 0 &then &return
177 !&compiler& <<utf8.c &diag& &cpu& &cflags& -o utf8&s&
178 &if (command_status) ^= 0 &then &return
179 !&compiler& <<util.c &diag& &cpu& &cflags& -o util&s&
180 &if (command_status) ^= 0 &then &return
181 !&compiler& <<xsutils.c &diag& &cpu& &cflags& -o xsutils&s&
182 &if (command_status) ^= 0 &then &return
183 &if &version& = alpha
185 !&compiler& <vos_dummies.c &cpu& -O4 -o vos_dummies&s&
186 &if (command_status) ^= 0 &then &return
192 !ar rc perl.a av.o deb.o doio.o doop.o dump.o globals.o gv.o hv.o mg.o &+
193 op.o perl.o perlapi.o perlio.o perly.o pp.o pp_ctl.o pp_hot.o pp_sys.o &+
194 regcomp.o regexec.o run.o scope.o sv.o taint.o toke.o universal.o utf8.o &+
198 !&compiler& <<miniperlmain.c &diag& &cpu& &cflags& -o miniperlmain&s&
199 &if (command_status) ^= 0 &then &return
202 & If requested, bind the executable program module.
208 &if (exists -directory (master_disk)>system>tcp_os>object_library&obj2&)
209 &then &set_string tcp_objlib (master_disk)>system>tcp_os>object_library&obj2&
210 &else &set_string tcp_objlib (master_disk)>system>tcp_os>object_library
212 &if (exists -directory (master_disk)>system>stcp>object_library&obj2&)
213 &then &set_string stcp_objlib (master_disk)>system>stcp>object_library&obj2&
214 &else &set_string stcp_objlib (master_disk)>system>stcp>object_library
216 &if (exists -directory (master_disk)>system>object_library&obj2&)
217 &then &set_string objlib (master_disk)>system>object_library&obj2&
218 &else &set_string objlib (master_disk)>system>object_library
220 &if (exists -directory (master_disk)>system>c_object_library&obj2&)
221 &then &set_string c_objlib (master_disk)>system>c_object_library&obj2&
222 &else &set_string c_objlib (master_disk)>system>c_object_library
224 &if (exists -directory (master_disk)>system>posix_object_library&obj2&)
225 &then &set_string posix_objlib (master_disk)>system>posix_object_library&obj2&
226 &else &set_string posix_objlib (master_disk)>system>posix_object_library
228 &if &version& = alpha
229 &then !set_library_paths object . &tcp_objlib& &+
230 &POSIX&>c>sysv_runtime>obj&obj& &+
231 &POSIX&>c>runtime>obj&obj& &+
233 &else !set_library_paths object . &stcp_objlib& &+
234 &stcp_objlib&>common &+
236 &stcp_objlib&>sbsd &+
237 &stcp_objlib&>socket &+
238 &posix_objlib&>bsd &+
243 &set_string cflags (before &$cflags& -c)
244 !&compiler& <<miniperlmain.c perl.a &diag& &cpu& &cflags& -o perl.pm
245 &if (command_status) ^= 0 &then &return
249 &if &version& = alpha
250 &then !bind -control <perl.bind vos_dummies &+
251 &tcp_objlib&>tcp_runtime &tcp_objlib&>tcp_gethost &+
252 &cpu& -target_module &tgt_mod& -map
253 &else !bind -control <perl.bind &cpu& -target_module &tgt_mod& -map
254 &if (command_status) ^= 0 &then &return
256 !delete_file *&s& -no_ask -brief
257 !unlink *&s& -no_ask -brief