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