Imported Upstream version 4.4
[platform/upstream/make.git] / makefile.com
index 6359c47..382c74d 100644 (file)
@@ -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")
@@ -66,29 +71,33 @@ $ if (p3.nes."WALL")
 $ 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 " + -
-            "[.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
@@ -128,17 +137,24 @@ $!-----------------------------------------------------------------------------
 $!
 $ 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-2013 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
@@ -152,4 +168,4 @@ $!FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 $!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/>.