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& <<malloc.c &diag& &cpu& &cflags& -o malloc&s&
113 & &if (command_status) ^= 0 &then &return
114 !&compiler& <<mg.c &diag& &cpu& &cflags& -o mg&s&
115 &if (command_status) ^= 0 &then &return
116 !&compiler& <<op.c &diag& &cpu& &cflags& -o op&s&
117 &if (command_status) ^= 0 &then &return
119 & We are essentially building miniperl for now. Until we
120 & get a POSIX shell on VOS we won't add any of the extensions.
122 & !link <<op.c opmini.c -delete
123 & &if (command_status) ^= 0 &then &return
124 & !&compiler& opmini.c &diag& &cpu& &cflags& -DPERL_EXTERNAL_GLOB -o opmini&s&
125 & &if (command_status) ^= 0 &then &return
127 & &if (command_status) ^= 0 &then &return
129 !&compiler& <<perl.c &diag& &cpu& &cflags& -o perl&s& &+
130 -DARCHLIB="/system/ported/perl/lib/5.7&obj2&" &+
131 -DARCHLIB_EXP="/system/ported/perl/lib/5.7&obj2&" &+
132 -DSITEARCH="/system/ported/perl/lib/site/5.7&obj2&" &+
133 -DSITEARCH_EXP="/system/ported/perl/lib/site/5.7&obj2&"
134 &if (command_status) ^= 0 &then &return
135 !&compiler& <<perlapi.c &diag& &cpu& &cflags& -o perlapi&s&
136 &if (command_status) ^= 0 &then &return
137 !&compiler& <<perlio.c &diag& &cpu& &cflags& -o perlio&s&
138 &if (command_status) ^= 0 &then &return
139 !&compiler& <<perly.c &diag& &cpu& &cflags& -o perly&s&
140 &if (command_status) ^= 0 &then &return
141 & compiling pp.c for the PA-RISC hits compiler bug pcg-98; avoid it.
142 & The bug is fixed in VOS 14.1.0 and all later releases.
143 &if (index (string &cpu&) pa) > 0 & (module_info os_release) < 'VOS Release 14.1.0'
144 &then !&compiler& <<pp.c &diag& &cpu& &cflags& -no_schedule -o pp&s&
145 &else !&compiler& <<pp.c &diag& &cpu& &cflags& -o pp&s&
146 &if (command_status) ^= 0 &then &return
147 !&compiler& <<pp_ctl.c &diag& &cpu& &cflags& -o pp_ctl&s&
148 &if (command_status) ^= 0 &then &return
149 !&compiler& <<pp_hot.c &diag& &cpu& &cflags& -o pp_hot&s&
150 &if (command_status) ^= 0 &then &return
151 !&compiler& <<pp_sys.c &diag& &cpu& &cflags& -o pp_sys&s&
152 &if (command_status) ^= 0 &then &return
153 !&compiler& <<regcomp.c &diag& &cpu& &cflags& -o regcomp&s&
154 &if (command_status) ^= 0 &then &return
155 !&compiler& <<regexec.c &diag& &cpu& &cflags& -o regexec&s&
156 &if (command_status) ^= 0 &then &return
157 !&compiler& <<run.c &diag& &cpu& &cflags& -o run&s&
158 &if (command_status) ^= 0 &then &return
159 !&compiler& <<scope.c &diag& &cpu& &cflags& -o scope&s&
160 &if (command_status) ^= 0 &then &return
161 !&compiler& <<sv.c &diag& &cpu& &cflags& -o sv&s&
162 &if (command_status) ^= 0 &then &return
163 !&compiler& <<taint.c &diag& &cpu& &cflags& -o taint&s&
164 &if (command_status) ^= 0 &then &return
165 !&compiler& <<toke.c &diag& &cpu& &cflags& -o toke&s&
166 &if (command_status) ^= 0 &then &return
167 !&compiler& <<universal.c &diag& &cpu& &cflags& -o universal&s&
168 &if (command_status) ^= 0 &then &return
169 !&compiler& <<utf8.c &diag& &cpu& &cflags& -o utf8&s&
170 &if (command_status) ^= 0 &then &return
171 !&compiler& <<util.c &diag& &cpu& &cflags& -o util&s&
172 &if (command_status) ^= 0 &then &return
173 !&compiler& <<xsutils.c &diag& &cpu& &cflags& -o xsutils&s&
174 &if (command_status) ^= 0 &then &return
175 &if &version& = alpha
177 !&compiler& <vos_dummies.c &cpu& -O4 -o vos_dummies&s&
178 &if (command_status) ^= 0 &then &return
184 !ar rc perl.a av.o deb.o doio.o doop.o dump.o globals.o gv.o hv.o mg.o &+
185 op.o perl.o perlapi.o perlio.o perly.o pp.o pp_ctl.o pp_hot.o pp_sys.o &+
186 regcomp.o regexec.o run.o scope.o sv.o taint.o toke.o universal.o utf8.o &+
190 !&compiler& <<miniperlmain.c &diag& &cpu& &cflags& -o miniperlmain&s&
191 &if (command_status) ^= 0 &then &return
194 & If requested, bind the executable program module.
200 &if (exists -directory (master_disk)>system>tcp_os>object_library&obj2&)
201 &then &set_string tcp_objlib (master_disk)>system>tcp_os>object_library&obj2&
202 &else &set_string tcp_objlib (master_disk)>system>tcp_os>object_library
204 &if (exists -directory (master_disk)>system>stcp>object_library&obj2&)
205 &then &set_string stcp_objlib (master_disk)>system>stcp>object_library&obj2&
206 &else &set_string stcp_objlib (master_disk)>system>stcp>object_library
208 &if (exists -directory (master_disk)>system>object_library&obj2&)
209 &then &set_string objlib (master_disk)>system>object_library&obj2&
210 &else &set_string objlib (master_disk)>system>object_library
212 &if (exists -directory (master_disk)>system>c_object_library&obj2&)
213 &then &set_string c_objlib (master_disk)>system>c_object_library&obj2&
214 &else &set_string c_objlib (master_disk)>system>c_object_library
216 &if (exists -directory (master_disk)>system>posix_object_library&obj2&)
217 &then &set_string posix_objlib (master_disk)>system>posix_object_library&obj2&
218 &else &set_string posix_objlib (master_disk)>system>posix_object_library
220 &if &version& = alpha
221 &then !set_library_paths object . &tcp_objlib& &+
222 &POSIX&>c>sysv_runtime>obj&obj& &+
223 &POSIX&>c>runtime>obj&obj& &+
225 &else !set_library_paths object . &stcp_objlib& &+
226 &stcp_objlib&>common &+
228 &stcp_objlib&>sbsd &+
229 &stcp_objlib&>socket &+
230 &posix_objlib&>bsd &+
235 &set_string cflags (before &$cflags& -c)
236 !&compiler& <<miniperlmain.c perl.a &diag& &cpu& &cflags& -o perl.pm
237 &if (command_status) ^= 0 &then &return
241 &if &version& = alpha
242 &then !bind -control <perl.bind vos_dummies &+
243 &tcp_objlib&>tcp_runtime &tcp_objlib&>tcp_gethost &+
244 &cpu& -target_module &tgt_mod& -map
245 &else !bind -control <perl.bind &cpu& -target_module &tgt_mod& -map
246 &if (command_status) ^= 0 &then &return
248 !delete_file *&s& -no_ask -brief
249 !unlink *&s& -no_ask -brief