$!
$! 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)
$ endif
$ endif
$!
+$!
+$ if (p1 .eqs. "LIST")
+$ then
+$ ccopt = ccopt + "/list/show=(expan,inclu)"
+$ endif
+$!
$! Should we build a debug image
$!
$ if (p2.eqs."DEBUG")
$ then
$ gosub check_cc_qual
$ endif
-$ filelist = "alloca ar arscan commands default dir expand file function " + -
- "hash implicit job main misc read remake remote-stub rule " + -
- "signame variable version vmsfunctions vmsify vpath " + -
- "[.glob]glob [.glob]fnmatch getopt1 getopt strcache"
-$ copy config.h-vms config.h
+$ filelist = "[.src]ar [.src]arscan [.src]commands [.src]default [.src]dir " + -
+ "[.src]expand [.src]file [.src]function [.src]guile " + -
+ "[.src]hash [.src]implicit [.src]job [.src]load [.src]main " + -
+ "[.src]misc [.src]read [.src]remake [.src]remote-stub " + -
+ "[.src]rule [.src]output [.src]signame [.src]variable " + -
+ "[.src]version [.src]shuffle [.src]strcache [.src]vpath " + -
+ "[.src]vmsfunctions [.src]vmsify [.src]vms_progname " + -
+ "[.src]vms_exit [.src]vms_export_symbol " + -
+ "[.lib]alloca [.lib]fnmatch [.lib]glob [.src]getopt1 [.src]getopt"
+$!
+$ copy [.src]config.h-vms [.src]config.h
+$ copy [.lib]fnmatch.in.h [.lib]fnmatch.h
+$ copy [.lib]glob.in.h [.lib]glob.h
$ n=0
$ open/write optf make.opt
$ 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
$!
$ 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]) -
- /define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
+$! filnam = p1
+$ 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'/nested=none/include=([],[.src],[.lib])/obj='objdir' -
+ /define=("allocated_variable_expand_for_file=alloc_var_expand_for_file",-
+ "unlink=remove","HAVE_CONFIG_H","VMS") -
'p1'
$ exit
$ endsubroutine : compileit
$!
$!-----------------------------------------------------------------------------
-$!Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-$!2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+$!Copyright (C) 1996-2022 Free Software Foundation, Inc.
$!This file is part of GNU Make.
$!
$!GNU Make is free software; you can redistribute it and/or modify it under
$!details.
$!
$!You should have received a copy of the GNU General Public License along with
-$!this program. If not, see <http://www.gnu.org/licenses/>.
+$!this program. If not, see <https://www.gnu.org/licenses/>.