1 | This is the VMS version of GNU Make, updated by Hartmut Becker
|
---|
2 |
|
---|
3 | Changes are based on GNU make 3.82.
|
---|
4 |
|
---|
5 | This version was built and tested on OpenVMS V7.3 (VAX), V7.3-2 (Alpha) and
|
---|
6 | V8.3-1H1 (I64).
|
---|
7 |
|
---|
8 | Build instructions
|
---|
9 | Make a 1st version
|
---|
10 | $ @makefile.com ! ignore any compiler and/or linker warning
|
---|
11 | $ rena make.exe 1st-make.exe
|
---|
12 | Use the 1st version to generate a 2nd version
|
---|
13 | $ mc sys$disk:[]1st-make clean
|
---|
14 | $ mc sys$disk:[]1st-make
|
---|
15 | Verify your 2nd version
|
---|
16 | $ rena make.exe 2nd-make.exe
|
---|
17 | $ mc sys$disk:[]2nd-make clean
|
---|
18 | $ mc sys$disk:[]2nd-make
|
---|
19 |
|
---|
20 | Changes (3.81.90)
|
---|
21 |
|
---|
22 | Michael Gehre (at VISTEC-SEMI dot COM) supplied a fix for a problem with
|
---|
23 | timestamps of object modules in OLBs. The timestamps were not correctly
|
---|
24 | adjusted to GMT based time, if the local VMS time was using a daylight saving
|
---|
25 | algorithm and if daylight saving was switched off.
|
---|
26 |
|
---|
27 | John Eisenbraun (at HP dot COM) supplied fixes and and an enhancement to append
|
---|
28 | output redirection in action lines.
|
---|
29 |
|
---|
30 | Rework of ctrl+c and ctrl+y handling.
|
---|
31 |
|
---|
32 | Fix a problem with cached strings, which showed on case-insensitive file
|
---|
33 | systems.
|
---|
34 |
|
---|
35 | Build fixes for const-ified code in VMS specific sources.
|
---|
36 |
|
---|
37 | Build notes:
|
---|
38 | - Try to avoid HP C V7.2-001, which has an incompatible change
|
---|
39 | how __STDC__ is defined. This results at least in compile time warnings.
|
---|
40 |
|
---|
41 | - On V8.3-1H1, if you press Ctrl+C you may see a traceback, starting with
|
---|
42 | %SYSTEM-F-CONTROLC, operation completed under CTRL/C
|
---|
43 | %TRACE-F-TRACEBACK, symbolic stack dump follows
|
---|
44 | image module routine line rel PC abs PC
|
---|
45 |
|
---|
46 | DECC$SHR C$SIGNAL gsignal 27991 0000000000001180
|
---|
47 | FFFFFFFF84AB2DA0
|
---|
48 | DECC$SHR C$SIGNAL raise 28048 0000000000001280
|
---|
49 | FFFFFFFF84AB2EA0
|
---|
50 | DECC$SHR C$SIGPENDING decc$$deliver_signals
|
---|
51 | 12475 0000000000000890
|
---|
52 | FFFFFFFF84C13690
|
---|
53 | ...
|
---|
54 | This looks like an incompatibility to the Alpha and VAX behavior, so it looks
|
---|
55 | like a problem in I64 VMS version(s).
|
---|
56 |
|
---|
57 | - There is no clean build on VAX. In the environment I tested, I had to use GNU
|
---|
58 | make's alloca which produced a couple of compile time warnings. It seems too
|
---|
59 | much effort to work on a clean build on VAX.
|
---|
60 |
|
---|
61 | A note on appending the redirected output. With this change, a simple mechanism
|
---|
62 | is implemented to make ">>" work in action lines. In VMS there is no simple
|
---|
63 | feature like ">>" to have DCL command or program output redirected and appended
|
---|
64 | to a file. GNU make for VMS already implements the redirection of output. If
|
---|
65 | such a redirection is detected, an ">" on the action line, GNU make creates a
|
---|
66 | DCL command procedure to execute the action and to redirect its output. Based
|
---|
67 | on that, now ">>" is also recognized and a similar but different command
|
---|
68 | procedure is created to implement the append. The main idea here is to create a
|
---|
69 | temporary file which collects the output and which is appended to the wanted
|
---|
70 | output file. Then the temporary file is deleted. This is all done in the
|
---|
71 | command procedure to keep changes in make small and simple. This obviously has
|
---|
72 | some limitations but it seems good enough compared with the current ">"
|
---|
73 | implementation. (And in my opinion, redirection is not really what GNU make has
|
---|
74 | to do.) With this approach, it may happen that the temporary file is not yet
|
---|
75 | appended and is left in SYS$SCRATCH. The temporary file names look like
|
---|
76 | "CMDxxxxx.". Any time the created command procedure can not complete, this
|
---|
77 | happens. Pressing Ctrl+Y to abort make is one case. In case of Ctrl+Y the
|
---|
78 | associated command procedure is left in SYS$SCRATCH as well. Its name is
|
---|
79 | CMDxxxxx.COM.
|
---|
80 |
|
---|
81 | Change in the Ctrl+Y handling
|
---|
82 |
|
---|
83 | Ctrl+Y was: The CtrlY handler called $forcex for the current child.
|
---|
84 |
|
---|
85 | Ctrl+Y changed: The CtrlY handler uses $delprc to delete all children. This way
|
---|
86 | also actions with DCL commands will be stopped. As before Ctrl+Y then sends
|
---|
87 | SIGQUIT to itself, which is handled in common code.
|
---|
88 |
|
---|
89 | Change in deleteing temporary command files
|
---|
90 |
|
---|
91 | Temporary command files were deleted in the main line, after returning from the
|
---|
92 | vms child termination handler. If Ctrl+C was pressed, the handler is called but
|
---|
93 | did not return to main line.
|
---|
94 |
|
---|
95 | Now, temporary command files are deleted in the vms child termination
|
---|
96 | handler. That deletes the them even if a Ctrl+C was pressed.
|
---|
97 |
|
---|
98 | The behavior of pressing Ctrl+C is not changed. It still has only an effect,
|
---|
99 | after the current action is terminated. If that doesn't happen or takes too
|
---|
100 | long, Ctrl+Y should be used instead.
|
---|
101 | |
---|
102 |
|
---|
103 | Changes (3.80)
|
---|
104 |
|
---|
105 | . In default.c define variable ARCH as IA64 for VMS on Itanium systems.
|
---|
106 |
|
---|
107 | . In makefile.vms avoid name collision for glob and globfree.
|
---|
108 |
|
---|
109 | In newer version of the VMS CRTL there are glob and globfree implemented.
|
---|
110 | Compiling and linking may result in
|
---|
111 |
|
---|
112 | %ILINK-W-MULDEFLNKG, symbol DECC$GLOBFREE has subsequent linkage definition
|
---|
113 | in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
|
---|
114 | %ILINK-W-MULDEF, symbol DECC$GLOBFREE multiply defined
|
---|
115 | in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
|
---|
116 |
|
---|
117 | linker messages (and similar for DECC$GLOB). The messages just say, that
|
---|
118 | globfree is a known CRTL whose name was mapped by the compiler to
|
---|
119 | DECC$GLOBFREE. This is done in glob.c as well, so this name is defined
|
---|
120 | twice. One possible solution is to use the VMS versions of glob and
|
---|
121 | globfree. However, then the build environment needs to figure out if
|
---|
122 | there is a new CRTL supporting these or not. This adds complexity. Even
|
---|
123 | more, these functions return VMS file specifications, which is not
|
---|
124 | expected by the other make sources. There is a switch at run time (a VMS
|
---|
125 | logical DECC$GLOB_UNIX_STYLE), which can be set to get Unix style
|
---|
126 | names. This may conflict with other software. The recommended solution
|
---|
127 | for this is to set this switch just prior to calling main: in an
|
---|
128 | initialization routine. This adds more complexity and more VMS specific
|
---|
129 | code. It is easier to tell the compiler NOT to map the routine names
|
---|
130 | with a simple change in makefile.vms.
|
---|
131 |
|
---|
132 | Some notes on case sensitive names in rules and on the disk. In the VMS
|
---|
133 | template for CONFIG.H case sensitive rules can be enabled with defining
|
---|
134 | WANT_CASE_SENSITIVE_TARGETS. For recent version of VMS there is a case
|
---|
135 | sensitive file system: ODS5. To make use of that, additionally un-defining
|
---|
136 | the HAVE_CASE_INSENSITIVE_FS is required. As these are C macros, different
|
---|
137 | versions of make need to be built to have any case sensitivity for VMS
|
---|
138 | working. Unfortunately, for ODS5 disks that's not all.
|
---|
139 |
|
---|
140 | - Usually DCL upcases command line tokens (except strings) and usually the
|
---|
141 | file system is case blind (similar to how Windows systems work)
|
---|
142 | $ set proc/parse=extended/case=sensitive
|
---|
143 | preserves lower and UPPER on the command line and (for this process and all
|
---|
144 | sub-processes) enables case sensitivity in the file system
|
---|
145 |
|
---|
146 | - Usually the CRTL tries to reverse what DCL did with command line tokens, it
|
---|
147 | lowercases all tokens (except strings)
|
---|
148 | $ define DECC$ARGV_PARSE_STYLE enable
|
---|
149 | passes (the now preserved) lower and UPPER from the command line to main()
|
---|
150 |
|
---|
151 | - Usually the CRTL upcases the arguments to open() and friends
|
---|
152 | $ define DECC$EFS_CASE_PRESERVE enable
|
---|
153 | preserves the names as is.
|
---|
154 |
|
---|
155 | It is important to know that not all VMS tools are ready for case sensitivity.
|
---|
156 | With this setup some tools may not work as expected. The setup should not
|
---|
157 | blindly be applied for all users in default login procedures.
|
---|
158 |
|
---|
159 | Example? The poor coding gives a compiler message, showing that there are
|
---|
160 | different files:
|
---|
161 |
|
---|
162 | $ dir
|
---|
163 |
|
---|
164 | Directory ODS5DISK[HB]
|
---|
165 |
|
---|
166 | A.c;1 B.c;1 c.c;1 X.c;1
|
---|
167 | x.c;1
|
---|
168 |
|
---|
169 | Total of 5 files.
|
---|
170 | $ ods5make x.obj
|
---|
171 | cc /obj=x.obj x.c
|
---|
172 |
|
---|
173 | foo(){lowercase_x();}
|
---|
174 | ......^
|
---|
175 | %CC-I-IMPLICITFUNC, In this statement, the identifier "lowercase_x" is implicitly declared as a function.
|
---|
176 | at line number 1 in file ODS5DISK[HB]x.c;1
|
---|
177 | $ mc SYS$SYSDEVICE:[HARTMUT.MAKE_3_80P]ods5make X.obj
|
---|
178 | cc /obj=X.obj X.c
|
---|
179 |
|
---|
180 | foo() {UPPERCASE_X();}
|
---|
181 | .......^
|
---|
182 | %CC-I-IMPLICITFUNC, In this statement, the identifier "UPPERCASE_X" is implicitly declared as a function.
|
---|
183 | at line number 1 in file ODS5DISK[HB]X.c;1
|
---|
184 | $ dir
|
---|
185 |
|
---|
186 | Directory ODS5DISK[HB]
|
---|
187 |
|
---|
188 | A.c;1 B.c;1 c.c;1 X.c;1
|
---|
189 | x.c;1 X.obj;1 x.obj;1
|
---|
190 |
|
---|
191 | Total of 7 files.
|
---|
192 | $
|
---|
193 | |
---|
194 |
|
---|
195 | This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
|
---|
196 |
|
---|
197 | It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
|
---|
198 | by Klaus Kämpf <kkaempf@rmi.de>, the code was based on the VMS port of
|
---|
199 | GNU Make 3.60 by Mike Moretti.
|
---|
200 |
|
---|
201 | It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
|
---|
202 | tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
|
---|
203 | versions of DECC were used. VAXC was tried: it fails; but it doesn't
|
---|
204 | seem worth to get it working. There are still some PTRMISMATCH warnings
|
---|
205 | during the compile. Although perl is working on VMS the test scripts
|
---|
206 | don't work. The function $shell is still missing.
|
---|
207 |
|
---|
208 | There is a known bug in some of the VMS CRTLs. It is in the shipped
|
---|
209 | versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
|
---|
210 | available ECOs for VMS V7.1 and newer versions. It is fixed in versions
|
---|
211 | shipped with newer VMS versions and all ECO kits after October 1999. It
|
---|
212 | only shows up during the daylight saving time period (DST): stat()
|
---|
213 | returns a modification time 1 hour ahead. This results in GNU make
|
---|
214 | warning messages. For a just created source you will see:
|
---|
215 |
|
---|
216 | $ gmake x.exe
|
---|
217 | gmake.exe;1: *** Warning: File `x.c' has modification time in the future (940582863 > 940579269)
|
---|
218 | cc /obj=x.obj x.c
|
---|
219 | link x.obj /exe=x.exe
|
---|
220 | gmake.exe;1: *** Warning: Clock skew detected. Your build may be incomplete.
|
---|
221 |
|
---|
222 |
|
---|
223 | New in 3.78.1:
|
---|
224 |
|
---|
225 | Fix a problem with automatically remaking makefiles. GNU make uses an
|
---|
226 | execve to restart itself after a successful remake of the makefile. On
|
---|
227 | UNIX systems execve replaces the running program with a new one and
|
---|
228 | resets all signal handling to the default. On VMS execve creates a child
|
---|
229 | process, signal and exit handlers of the parent are still active, and,
|
---|
230 | unfortunately, corrupt the exit code from the child. Fix in job.c:
|
---|
231 | ignore SIGCHLD.
|
---|
232 |
|
---|
233 | Added some switches to reflect latest features of DECC. Modifications in
|
---|
234 | makefile.vms.
|
---|
235 |
|
---|
236 | Set some definitions to reflect latest features of DECC. Modifications in
|
---|
237 | config.h-vms (which is copied to config.h).
|
---|
238 |
|
---|
239 | Added extern strcmpi declaration to avoid 'implicitly declared' messages.
|
---|
240 | Modification in make.h.
|
---|
241 |
|
---|
242 | Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
|
---|
243 | Compaq c/c++ compilers. Modifications in default.c.
|
---|
244 |
|
---|
245 | Usage of opendir() and friends, suppress file version. Modifications in dir.c.
|
---|
246 |
|
---|
247 | Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
|
---|
248 | Modifications in job.c.
|
---|
249 |
|
---|
250 | Added support to have case sensitive targets and dependencies but to
|
---|
251 | still use case blind file names. This is especially useful for Java
|
---|
252 | makefiles on VMS:
|
---|
253 |
|
---|
254 | .SUFFIXES :
|
---|
255 | .SUFFIXES : .class .java
|
---|
256 | .java.class :
|
---|
257 | javac "$<
|
---|
258 | HelloWorld.class : HelloWorld.java
|
---|
259 |
|
---|
260 | A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
|
---|
261 | It needs to be enabled to get this feature; default is disabled. The
|
---|
262 | macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
|
---|
263 | Modifications in file.c and config.h-vms.
|
---|
264 |
|
---|
265 | Bootstrap make to start building make is still makefile.com, but make
|
---|
266 | needs to be re-made with a make to make a correct version: ignore all
|
---|
267 | possible warnings, delete all objects, rename make.exe to a different
|
---|
268 | name and run it.
|
---|
269 |
|
---|
270 | Made some minor modifications to the bootstrap build makefile.com.
|
---|
271 | |
---|
272 |
|
---|
273 | This is the VMS port of GNU Make.
|
---|
274 |
|
---|
275 | It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
|
---|
276 |
|
---|
277 | This port was done by Klaus Kämpf <kkaempf@rmi.de>
|
---|
278 |
|
---|
279 | There is first-level support available from proGIS Software, Germany.
|
---|
280 | Visit their web-site at http://www.progis.de to get information
|
---|
281 | about other vms software and forthcoming updates to gnu make.
|
---|
282 |
|
---|
283 | New for 3.77:
|
---|
284 |
|
---|
285 | /bin/sh style I/O redirection is supported. You can now write lines like
|
---|
286 | mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
|
---|
287 |
|
---|
288 | Makefile variables are looked up in the current environment. You can set
|
---|
289 | symbols or logicals in DCL and evaluate them in the Makefile via
|
---|
290 | $(<name-of-symbol-or-logical>). Variables defined in the Makefile
|
---|
291 | override VMS symbols/logicals !
|
---|
292 |
|
---|
293 | Functions for file names are working now. See the GNU Make manual for
|
---|
294 | $(dir ...) and $(wildcard ...). Unix-style and VMS-style names are
|
---|
295 | supported as arguments.
|
---|
296 |
|
---|
297 | The default rules are set up for GNU C. Building an executable from a
|
---|
298 | single source file is as easy as 'make file.exe'.
|
---|
299 |
|
---|
300 | The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
|
---|
301 | different VMS systems can now be written by checking $(ARCH) as in
|
---|
302 | ifeq ($(ARCH),ALPHA)
|
---|
303 | $(ECHO) "On the Alpha"
|
---|
304 | else
|
---|
305 | $(ECHO) "On the VAX"
|
---|
306 | endif
|
---|
307 |
|
---|
308 | Command lines of excessive length are correctly broken and written to a
|
---|
309 | batch file in sys$scratch for later execution. There's no limit to the
|
---|
310 | lengths of commands (and no need for .opt files :-) any more.
|
---|
311 |
|
---|
312 | Empty commands are handled correctly and don't end in a new DCL process.
|
---|
313 |
|
---|
314 |
|
---|
315 | New for 3.76:
|
---|
316 |
|
---|
317 | John W. Eaton has updated the VMS port to support libraries and VPATH.
|
---|
318 |
|
---|
319 |
|
---|
320 | To build Make, simply type @makefile. This should compile all the
|
---|
321 | necessary files and link Make. There is also a file called
|
---|
322 | makefile.vms. If you already have GNU Make built you can just use
|
---|
323 | Make with this makefile to rebuild.
|
---|
324 |
|
---|
325 | Here are some notes about GNU Make for VMS:
|
---|
326 |
|
---|
327 | The cd command is supported if it's called as $(CD). This invokes
|
---|
328 | the 'builtin_cd' command which changes the directory.
|
---|
329 | Calling 'set def' doesn't do the trick, since a sub-shell is
|
---|
330 | spawned for this command, the directory is changed *in this sub-shell*
|
---|
331 | and the sub-shell ends.
|
---|
332 |
|
---|
333 | Libraries are not supported. They were in GNU Make 3.60 but somehow I
|
---|
334 | didn't care porting the code. If there is enough interest, I'll do it at
|
---|
335 | some later time.
|
---|
336 |
|
---|
337 | The variable $^ separates files with commas instead of spaces (It's the
|
---|
338 | natural thing to do for VMS).
|
---|
339 |
|
---|
340 | See defaults.c for VMS default suffixes and my definitions for default
|
---|
341 | rules and variables.
|
---|
342 |
|
---|
343 | The shell function is not implemented yet.
|
---|
344 |
|
---|
345 | Load average routines haven't been implemented for VMS yet.
|
---|
346 |
|
---|
347 | The default include directory for including other makefiles is
|
---|
348 | SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
|
---|
349 | SYS$LIBRARY: instead; maybe it wouldn't work that way).
|
---|
350 |
|
---|
351 | The default makefiles make looks for are: makefile.vms, gnumakefile,
|
---|
352 | makefile., and gnumakefile. .
|
---|
353 |
|
---|
354 | The stat() function and handling of time stamps in VMS is broken, so I
|
---|
355 | replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
|
---|
356 | somewhere in the future. Be warned, the time resolution inside make is
|
---|
357 | less than what vms provides. This might be a problem on the faster Alphas.
|
---|
358 |
|
---|
359 | You can use a : in a filename only if you preceed it with a backslash ('\').
|
---|
360 | E.g.- hobbes\:[bogas.files]
|
---|
361 |
|
---|
362 | Make ignores success, informational, or warning errors (-S-, -I-, or
|
---|
363 | -W-). But it will stop on -E- and -F- errors. (unless you do something
|
---|
364 | to override this in your makefile, or whatever).
|
---|
365 |
|
---|
366 | Remote stuff isn't implemented yet.
|
---|
367 |
|
---|
368 | Multiple line DCL commands, such as "if" statements, must be put inside
|
---|
369 | command files. You can run a command file by using \@.
|
---|
370 |
|
---|
371 |
|
---|
372 | VMS changes made for 3.74.3
|
---|
373 |
|
---|
374 | Lots of default settings are adapted for VMS. See default.c.
|
---|
375 |
|
---|
376 | Long command lines are now converted to command files.
|
---|
377 |
|
---|
378 | Comma (',') as a separator is now allowed. See makefile.vms for an example.
|
---|
379 |
|
---|
380 | -------------------------------------------------------------------------------
|
---|
381 | Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
---|
382 | 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
---|
383 | This file is part of GNU Make.
|
---|
384 |
|
---|
385 | GNU Make is free software; you can redistribute it and/or modify it under the
|
---|
386 | terms of the GNU General Public License as published by the Free Software
|
---|
387 | Foundation; either version 3 of the License, or (at your option) any later
|
---|
388 | version.
|
---|
389 |
|
---|
390 | GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
---|
391 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
---|
392 | A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
---|
393 |
|
---|
394 | You should have received a copy of the GNU General Public License along with
|
---|
395 | this program. If not, see <http://www.gnu.org/licenses/>.
|
---|