From f22899fba215d8cb9620ade16e747e885215dad8 Mon Sep 17 00:00:00 2001 From: Hartmut Becker Date: Sun, 7 Sep 2014 17:13:56 -0400 Subject: 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 --- makefile.com | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'makefile.com') diff --git a/makefile.com b/makefile.com index 6359c47a..8e6b39b9 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 -- cgit v1.2.1