| 1 | This is the VMS version of GNU Make, updated by Hartmut Becker
|
|---|
| 2 |
|
|---|
| 3 | Changes are based on GNU make 3.80. Latest changes are for OpenVMS/I64
|
|---|
| 4 | and new VMS CRTLs.
|
|---|
| 5 |
|
|---|
| 6 | This version was tested on OpenVMS/I64 V8.2 (field test) with hp C
|
|---|
| 7 | X7.1-024 OpenVMS/Alpha V7.3-2 with Compaq C V6.5-001 and OpenVMS/VAX 7.1
|
|---|
| 8 | with Compaq C V6.2-003 There are still some warning and informational
|
|---|
| 9 | message issued by the compilers.
|
|---|
| 10 |
|
|---|
| 11 | Build instructions
|
|---|
| 12 | Make a 1st version
|
|---|
| 13 | $ @makefile.com
|
|---|
| 14 | $ rena make.exe 1st-make.exe
|
|---|
| 15 | Use the 1st version to generate a 2nd version
|
|---|
| 16 | $ mc sys$disk:[]1st-make clean
|
|---|
| 17 | $ mc sys$disk:[]1st-make
|
|---|
| 18 | Verify your 2nd version
|
|---|
| 19 | $ rena make.exe 2nd-make.exe
|
|---|
| 20 | $ mc sys$disk:[]2nd-make clean
|
|---|
| 21 | $ mc sys$disk:[]2nd-make
|
|---|
| 22 |
|
|---|
| 23 | Changes:
|
|---|
| 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 |
|
|---|
| 29 | In newer version of the VMS CRTL there are glob and globfree implemented.
|
|---|
| 30 | Compiling 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 |
|
|---|
| 37 | linker messages (and similar for DECC$GLOB). The messages just say, that
|
|---|
| 38 | globfree is a known CRTL whose name was mapped by the compiler to
|
|---|
| 39 | DECC$GLOBFREE. This is done in glob.c as well, so this name is defined
|
|---|
| 40 | twice. One possible solution is to use the VMS versions of glob and
|
|---|
| 41 | globfree. However, then the build environment needs to figure out if
|
|---|
| 42 | there is a new CRTL supporting these or not. This adds complexity. Even
|
|---|
| 43 | more, these functions return VMS file specifications, which is not
|
|---|
| 44 | expected by the other make sources. There is a switch at run time (a VMS
|
|---|
| 45 | logical DECC$GLOB_UNIX_STYLE), which can be set to get Unix style
|
|---|
| 46 | names. This may conflict with other software. The recommended solution
|
|---|
| 47 | for this is to set this switch just prior to calling main: in an
|
|---|
| 48 | initialization routine. This adds more complexity and more VMS specific
|
|---|
| 49 | code. It is easier to tell the compiler NOT to map the routine names
|
|---|
| 50 | with a simple change in makefile.vms.
|
|---|
| 51 | |
|---|
| 52 |
|
|---|
| 53 | This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
|
|---|
| 54 |
|
|---|
| 55 | It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
|
|---|
| 56 | by Klaus Kämpf <kkaempf@rmi.de>, the code was based on the VMS port of
|
|---|
| 57 | GNU Make 3.60 by Mike Moretti.
|
|---|
| 58 |
|
|---|
| 59 | It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
|
|---|
| 60 | tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
|
|---|
| 61 | versions of DECC were used. VAXC was tried: it fails; but it doesn't
|
|---|
| 62 | seem worth to get it working. There are still some PTRMISMATCH warnings
|
|---|
| 63 | during the compile. Although perl is working on VMS the test scripts
|
|---|
| 64 | don't work. The function $shell is still missing.
|
|---|
| 65 |
|
|---|
| 66 | There is a known bug in some of the VMS CRTLs. It is in the shipped
|
|---|
| 67 | versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
|
|---|
| 68 | available ECOs for VMS V7.1 and newer versions. It is fixed in versions
|
|---|
| 69 | shipped with newer VMS versions and all ECO kits after October 1999. It
|
|---|
| 70 | only shows up during the daylight saving time period (DST): stat()
|
|---|
| 71 | returns a modification time 1 hour ahead. This results in GNU make
|
|---|
| 72 | warning messages. For a just created source you will see:
|
|---|
| 73 |
|
|---|
| 74 | $ gmake x.exe
|
|---|
| 75 | gmake.exe;1: *** Warning: File `x.c' has modification time in the future (940582863 > 940579269)
|
|---|
| 76 | cc /obj=x.obj x.c
|
|---|
| 77 | link x.obj /exe=x.exe
|
|---|
| 78 | gmake.exe;1: *** Warning: Clock skew detected. Your build may be incomplete.
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 | New in 3.78.1:
|
|---|
| 82 |
|
|---|
| 83 | Fix a problem with automatically remaking makefiles. GNU make uses an
|
|---|
| 84 | execve to restart itself after a successful remake of the makefile. On
|
|---|
| 85 | UNIX systems execve replaces the running program with a new one and
|
|---|
| 86 | resets all signal handling to the default. On VMS execve creates a child
|
|---|
| 87 | process, signal and exit handlers of the parent are still active, and,
|
|---|
| 88 | unfortunately, corrupt the exit code from the child. Fix in job.c:
|
|---|
| 89 | ignore SIGCHLD.
|
|---|
| 90 |
|
|---|
| 91 | Added some switches to reflect latest features of DECC. Modifications in
|
|---|
| 92 | makefile.vms.
|
|---|
| 93 |
|
|---|
| 94 | Set some definitions to reflect latest features of DECC. Modifications in
|
|---|
| 95 | config.h-vms (which is copied to config.h).
|
|---|
| 96 |
|
|---|
| 97 | Added extern strcmpi declaration to avoid 'implicitly declared' messages.
|
|---|
| 98 | Modification in make.h.
|
|---|
| 99 |
|
|---|
| 100 | Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
|
|---|
| 101 | Compaq c/c++ compilers. Modifications in default.c.
|
|---|
| 102 |
|
|---|
| 103 | Usage of opendir() and friends, suppress file version. Modifications in dir.c.
|
|---|
| 104 |
|
|---|
| 105 | Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
|
|---|
| 106 | Modifications in job.c.
|
|---|
| 107 |
|
|---|
| 108 | Added support to have case sensitive targets and dependencies but to
|
|---|
| 109 | still use case blind file names. This is especially useful for Java
|
|---|
| 110 | makefiles on VMS:
|
|---|
| 111 |
|
|---|
| 112 | .SUFFIXES :
|
|---|
| 113 | .SUFFIXES : .class .java
|
|---|
| 114 | .java.class :
|
|---|
| 115 | javac "$<
|
|---|
| 116 | HelloWorld.class : HelloWorld.java
|
|---|
| 117 |
|
|---|
| 118 | A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
|
|---|
| 119 | It needs to be enabled to get this feature; default is disabled. The
|
|---|
| 120 | macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
|
|---|
| 121 | Modifications in file.c and config.h-vms.
|
|---|
| 122 |
|
|---|
| 123 | Bootstrap make to start building make is still makefile.com, but make
|
|---|
| 124 | needs to be re-made with a make to make a correct version: ignore all
|
|---|
| 125 | possible warnings, delete all objects, rename make.exe to a different
|
|---|
| 126 | name and run it.
|
|---|
| 127 |
|
|---|
| 128 | Made some minor modifications to the bootstrap build makefile.com.
|
|---|
| 129 | |
|---|
| 130 |
|
|---|
| 131 | This is the VMS port of GNU Make.
|
|---|
| 132 |
|
|---|
| 133 | It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
|
|---|
| 134 |
|
|---|
| 135 | This port was done by Klaus Kämpf <kkaempf@rmi.de>
|
|---|
| 136 |
|
|---|
| 137 | There is first-level support available from proGIS Software, Germany.
|
|---|
| 138 | Visit their web-site at http://www.progis.de to get information
|
|---|
| 139 | about other vms software and forthcoming updates to gnu make.
|
|---|
| 140 |
|
|---|
| 141 | New for 3.77:
|
|---|
| 142 |
|
|---|
| 143 | /bin/sh style I/O redirection is supported. You can now write lines like
|
|---|
| 144 | mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
|
|---|
| 145 |
|
|---|
| 146 | Makefile variables are looked up in the current environment. You can set
|
|---|
| 147 | symbols or logicals in DCL and evaluate them in the Makefile via
|
|---|
| 148 | $(<name-of-symbol-or-logical>). Variables defined in the Makefile
|
|---|
| 149 | override VMS symbols/logicals !
|
|---|
| 150 |
|
|---|
| 151 | Functions for file names are working now. See the GNU Make manual for
|
|---|
| 152 | $(dir ...) and $(wildcard ...). Unix-style and VMS-style names are
|
|---|
| 153 | supported as arguments.
|
|---|
| 154 |
|
|---|
| 155 | The default rules are set up for GNU C. Building an executable from a
|
|---|
| 156 | single source file is as easy as 'make file.exe'.
|
|---|
| 157 |
|
|---|
| 158 | The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
|
|---|
| 159 | different VMS systems can now be written by checking $(ARCH) as in
|
|---|
| 160 | ifeq ($(ARCH),ALPHA)
|
|---|
| 161 | $(ECHO) "On the Alpha"
|
|---|
| 162 | else
|
|---|
| 163 | $(ECHO) "On the VAX"
|
|---|
| 164 | endif
|
|---|
| 165 |
|
|---|
| 166 | Command lines of excessive length are correctly broken and written to a
|
|---|
| 167 | batch file in sys$scratch for later execution. There's no limit to the
|
|---|
| 168 | lengths of commands (and no need for .opt files :-) any more.
|
|---|
| 169 |
|
|---|
| 170 | Empty commands are handled correctly and don't end in a new DCL process.
|
|---|
| 171 |
|
|---|
| 172 |
|
|---|
| 173 | New for 3.76:
|
|---|
| 174 |
|
|---|
| 175 | John W. Eaton has updated the VMS port to support libraries and VPATH.
|
|---|
| 176 |
|
|---|
| 177 |
|
|---|
| 178 | To build Make, simply type @makefile. This should compile all the
|
|---|
| 179 | necessary files and link Make. There is also a file called
|
|---|
| 180 | makefile.vms. If you already have GNU Make built you can just use
|
|---|
| 181 | Make with this makefile to rebuild.
|
|---|
| 182 |
|
|---|
| 183 | Here are some notes about GNU Make for VMS:
|
|---|
| 184 |
|
|---|
| 185 | The cd command is supported if it's called as $(CD). This invokes
|
|---|
| 186 | the 'builtin_cd' command which changes the directory.
|
|---|
| 187 | Calling 'set def' doesn't do the trick, since a sub-shell is
|
|---|
| 188 | spawned for this command, the directory is changed *in this sub-shell*
|
|---|
| 189 | and the sub-shell ends.
|
|---|
| 190 |
|
|---|
| 191 | Libraries are not supported. They were in GNU Make 3.60 but somehow I
|
|---|
| 192 | didn't care porting the code. If there is enough interest, I'll do it at
|
|---|
| 193 | some later time.
|
|---|
| 194 |
|
|---|
| 195 | The variable $^ separates files with commas instead of spaces (It's the
|
|---|
| 196 | natural thing to do for VMS).
|
|---|
| 197 |
|
|---|
| 198 | See defaults.c for VMS default suffixes and my definitions for default
|
|---|
| 199 | rules and variables.
|
|---|
| 200 |
|
|---|
| 201 | The shell function is not implemented yet.
|
|---|
| 202 |
|
|---|
| 203 | Load average routines haven't been implemented for VMS yet.
|
|---|
| 204 |
|
|---|
| 205 | The default include directory for including other makefiles is
|
|---|
| 206 | SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
|
|---|
| 207 | SYS$LIBRARY: instead; maybe it wouldn't work that way).
|
|---|
| 208 |
|
|---|
| 209 | The default makefiles make looks for are: makefile.vms, gnumakefile,
|
|---|
| 210 | makefile., and gnumakefile. .
|
|---|
| 211 |
|
|---|
| 212 | The stat() function and handling of time stamps in VMS is broken, so I
|
|---|
| 213 | replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
|
|---|
| 214 | somewhere in the future. Be warned, the time resolution inside make is
|
|---|
| 215 | less than what vms provides. This might be a problem on the faster Alphas.
|
|---|
| 216 |
|
|---|
| 217 | You can use a : in a filename only if you preceed it with a backslash ('\').
|
|---|
| 218 | E.g.- hobbes\:[bogas.files]
|
|---|
| 219 |
|
|---|
| 220 | Make ignores success, informational, or warning errors (-S-, -I-, or
|
|---|
| 221 | -W-). But it will stop on -E- and -F- errors. (unless you do something
|
|---|
| 222 | to override this in your makefile, or whatever).
|
|---|
| 223 |
|
|---|
| 224 | Remote stuff isn't implemented yet.
|
|---|
| 225 |
|
|---|
| 226 | Multiple line DCL commands, such as "if" statements, must be put inside
|
|---|
| 227 | command files. You can run a command file by using \@.
|
|---|
| 228 |
|
|---|
| 229 |
|
|---|
| 230 | VMS changes made for 3.74.3
|
|---|
| 231 |
|
|---|
| 232 | Lots of default settings are adapted for VMS. See default.c.
|
|---|
| 233 |
|
|---|
| 234 | Long command lines are now converted to command files.
|
|---|
| 235 |
|
|---|
| 236 | Comma (',') as a separator is now allowed. See makefile.vms for an example.
|
|---|