Ensure that -n takes precedence over -t.
[make.git] / readme.vms
blobec3d624b2fd868f1fd65d9c0c626d1eb19cd1920
1 This is the VMS version of GNU Make, updated by Hartmut Becker
3 Changes are based on GNU make 3.82.
5 This version was built and tested on OpenVMS V7.3 (VAX), V7.3-2 (Alpha) and
6 V8.3-1H1 (I64).
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
20 Changes (3.81.90)
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.
27 John Eisenbraun (at HP dot COM) supplied fixes and and an enhancement to append
28 output redirection in action lines.
30 Rework of ctrl+c and ctrl+y handling.
32 Fix a problem with cached strings, which showed on case-insensitive file
33 systems.
35 Build fixes for const-ified code in VMS specific sources.
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.
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
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).
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.
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.
81 Change in the Ctrl+Y handling
83 Ctrl+Y was: The CtrlY handler called $forcex for the current child.
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.
89 Change in deleteing temporary command files
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.
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.
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.
102 Changes (3.80)
104 . In default.c define variable ARCH as IA64 for VMS on Itanium systems.
106 . In makefile.vms avoid name collision for glob and globfree.
108 In newer version of the VMS CRTL there are glob and globfree implemented.
109 Compiling and linking may result in
111   %ILINK-W-MULDEFLNKG, symbol DECC$GLOBFREE has subsequent linkage definition
112        in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
113   %ILINK-W-MULDEF, symbol DECC$GLOBFREE multiply defined
114        in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
116 linker messages (and similar for DECC$GLOB). The messages just say, that
117 globfree is a known CRTL whose name was mapped by the compiler to
118 DECC$GLOBFREE.  This is done in glob.c as well, so this name is defined
119 twice. One possible solution is to use the VMS versions of glob and
120 globfree. However, then the build environment needs to figure out if
121 there is a new CRTL supporting these or not. This adds complexity. Even
122 more, these functions return VMS file specifications, which is not
123 expected by the other make sources. There is a switch at run time (a VMS
124 logical DECC$GLOB_UNIX_STYLE), which can be set to get Unix style
125 names. This may conflict with other software. The recommended solution
126 for this is to set this switch just prior to calling main: in an
127 initialization routine. This adds more complexity and more VMS specific
128 code. It is easier to tell the compiler NOT to map the routine names
129 with a simple change in makefile.vms.
131 Some notes on case sensitive names in rules and on the disk. In the VMS
132 template for CONFIG.H case sensitive rules can be enabled with defining
133 WANT_CASE_SENSITIVE_TARGETS. For recent version of VMS there is a case
134 sensitive file system: ODS5. To make use of that, additionally un-defining
135 the HAVE_CASE_INSENSITIVE_FS is required. As these are C macros, different
136 versions of make need to be built to have any case sensitivity for VMS
137 working. Unfortunately, for ODS5 disks that's not all.
139 - Usually DCL upcases command line tokens (except strings) and usually the
140   file system is case blind (similar to how Windows systems work)
141         $ set proc/parse=extended/case=sensitive
142   preserves lower and UPPER on the command line and (for this process and all
143   sub-processes) enables case sensitivity in the file system
145 - Usually the CRTL tries to reverse what DCL did with command line tokens, it
146   lowercases all tokens (except strings)
147         $ define DECC$ARGV_PARSE_STYLE enable
148   passes (the now preserved) lower and UPPER from the command line to main()
150 - Usually the CRTL upcases the arguments to open() and friends
151         $ define DECC$EFS_CASE_PRESERVE enable
152   preserves the names as is.
154 It is important to know that not all VMS tools are ready for case sensitivity.
155 With this setup some tools may not work as expected. The setup should not
156 blindly be applied for all users in default login procedures.
158 Example? The poor coding gives a compiler message, showing that there are
159 different files:
161 $ dir
163 Directory ODS5DISK[HB]
165 A.c;1               B.c;1               c.c;1               X.c;1
166 x.c;1
168 Total of 5 files.
169 $ ods5make x.obj
170 cc    /obj=x.obj x.c
172 foo(){lowercase_x();}
173 ......^
174 %CC-I-IMPLICITFUNC, In this statement, the identifier "lowercase_x" is implicitly declared as a function.
175 at line number 1 in file ODS5DISK[HB]x.c;1
176 $ mc SYS$SYSDEVICE:[HARTMUT.MAKE_3_80P]ods5make X.obj
177 cc    /obj=X.obj X.c
179 foo() {UPPERCASE_X();}
180 .......^
181 %CC-I-IMPLICITFUNC, In this statement, the identifier "UPPERCASE_X" is implicitly declared as a function.
182 at line number 1 in file ODS5DISK[HB]X.c;1
183 $ dir
185 Directory ODS5DISK[HB]
187 A.c;1               B.c;1               c.c;1               X.c;1
188 x.c;1               X.obj;1             x.obj;1
190 Total of 7 files.
193 This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
195 It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
196 by Klaus Kämpf <kkaempf@rmi.de>, the code was based on the VMS port of
197 GNU Make 3.60 by Mike Moretti.
199 It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
200 tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
201 versions of DECC were used. VAXC was tried: it fails; but it doesn't
202 seem worth to get it working. There are still some PTRMISMATCH warnings
203 during the compile. Although perl is working on VMS the test scripts
204 don't work. The function $shell is still missing.
206 There is a known bug in some of the VMS CRTLs. It is in the shipped
207 versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
208 available ECOs for VMS V7.1 and newer versions. It is fixed in versions
209 shipped with newer VMS versions and all ECO kits after October 1999. It
210 only shows up during the daylight saving time period (DST): stat()
211 returns a modification time 1 hour ahead. This results in GNU make
212 warning messages. For a just created source you will see:
214  $ gmake x.exe
215  gmake.exe;1: *** Warning: File `x.c' has modification time in the future (940582863 > 940579269)
216  cc    /obj=x.obj x.c
217  link  x.obj    /exe=x.exe
218  gmake.exe;1: *** Warning:  Clock skew detected.  Your build may be incomplete.
221 New in 3.78.1:
223 Fix a problem with automatically remaking makefiles. GNU make uses an
224 execve to restart itself after a successful remake of the makefile. On
225 UNIX systems execve replaces the running program with a new one and
226 resets all signal handling to the default. On VMS execve creates a child
227 process, signal and exit handlers of the parent are still active, and,
228 unfortunately, corrupt the exit code from the child. Fix in job.c:
229 ignore SIGCHLD.
231 Added some switches to reflect latest features of DECC. Modifications in
232 makefile.vms.
234 Set some definitions to reflect latest features of DECC. Modifications in
235 config.h-vms (which is copied to config.h).
237 Added extern strcmpi declaration to avoid 'implicitly declared' messages.
238 Modification in make.h.
240 Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
241 Compaq c/c++ compilers. Modifications in default.c.
243 Usage of opendir() and friends, suppress file version. Modifications in dir.c.
245 Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
246 Modifications in job.c.
248 Added support to have case sensitive targets and dependencies but to
249 still use case blind file names. This is especially useful for Java
250 makefiles on VMS:
252         .SUFFIXES :
253         .SUFFIXES :     .class .java
254         .java.class :
255                 javac "$<
256         HelloWorld.class :      HelloWorld.java
258 A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
259 It needs to be enabled to get this feature; default is disabled.  The
260 macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
261 Modifications in file.c and config.h-vms.
263 Bootstrap make to start building make is still makefile.com, but make
264 needs to be re-made with a make to make a correct version: ignore all
265 possible warnings, delete all objects, rename make.exe to a different
266 name and run it.
268 Made some minor modifications to the bootstrap build makefile.com.
270 This is the VMS port of GNU Make.
272 It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
274 This port was done by Klaus Kämpf <kkaempf@rmi.de>
276 There is first-level support available from proGIS Software, Germany.
277 Visit their web-site at http://www.progis.de to get information
278 about other vms software and forthcoming updates to gnu make.
280 New for 3.77:
282 /bin/sh style I/O redirection is supported. You can now write lines like
283         mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
285 Makefile variables are looked up in the current environment. You can set
286 symbols or logicals in DCL and evaluate them in the Makefile via
287 $(<name-of-symbol-or-logical>).  Variables defined in the Makefile
288 override VMS symbols/logicals !
290 Functions for file names are working now. See the GNU Make manual for
291 $(dir ...)  and $(wildcard ...).  Unix-style and VMS-style names are
292 supported as arguments.
294 The default rules are set up for GNU C. Building an executable from a
295 single source file is as easy as 'make file.exe'.
297 The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
298 different VMS systems can now be written by checking $(ARCH) as in
299   ifeq ($(ARCH),ALPHA)
300     $(ECHO) "On the Alpha"
301   else
302     $(ECHO) "On the VAX"
303   endif
305 Command lines of excessive length are correctly broken and written to a
306 batch file in sys$scratch for later execution. There's no limit to the
307 lengths of commands (and no need for .opt files :-) any more.
309 Empty commands are handled correctly and don't end in a new DCL process.
312 New for 3.76:
314 John W. Eaton has updated the VMS port to support libraries and VPATH.
317 To build Make, simply type @makefile.  This should compile all the
318 necessary files and link Make.  There is also a file called
319 makefile.vms.  If you already have GNU Make built you can just use
320 Make with this makefile to rebuild.
322 Here are some notes about GNU Make for VMS:
324 The cd command is supported if it's called as $(CD). This invokes
325 the 'builtin_cd' command which changes the directory.
326 Calling 'set def' doesn't do the trick, since a sub-shell is
327 spawned for this command, the directory is changed *in this sub-shell*
328 and the sub-shell ends.
330 Libraries are not supported. They were in GNU Make 3.60 but somehow I
331 didn't care porting the code. If there is enough interest, I'll do it at
332 some later time.
334 The variable $^ separates files with commas instead of spaces (It's the
335 natural thing to do for VMS).
337 See defaults.c for VMS default suffixes and my definitions for default
338 rules and variables.
340 The shell function is not implemented yet.
342 Load average routines haven't been implemented for VMS yet.
344 The default include directory for including other makefiles is
345 SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
346 SYS$LIBRARY: instead; maybe it wouldn't work that way).
348 The default makefiles make looks for are: makefile.vms, gnumakefile,
349 makefile., and gnumakefile. .
351 The stat() function and handling of time stamps in VMS is broken, so I
352 replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
353 somewhere in the future. Be warned, the time resolution inside make is
354 less than what vms provides. This might be a problem on the faster Alphas.
356 You can use a : in a filename only if you preceed it with a backslash ('\').
357 E.g.- hobbes\:[bogas.files]
359 Make ignores success, informational, or warning errors (-S-, -I-, or
360 -W-).  But it will stop on -E- and -F- errors. (unless you do something
361 to override this in your makefile, or whatever).
363 Remote stuff isn't implemented yet.
365 Multiple line DCL commands, such as "if" statements, must be put inside
366 command files.  You can run a command file by using \@.
369 VMS changes made for 3.74.3
371 Lots of default settings are adapted for VMS. See default.c.
373 Long command lines are now converted to command files.
375 Comma (',') as a separator is now allowed. See makefile.vms for an example.
377 -------------------------------------------------------------------------------
378 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
379 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
380 This file is part of GNU Make.
382 GNU Make is free software; you can redistribute it and/or modify it under the
383 terms of the GNU General Public License as published by the Free Software
384 Foundation; either version 3 of the License, or (at your option) any later
385 version.
387 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
388 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
389 A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
391 You should have received a copy of the GNU General Public License along with
392 this program.  If not, see <http://www.gnu.org/licenses/>.