Debian Codegraph @

vms/gawk_build_steps.txt

raw
1 From File: gawk_build_steps.txt
2
3 Building GAWK on OpenVMS for use with GNV requires a current HP C compiler
4 and MMK.
5
6 The HP C 7.x compilers were used for building on Alpha and Itanium.
7 The Compaq C 6.4 compiler is being used on VAX.
8
9 MMK was obtained from https://github.com/endlesssoftware/mmk
10
11 Several special things were done in this port of Gawk to VMS to make it
12 easier to keep it up to date with the Unix version.
13
14 Note the GNV$ prefix is registered for the GNV project to prevent name
15 collisions with other products and packages. This is a VMS convention.
16
17 The files are stored with GNV_ instead of GNV$ most open source source
18 code maintainers do not want to files with $ in their source repositories.
19
20 The build procedure will copy the files to have the GNV$ names as needed.
21
22 1. The original GNU Gawk source files are in their own directory tree which
23 is never written to by the build process. This directory is kept up to date
24 with the current official patches. See below about the how this is done
25 with logical names.
26
27 2. A file vms_eco_level.h is used to set the ECO of the package. The
28 vms_eco_level.h needs to be set back to zero if the version or patch level
29 of the GNU Unix source is changed. This file is currently only used
30 by the kit building procedure.
31
32 The source kits are provided in backup savesets inside of the PCSI install kit.
33
34 Backup save sets are currently the only distribution medium that I can be
35 sure is installed on a target VMS system that will correctly unpack files
36 with extended character sets in them. You may need to adjust the ownership
37 of the restored files for kits on Alpha/Itanium VMS versions 8.1 and earlier.
38
39 On VAX, the filenames will be as seen on the VAX system, typically with non
40 ODS-2 characters and case changes prefixed with $ characters.
41
42 [gnv.common_src]gawk_*_original_src.bck is the original source of the
43 gawk kit as provided by the GNV project.
44 [gnv.vms_src]gawk-*_vms_src.bck, if present, has the changed files that
45 are used for building that are not yet in the gawk source kits
46 distributed by the GNU gawk project.
47
48 These backup savesets should be restored to different directory trees on
49 an ODS-5 volume(s) which are referenced by concealed rooted logical names,
50 unless on VAX, where either an NFS or ODS-2 volume can be used.
51
52 SRC_ROOT: is for the source files common to all platforms. This can be a
53 read only copy of the files from a change control repository.
54
55 In my build environment, the TRUNK_ROOT:[gawk] is the
56 same directory as src_root:[gawk]. TRUNK_ROOT:[gawk] is a
57 checkout of the gawk repository used for the build.
58
59 VMS_ROOT: is for the files that were changed from the repository copy of
60 SRC_ROOT:
61
62 Note, you should create the VMS_ROOT: directory tree even if it is
63 initially empty. This is where you should put edits if you are
64 making changes.
65
66 In my build environment, the source_root:[gnu_vms.gawk] is a
67 directory with the checked out code and vms_root:[gawk] is
68 a copy with any local modifications.
69
70 The command procedure compare_gawk_source.com will report any
71 differences in the source_root:[gnu_vms.gawk] directory and the
72 vms_root:[gawk] directory. If the source_root: logical is not
73 defined, it will translate the logical name src_root to do the
74 effective of src_root:[gawk.-.-.gnu_vms.gawk] to find the
75 VMS specific code CVS checkout based on where the checkout for
76 the GNU source is expected to be.
77
78 LCL_ROOT: is manually created to have the same base and sub-directories as
79 SRC_ROOT: and VMS_ROOT: This is for the architecture specific
80 binaries and other files created during the build.
81
82 The logical name REF_ROOT: is optionally defined to be a logical name that
83 is a search list for VMS_ROOT:,SRC_ROOT:
84
85 The logical name PRJ_ROOT: is defined to be a logical name that is a search
86 list for LCL_ROOT:,REF_ROOT:
87
88 The VMS_ROOT and LCL_ROOT directory trees can be created with commands
89 similar to:
90
91 $ create/dir lcl_root:[gawk]/prot=w:re
92 $ copy src_root:[gawk...]*.dir -
93 lcl_root:[gawk...]/prot=(o:rwed,w:re)
94 $ create/dir vms_root:[gawk]/prot=w:re
95 $ copy src_root:[gawk...]*.dir -
96 vms_root:[gawk...]/prot=(o:rwed,w:re)
97
98 One of the ways with to protect the source from being modified is to have
99 the directories under src_root: owned by a user or resource where the build
100 username only has read access to it.
101
102 Edit the file gawk_release_note_start.txt or other text files to reflect
103 any changes.
104
105 Edit the file PCSI_GAWK_FILE_LIST.TXT if there are new files added to the
106 kit. These files should all be ODS-2 legal filenames and directories.
107
108 Note that if src_root: or vms_root: are NFS mounted disks, the
109 step of backing up the source files will probably hang or fail.
110
111 You need to copy the source files to VMS mounted disks and create
112 logical names SRC_ROOT1 and VMS_ROOT1 to work around this to to
113 reference local disks. Make sure src_root1:[000000] and
114 vms_root1:[000000] exist and can be written to.
115
116 The command procedure compare_gawk_source can be used to check
117 those directories and keep them up to date.
118
119 @[.vms]compare_gawk_source.com SRCBCK UPDATE
120
121 This compares the reference GNU source with the backup
122 staging directory for it and updates with any changes.
123
124 @[.vms]compare_gawk_source.com VMSBCK UPDATE
125
126 This compares the VMS specific source with the backup
127 staging directory for it and updates with any changes.
128
129 Leave off "UPDATE" to just check without doing any changes.
130
131 If you are not using NFS mounted disks and do not want to have a
132 separate directory for staging the sources for backup make sure
133 that src_root1: and vms_root1: do not exist.
134
135 The kits will be built in the directory STAGE_ROOT:[KIT], which must be
136 writable to the build procedure.
137
138 Define the logical name GNV_PCSI_PRODUCER to indicate who is making the
139 distribution.
140
141 Define the logical name GNV_PCSI_PRODUCER_FULL_NAME to be your full name
142 or full name of your company.
143
144 These two GNV_PCSI_* logical names need to be manually defined to indicate
145 the "branding" to differentiate the source of the kit.
146
147 A limitation of the PCSI kitting procedure is that when selecting files, it
148 tends to ignore the directory structure and assumes that all files with the
149 same name are the same file, so every file placed in the kit must have a
150 unique ODS-2 legal name. Then a procedure needs to be added to the kit to
151 create an alias link on install and remove the link on remove.
152
153 While newer versions of PCSI can support ODS-5 filenames, not all verions
154 of PCSI on systems that have ODS-5 filenames do. So as a post install step,
155 the PCSI kit built by these steps does a rename to the correct case.
156
157 With these search lists set up and the logical names described, Gawk can
158 be built and kitted by setting your default to PRJ_ROOT:[gawk]
159 and then issuing the command:
160
161 $ @[.vms]pcsi_product_gawk.com
162
163 First it will build the binaries by using MMK utility. The case of the
164 parameter may be significant on ODS-5.
165
166 $ mmk/descrip=[.vms]descrip.mms gawk
167
168 Then for Alpha and Itanium, it will build the dynamic extensions.
169
170 $ mmk/descrip=[.vms]descrip.mms extensions
171
172 To clean up after a build to start over, run mmk with the target spotless.
173
174 $ mmk/descrip=[.vms]descrip.mms spotless
175
176 The files are installed into a NEW_GNU directory for staging by running the
177 procedure stage_gawk_install.com. This copies the binaries and creates
178 alias links to them.
179
180 $ @[.vms]stage_gawk_install.com remove
181 $ @[.vms]stage_gawk_install.com
182
183 On the VAX platform, the staged files are needed for building the PCSI
184 kit, as the VAX source was staged on an NFS volume, which encodes the
185 filenames that have any upper case or special symbols in them.
186
187 To remove the staged files, the procedure is run again with the parameter
188 "REMOVE". This makes sure that the alias links are removed.
189
190 The names and contents of the PCSI files requires that the version of
191 gawk be encoded in a special format. This is done by:
192
193 @[.vms]make_pcsi_gawk_kit_name.com
194
195 The release notes are built from the release note start, readme files and
196 this file:
197
198 @[.release]build_gawk_release_notes.com
199
200 Then the backup the source kits.
201
202 Building a PCSI kit for an architecture takes the following steps after
203 making sure that you have a working build environment.
204
205 On VAX, the product command always prompts to the terminal for a confirmation.
206
207 If there is another kit for this same version of gawk, but for a different
208 base platform or operating system version, the product command will prompt
209 to the terminal to select which one to compress.
210
211 The following message is normal:
212 %PCSI-I-CANNOTVAL, cannot validate
213 EAGLE$DQA0:[stage_root.][kit]GNV-AXPVMS-GAWK-V--1.PCSI;1
214 -PCSI-I-NOTSIGNED, product kit is not signed and therefore has
215 no manifest file
216
217 This will result in both compressed and uncompressed kits for the target
218 platform.
219
220 Good Luck.