• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1This is the VMS version of GNU Make, updated by Hartmut Becker
2
3Changes are based on GNU make 3.80. Latest changes are for OpenVMS/I64
4and new VMS CRTLs.
5
6This version was tested on OpenVMS/I64 V8.2 (field test) with hp C
7X7.1-024 OpenVMS/Alpha V7.3-2 with Compaq C V6.5-001 and OpenVMS/VAX 7.1
8with Compaq C V6.2-003 There are still some warning and informational
9message issued by the compilers.
10
11Build instructions
12Make a 1st version
13       $ @makefile.com
14       $ rena make.exe 1st-make.exe
15Use the 1st version to generate a 2nd version
16       $ mc sys$disk:[]1st-make clean
17       $ mc sys$disk:[]1st-make
18Verify your 2nd version
19       $ rena make.exe 2nd-make.exe
20       $ mc sys$disk:[]2nd-make clean
21       $ mc sys$disk:[]2nd-make
22
23Changes:
24
25. In default.c define variable ARCH as IA64 for VMS on Itanium systems.
26
27. In makefile.vms avoid name collision for glob and globfree.
28
29In newer version of the VMS CRTL there are glob and globfree implemented.
30Compiling and linking may result in
31
32  %ILINK-W-MULDEFLNKG, symbol DECC$GLOBFREE has subsequent linkage definition
33       in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
34  %ILINK-W-MULDEF, symbol DECC$GLOBFREE multiply defined
35       in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
36
37linker messages (and similar for DECC$GLOB). The messages just say, that
38globfree is a known CRTL whose name was mapped by the compiler to
39DECC$GLOBFREE.  This is done in glob.c as well, so this name is defined
40twice. One possible solution is to use the VMS versions of glob and
41globfree. However, then the build environment needs to figure out if
42there is a new CRTL supporting these or not. This adds complexity. Even
43more, these functions return VMS file specifications, which is not
44expected by the other make sources. There is a switch at run time (a VMS
45logical DECC$GLOB_UNIX_STYLE), which can be set to get Unix style
46names. This may conflict with other software. The recommended solution
47for this is to set this switch just prior to calling main: in an
48initialization routine. This adds more complexity and more VMS specific
49code. It is easier to tell the compiler NOT to map the routine names
50with a simple change in makefile.vms.
51
52Some notes on case sensitive names in rules and on the disk. In the VMS
53template for CONFIG.H case sensitive rules can be enabled with defining
54WANT_CASE_SENSITIVE_TARGETS. For recent version of VMS there is a case
55sensitive file system: ODS5. To make use of that, additionally un-defining
56the HAVE_CASE_INSENSITIVE_FS is required. As these are C macros, different
57versions of make need to be built to have any case sensitivity for VMS
58working. Unfortunately, for ODS5 disks that's not all.
59
60- Usually DCL upcases command line tokens (except strings) and usually the
61  file system is case blind (similar to how Windows systems work)
62	$ set proc/parse=extended/case=sensitive
63  preserves lower and UPPER on the command line and (for this process and all
64  sub-processes) enables case sensitivity in the file system
65
66- Usually the CRTL tries to reverse what DCL did with command line tokens, it
67  lowercases all tokens (except strings)
68	$ define DECC$ARGV_PARSE_STYLE enable
69  passes (the now preserved) lower and UPPER from the command line to main()
70
71- Usually the CRTL upcases the arguments to open() and friends
72	$ define DECC$EFS_CASE_PRESERVE enable
73  preserves the names as is.
74
75It is important to know that not all VMS tools are ready for case sensitivity.
76With this setup some tools may not work as expected. The setup should not
77blindly be applied for all users in default login procedures.
78
79Example? The poor coding gives a compiler message, showing that there are
80different files:
81
82$ dir
83
84Directory ODS5DISK[HB]
85
86A.c;1               B.c;1               c.c;1               X.c;1
87x.c;1
88
89Total of 5 files.
90$ ods5make x.obj
91cc    /obj=x.obj x.c
92
93foo(){lowercase_x();}
94......^
95%CC-I-IMPLICITFUNC, In this statement, the identifier "lowercase_x" is implicitly declared as a function.
96at line number 1 in file ODS5DISK[HB]x.c;1
97$ mc SYS$SYSDEVICE:[HARTMUT.MAKE_3_80P]ods5make X.obj
98cc    /obj=X.obj X.c
99
100foo() {UPPERCASE_X();}
101.......^
102%CC-I-IMPLICITFUNC, In this statement, the identifier "UPPERCASE_X" is implicitly declared as a function.
103at line number 1 in file ODS5DISK[HB]X.c;1
104$ dir
105
106Directory ODS5DISK[HB]
107
108A.c;1               B.c;1               c.c;1               X.c;1
109x.c;1               X.obj;1             x.obj;1
110
111Total of 7 files.
112$
113
114This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
115
116It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
117by Klaus K�mpf <kkaempf@rmi.de>, the code was based on the VMS port of
118GNU Make 3.60 by Mike Moretti.
119
120It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
121tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
122versions of DECC were used. VAXC was tried: it fails; but it doesn't
123seem worth to get it working. There are still some PTRMISMATCH warnings
124during the compile. Although perl is working on VMS the test scripts
125don't work. The function $shell is still missing.
126
127There is a known bug in some of the VMS CRTLs. It is in the shipped
128versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
129available ECOs for VMS V7.1 and newer versions. It is fixed in versions
130shipped with newer VMS versions and all ECO kits after October 1999. It
131only shows up during the daylight saving time period (DST): stat()
132returns a modification time 1 hour ahead. This results in GNU make
133warning messages. For a just created source you will see:
134
135 $ gmake x.exe
136 gmake.exe;1: *** Warning: File `x.c' has modification time in the future (940582863 > 940579269)
137 cc    /obj=x.obj x.c
138 link  x.obj    /exe=x.exe
139 gmake.exe;1: *** Warning:  Clock skew detected.  Your build may be incomplete.
140
141
142New in 3.78.1:
143
144Fix a problem with automatically remaking makefiles. GNU make uses an
145execve to restart itself after a successful remake of the makefile. On
146UNIX systems execve replaces the running program with a new one and
147resets all signal handling to the default. On VMS execve creates a child
148process, signal and exit handlers of the parent are still active, and,
149unfortunately, corrupt the exit code from the child. Fix in job.c:
150ignore SIGCHLD.
151
152Added some switches to reflect latest features of DECC. Modifications in
153makefile.vms.
154
155Set some definitions to reflect latest features of DECC. Modifications in
156config.h-vms (which is copied to config.h).
157
158Added extern strcmpi declaration to avoid 'implicitly declared' messages.
159Modification in make.h.
160
161Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
162Compaq c/c++ compilers. Modifications in default.c.
163
164Usage of opendir() and friends, suppress file version. Modifications in dir.c.
165
166Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
167Modifications in job.c.
168
169Added support to have case sensitive targets and dependencies but to
170still use case blind file names. This is especially useful for Java
171makefiles on VMS:
172
173	.SUFFIXES :
174	.SUFFIXES :	.class .java
175	.java.class :
176		javac "$<
177	HelloWorld.class :      HelloWorld.java
178
179A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
180It needs to be enabled to get this feature; default is disabled.  The
181macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
182Modifications in file.c and config.h-vms.
183
184Bootstrap make to start building make is still makefile.com, but make
185needs to be re-made with a make to make a correct version: ignore all
186possible warnings, delete all objects, rename make.exe to a different
187name and run it.
188
189Made some minor modifications to the bootstrap build makefile.com.
190
191This is the VMS port of GNU Make.
192
193It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
194
195This port was done by Klaus K�mpf <kkaempf@rmi.de>
196
197There is first-level support available from proGIS Software, Germany.
198Visit their web-site at http://www.progis.de to get information
199about other vms software and forthcoming updates to gnu make.
200
201New for 3.77:
202
203/bin/sh style I/O redirection is supported. You can now write lines like
204	mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
205
206Makefile variables are looked up in the current environment. You can set
207symbols or logicals in DCL and evaluate them in the Makefile via
208$(<name-of-symbol-or-logical>).  Variables defined in the Makefile
209override VMS symbols/logicals !
210
211Functions for file names are working now. See the GNU Make manual for
212$(dir ...)  and $(wildcard ...).  Unix-style and VMS-style names are
213supported as arguments.
214
215The default rules are set up for GNU C. Building an executable from a
216single source file is as easy as 'make file.exe'.
217
218The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
219different VMS systems can now be written by checking $(ARCH) as in
220  ifeq ($(ARCH),ALPHA)
221    $(ECHO) "On the Alpha"
222  else
223    $(ECHO) "On the VAX"
224  endif
225
226Command lines of excessive length are correctly broken and written to a
227batch file in sys$scratch for later execution. There's no limit to the
228lengths of commands (and no need for .opt files :-) any more.
229
230Empty commands are handled correctly and don't end in a new DCL process.
231
232
233New for 3.76:
234
235John W. Eaton has updated the VMS port to support libraries and VPATH.
236
237
238To build Make, simply type @makefile.  This should compile all the
239necessary files and link Make.  There is also a file called
240makefile.vms.  If you already have GNU Make built you can just use
241Make with this makefile to rebuild.
242
243Here are some notes about GNU Make for VMS:
244
245The cd command is supported if it's called as $(CD). This invokes
246the 'builtin_cd' command which changes the directory.
247Calling 'set def' doesn't do the trick, since a sub-shell is
248spawned for this command, the directory is changed *in this sub-shell*
249and the sub-shell ends.
250
251Libraries are not supported. They were in GNU Make 3.60 but somehow I
252didn't care porting the code. If there is enough interest, I'll do it at
253some later time.
254
255The variable $^ separates files with commas instead of spaces (It's the
256natural thing to do for VMS).
257
258See defaults.c for VMS default suffixes and my definitions for default
259rules and variables.
260
261The shell function is not implemented yet.
262
263Load average routines haven't been implemented for VMS yet.
264
265The default include directory for including other makefiles is
266SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
267SYS$LIBRARY: instead; maybe it wouldn't work that way).
268
269The default makefiles make looks for are: makefile.vms, gnumakefile,
270makefile., and gnumakefile. .
271
272The stat() function and handling of time stamps in VMS is broken, so I
273replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
274somewhere in the future. Be warned, the time resolution inside make is
275less than what vms provides. This might be a problem on the faster Alphas.
276
277You can use a : in a filename only if you preceed it with a backslash ('\').
278E.g.- hobbes\:[bogas.files]
279
280Make ignores success, informational, or warning errors (-S-, -I-, or
281-W-).  But it will stop on -E- and -F- errors. (unless you do something
282to override this in your makefile, or whatever).
283
284Remote stuff isn't implemented yet.
285
286Multiple line DCL commands, such as "if" statements, must be put inside
287command files.  You can run a command file by using \@.
288
289
290VMS changes made for 3.74.3
291
292Lots of default settings are adapted for VMS. See default.c.
293
294Long command lines are now converted to command files.
295
296Comma (',') as a separator is now allowed. See makefile.vms for an example.
297
298-------------------------------------------------------------------------------
299Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3002006 Free Software Foundation, Inc.
301This file is part of GNU Make.
302
303GNU Make is free software; you can redistribute it and/or modify it under the
304terms of the GNU General Public License as published by the Free Software
305Foundation; either version 2, or (at your option) any later version.
306
307GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
308WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
309A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
310
311You should have received a copy of the GNU General Public License along with
312GNU Make; see the file COPYING.  If not, write to the Free Software
313Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
314