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