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
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.
17 &then &set_string POSIX >vos_ftp_site>pub>vos>alpha>posix
18 &else &set_string POSIX >system>posix_object_library
20 & See if the site has VOS POSIX.1 support loaded. If not, quit now.
22 &if ^ (exists &POSIX& -directory)
24 &display_line build: VOS POSIX.1 support not found. &POSIX&
28 &if &cpu& = mc68020 & &version& = ga | &cpu& = i80860 & &version& = ga
30 &display_line build: "-version ga" is incompatible with "-processor mc68020 or i80860"
34 & Set up the appropriate directory suffix for each architecture.
37 &then &set_string obj ''
39 &then &set_string obj .860
41 &then &set_string obj .7100
43 &then &set_string obj .8000
46 &then &set_string obj2 .68k
47 &else &set_string obj2 &obj&
49 &set_string cpu -processor &cpu&
51 & If requested, compile the source code.
54 &then &goto CHECK_REBIND
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 &+
61 (master_disk)>system>include_library
63 &if (exists *.obj -link)
64 &then !unlink *.obj -no_ask -brief
66 & Suppress several harmless compiler warning and advice messages.
67 & Use -list -show_include all -show_macros both_ways when debugging.
69 &set_string cflags '-u -O4 -D_POSIX_C_SOURCE=199506L -DPERL_CORE'
71 & The following is a work-around for stcp-1437,8,9
74 &then &set_string cflags &cflags& -D_BSD_SOURCE
76 !cc <<av.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
77 &if (command_status) ^= 0 &then &return
78 !cc <<deb.c -suppress_diag 2006 &cpu& &cflags&
79 &if (command_status) ^= 0 &then &return
80 !cc <<doio.c -suppress_diag 2006 &cpu& &cflags&
81 &if (command_status) ^= 0 &then &return
82 !cc <<doop.c -suppress_diag 2006 &cpu& &cflags&
83 &if (command_status) ^= 0 &then &return
84 !cc <<dump.c -suppress_diag 2006 &cpu& &cflags&
85 &if (command_status) ^= 0 &then &return
86 !cc <<ebcdic.c -suppress_diag 2006 &cpu& &cflags&
87 &if (command_status) ^= 0 &then &return
88 !cc <<globals.c -suppress_diag 2006 &cpu& &cflags&
89 &if (command_status) ^= 0 &then &return
90 !cc <<gv.c -suppress_diag 2006 2065 &cpu& &cflags&
91 &if (command_status) ^= 0 &then &return
92 !cc <<hv.c -suppress_diag 2006 &cpu& &cflags&
93 &if (command_status) ^= 0 &then &return
94 & !cc <<malloc.c -suppress_diag 2006 &cpu& &cflags&
95 & &if (command_status) ^= 0 &then &return
96 !cc <<mg.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
97 &if (command_status) ^= 0 &then &return
98 !cc <<miniperlmain.c -suppress_diag 2006 2065 &cpu& &cflags&
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
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.
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
111 & &if (command_status) ^= 0 &then &return
113 !cc <<perl.c -suppress_diag 2006 2053 2065 &cpu& &cflags& &+
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&"
118 &if (command_status) ^= 0 &then &return
119 !cc <<perlapi.c &cpu& &cflags&
120 &if (command_status) ^= 0 &then &return
121 !cc <<perlio.c -suppress_diag 2006 &cpu& &cflags&
122 &if (command_status) ^= 0 &then &return
123 !cc <<perly.c -suppress_diag 2006 &cpu& &cflags&
124 &if (command_status) ^= 0 &then &return
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&
130 &if (command_status) ^= 0 &then &return
131 !cc <<pp_ctl.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
132 &if (command_status) ^= 0 &then &return
133 !cc <<pp_hot.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
134 &if (command_status) ^= 0 &then &return
135 !cc <<pp_sys.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
136 &if (command_status) ^= 0 &then &return
137 !cc <<regcomp.c -suppress_diag 2006 2064 &cpu& &cflags&
138 &if (command_status) ^= 0 &then &return
139 !cc <<regexec.c -suppress_diag 2006 2064 &cpu& &cflags&
140 &if (command_status) ^= 0 &then &return
141 !cc <<run.c -suppress_diag 2006 2065 &cpu& &cflags&
142 &if (command_status) ^= 0 &then &return
143 !cc <<scope.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
144 &if (command_status) ^= 0 &then &return
145 !cc <<sv.c -suppress_diag 2006 2065 &cpu& &cflags&
146 &if (command_status) ^= 0 &then &return
147 !cc <<taint.c -suppress_diag 2006 &cpu& &cflags&
148 &if (command_status) ^= 0 &then &return
149 !cc <<toke.c -suppress_diag 2006 2064 2065 &cpu& &cflags&
150 &if (command_status) ^= 0 &then &return
151 !cc <<universal.c -suppress_diag 2006 &cpu& &cflags&
152 &if (command_status) ^= 0 &then &return
153 !cc <<utf8.c -suppress_diag 2065 &cpu& &cflags&
154 &if (command_status) ^= 0 &then &return
155 !cc <<util.c -suppress_diag 2006 2065 &cpu& &cflags&
156 &if (command_status) ^= 0 &then &return
157 !cc <<xsutils.c &cpu& &cflags&
158 &if (command_status) ^= 0 &then &return
159 &if &version& = alpha
161 !cc <vos_dummies.c &cpu& -O4
162 &if (command_status) ^= 0 &then &return
165 & If requested, bind the executable program module.
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&
173 &else &set_string tcp_objlib (master_disk)>system>tcp_os>object_library
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
179 &if (exists -directory (master_disk)>system>object_library&obj2&)
180 &then &set_string objlib (master_disk)>system>object_library&obj2&
181 &else &set_string objlib (master_disk)>system>object_library
183 &if (exists -directory (master_disk)>system>c_object_library&obj2&)
184 &then &set_string c_objlib (master_disk)>system>c_object_library&obj2&
185 &else &set_string c_objlib (master_disk)>system>c_object_library
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
191 &if &version& = alpha
192 &then !set_library_paths object . &tcp_objlib& &+
193 &POSIX&>c>sysv_runtime>obj&obj& &+
194 &POSIX&>c>runtime>obj&obj& &+
196 &else !set_library_paths object . &stcp_objlib& &+
197 &stcp_objlib&>common &+
199 &stcp_objlib&>sbsd &+
200 &stcp_objlib&>socket &+
201 &posix_objlib&>bsd &+
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
209 &if (command_status) ^= 0 &then &return
210 !delete_file *.obj -no_ask -brief
211 !unlink *.obj -no_ask -brief