Commit | Line | Data |
495c5fdc |
1 | &begin_parameters |
2 | cpu option(-processor)name,allow(mc68020,i80860,pa7100,pa8000),=mc68020 |
3 | recompile switch(-recompile),=1 |
4 | rebind switch(-rebind),=1 |
5 | &end_parameters |
6 | &echo command_lines |
7 | & |
8 | & This is a VOS command macro to build Perl 5 for the Stratus VOS |
9 | & operating system. You need to have the VOS POSIX.1 support |
10 | & loaded on your system. Change the following statement, if |
11 | & necessary, to assign the correct pathname of the directory that |
12 | & contains VOS POSIX.1 support. |
13 | & |
14 | &set_string POSIX >vos_ftp_site>pub>vos>alpha>posix |
15 | & |
16 | & See if the site has VOS POSIX.1 support loaded. If not, quit now. |
17 | & |
18 | &if ^ (exists &POSIX& -directory) |
19 | &then &do |
20 | &display_line build: VOS POSIX.1 support not found. &POSIX& |
21 | &return |
22 | &end |
23 | & |
24 | & Set up the appropriate directory suffix for each architecture. |
25 | & |
26 | &if &cpu& = mc68020 |
27 | &then &set_string obj '' |
28 | &if &cpu& = i80860 |
29 | &then &set_string obj .860 |
30 | &if &cpu& = pa7100 |
31 | &then &set_string obj .7100 |
32 | &if &cpu& = pa8000 |
33 | &then &set_string obj .8000 |
34 | & |
cb50131a |
35 | &if &cpu& = mc68020 |
36 | &then &set_string obj2 .68k |
37 | &else &set_string obj2 &obj& |
38 | & |
495c5fdc |
39 | &set_string cpu -processor &cpu& |
40 | & |
41 | & If requested, compile the source code. |
42 | & |
43 | &if &recompile& = 0 |
44 | &then &goto CHECK_REBIND |
45 | & |
cb50131a |
46 | !set_library_paths include << < &POSIX&>incl &+ |
495c5fdc |
47 | (master_disk)>system>include_library |
48 | & |
cb50131a |
49 | &if (exists *.obj -link) |
50 | &then !unlink *.obj -no_ask -brief |
51 | & |
495c5fdc |
52 | & Suppress several harmless compiler warning and advice messages. |
cb50131a |
53 | & Use -list -show_include all -show_macros both_ways when debugging. |
495c5fdc |
54 | & |
cb50131a |
55 | &set_string cflags '-u -O4 -D_POSIX_C_SOURCE=199309L -DPERL_CORE' |
56 | & |
57 | !cc <<av.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc |
58 | &if (command_status) ^= 0 &then &return |
cb50131a |
59 | !cc <<deb.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
60 | &if (command_status) ^= 0 &then &return |
cb50131a |
61 | !cc <<doio.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
62 | &if (command_status) ^= 0 &then &return |
cb50131a |
63 | !cc <<doop.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
64 | &if (command_status) ^= 0 &then &return |
cb50131a |
65 | !cc <<dump.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
66 | &if (command_status) ^= 0 &then &return |
cb50131a |
67 | !cc <<ebcdic.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
68 | &if (command_status) ^= 0 &then &return |
cb50131a |
69 | !cc <<globals.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
70 | &if (command_status) ^= 0 &then &return |
cb50131a |
71 | !cc <<gv.c -suppress_diag 2006 2065 &cpu& &cflags& |
495c5fdc |
72 | &if (command_status) ^= 0 &then &return |
cb50131a |
73 | !cc <<hv.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
74 | &if (command_status) ^= 0 &then &return |
cb50131a |
75 | & !cc <<malloc.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
76 | & &if (command_status) ^= 0 &then &return |
cb50131a |
77 | !cc <<mg.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
78 | &if (command_status) ^= 0 &then &return |
79 | !cc <<miniperlmain.c -suppress_diag 2006 &cpu& &cflags& |
80 | &if (command_status) ^= 0 &then &return |
81 | !cc <<op.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
82 | &if (command_status) ^= 0 &then &return |
83 | !cc <<perl.c -suppress_diag 2006 2053 2065 &cpu& &cflags& &+ |
84 | -DARCHLIB="/system/ported/perl/lib/5.005&obj2&" &+ |
85 | -DARCHLIB_EXP="/system/ported/perl/lib/5.005&obj2&" &+ |
86 | -DSITEARCH="/system/ported/perl/lib/site/5.005&obj2&" &+ |
87 | -DSITEARCH_EXP="/system/ported/perl/lib/site/5.005&obj2&" |
495c5fdc |
88 | &if (command_status) ^= 0 &then &return |
cb50131a |
89 | !cc <<perlapi.c &cpu& &cflags& |
495c5fdc |
90 | &if (command_status) ^= 0 &then &return |
cb50131a |
91 | !cc <<perlio.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
92 | &if (command_status) ^= 0 &then &return |
cb50131a |
93 | !cc <<perly.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
94 | &if (command_status) ^= 0 &then &return |
cb50131a |
95 | & compiling pp.c for the PA-RISC hits compiler bug pcg-98; avoid it. |
96 | & The bug is fixed in VOS 14.1.0 and all later releases. |
97 | &if (index (string &cpu&) pa) > 0 & (module_info os_release) < 'VOS Release 14.1.0' |
98 | &then !cc <<pp.c -suppress_diag 2006 2064 2065 &cpu& &cflags& -no_schedule |
99 | &else !cc <<pp.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc |
100 | &if (command_status) ^= 0 &then &return |
cb50131a |
101 | !cc <<pp_ctl.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc |
102 | &if (command_status) ^= 0 &then &return |
cb50131a |
103 | !cc <<pp_hot.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc |
104 | &if (command_status) ^= 0 &then &return |
cb50131a |
105 | !cc <<pp_sys.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc |
106 | &if (command_status) ^= 0 &then &return |
cb50131a |
107 | !cc <<regcomp.c -suppress_diag 2006 2064 &cpu& &cflags& |
495c5fdc |
108 | &if (command_status) ^= 0 &then &return |
cb50131a |
109 | !cc <<regexec.c -suppress_diag 2006 2064 &cpu& &cflags& |
495c5fdc |
110 | &if (command_status) ^= 0 &then &return |
cb50131a |
111 | !cc <<run.c -suppress_diag 2006 2065 &cpu& &cflags& |
495c5fdc |
112 | &if (command_status) ^= 0 &then &return |
cb50131a |
113 | !cc <<scope.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc |
114 | &if (command_status) ^= 0 &then &return |
cb50131a |
115 | !cc <<sv.c -suppress_diag 2006 2065 &cpu& &cflags& |
495c5fdc |
116 | &if (command_status) ^= 0 &then &return |
cb50131a |
117 | !cc <<taint.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
118 | &if (command_status) ^= 0 &then &return |
cb50131a |
119 | !cc <<toke.c -suppress_diag 2006 2064 2065 &cpu& &cflags& |
495c5fdc |
120 | &if (command_status) ^= 0 &then &return |
cb50131a |
121 | !cc <<universal.c -suppress_diag 2006 &cpu& &cflags& |
495c5fdc |
122 | &if (command_status) ^= 0 &then &return |
cb50131a |
123 | !cc <<utf8.c -suppress_diag 2065 &cpu& &cflags& |
495c5fdc |
124 | &if (command_status) ^= 0 &then &return |
cb50131a |
125 | !cc <<util.c -suppress_diag 2006 2065 &cpu& &cflags& |
495c5fdc |
126 | &if (command_status) ^= 0 &then &return |
cb50131a |
127 | !cc <<xsutils.c &cpu& &cflags& |
495c5fdc |
128 | &if (command_status) ^= 0 &then &return |
129 | !cc <vos_dummies.c &cpu& -O4 |
130 | &if (command_status) ^= 0 &then &return |
131 | & |
132 | & If requested, bind the executable program module. |
133 | & |
134 | &label CHECK_REBIND |
135 | &if &rebind& = 0 |
136 | &then &return |
137 | & |
cb50131a |
138 | &if (exists -directory (master_disk)>system>tcp_os>object_library&obj2&) |
139 | &then &set_string tcp_objlib (master_disk)>system>tcp_os>object_library&obj2& |
495c5fdc |
140 | &else &set_string tcp_objlib (master_disk)>system>tcp_os>object_library |
141 | & |
cb50131a |
142 | &if (exists -directory (master_disk)>system>object_library&obj2&) |
143 | &then &set_string objlib (master_disk)>system>object_library&obj2& |
495c5fdc |
144 | &else &set_string objlib (master_disk)>system>object_library |
145 | & |
cb50131a |
146 | &if (exists -directory (master_disk)>system>c_object_library&obj2&) |
147 | &then &set_string c_objlib (master_disk)>system>c_object_library&obj2& |
495c5fdc |
148 | &else &set_string c_objlib (master_disk)>system>c_object_library |
149 | & |
150 | !set_library_paths object . &+ |
151 | &POSIX&>c>runtime>obj&obj& &+ |
152 | &POSIX&>c>sysv_runtime>obj&obj& &+ |
153 | &tcp_objlib& &objlib& &c_objlib& |
154 | !bind -control <perl.bind &cpu& -map |
155 | &if (command_status) ^= 0 &then &return |
156 | !delete_file *.obj -no_ask -brief |
157 | !unlink *.obj -no_ask -brief |