summaryrefslogtreecommitdiff
path: root/makefile.com
diff options
context:
space:
mode:
authorHartmut Becker <becker.ismaning@freenet.de>2014-08-18 22:45:29 +0200
committerPaul Smith <psmith@gnu.org>2014-09-07 17:13:56 -0400
commit7e51810bb575040295523e373028ed714daade44 (patch)
treee2eb78095bc60d0834eec113f51395ad2048a83e /makefile.com
parentbd30df44788c6a74ab9943b8b41b12df338e105b (diff)
downloadgunmake-7e51810bb575040295523e373028ed714daade44.tar.gz
Enhance/fix VMS build environment
* config.h-vms.template: make sure the CRTL version is known * makefile.com: always compile/link the guile module, remove VAXCRTL parameter, new LIST parameter * makefile.vms: always compile/link the guile module, use more complete dependencies * prepare_vms.com: helper to create a VMS config file when building from a snapshot of the repository
Diffstat (limited to 'makefile.com')
-rw-r--r--makefile.com34
1 files changed, 21 insertions, 13 deletions
diff --git a/makefile.com b/makefile.com
index 6359c47..8e6b39b 100644
--- a/makefile.com
+++ b/makefile.com
@@ -1,8 +1,7 @@
$!
$! Makefile.com - builds GNU Make for VMS
$!
-$! P1 is non-empty if you want to link with the VAXCRTL library instead
-$! of the shareable executable
+$! P1 = LIST will provide compiler listings.
$! P2 = DEBUG will build an image with debug information
$! P3 = WALL will enable all warning messages (some are suppressed since
$! one macro intentionally causes an error condition)
@@ -50,6 +49,12 @@ $ endif
$ endif
$ endif
$!
+$!
+$ if (p1 .eqs. "LIST")
+$ then
+$ ccopt = ccopt + "/list/show=(expan,inclu)"
+$ endif
+$!
$! Should we build a debug image
$!
$ if (p2.eqs."DEBUG")
@@ -67,9 +72,11 @@ $ then
$ gosub check_cc_qual
$ endif
$ filelist = "alloca ar arscan commands default dir expand file function " + -
- "hash implicit job load main misc read remake remote-stub rule " + -
- "output signame variable version vmsfunctions vmsify vpath " + -
+ "guile hash implicit job load main misc read remake " + -
+ "remote-stub rule output signame variable version " + -
+ "vmsfunctions vmsify vpath " + -
"[.glob]glob [.glob]fnmatch getopt1 getopt strcache"
+$!
$ copy config.h-vms config.h
$ n=0
$ open/write optf make.opt
@@ -77,18 +84,14 @@ $ loop:
$ cfile = f$elem(n," ",filelist)
$ if cfile .eqs. " " then goto linkit
$ write sys$output "Compiling ''cfile'..."
-$ call compileit 'cfile' 'p1'
+$ call compileit 'cfile'
$ n = n + 1
$ goto loop
$ linkit:
$ close optf
-$ if p1 .nes. "" then goto link_using_library
$ link/exe=make make.opt/opt'lopt
$ goto cleanup
$
-$ link_using_library:
-$ link/exe=make make.opt/opt,sys$library:vaxcrtl/lib'lopt
-$
$ cleanup:
$ if f$trnlnm("SYS").nes."" then $ deassign sys
$ if f$trnlnm("OPTF").nes."" then $ close optf
@@ -128,10 +131,15 @@ $!-----------------------------------------------------------------------------
$!
$ compileit : subroutine
$ ploc = f$locate("]",p1)
-$ filnam = p1
-$ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
-$ write optf "''filnam'"
-$ cc'ccopt'/include=([],[.glob]) -
+$ if ploc .lt. f$length(p1)
+$ then
+$ objdir = f$extract(0, ploc+1, p1)
+$ write optf p1
+$ else
+$ objdir := []
+$ write optf objdir+p1
+$ endif
+$ cc'ccopt'/include=([],[.glob])/obj='objdir' -
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
'p1'
$ exit