2 $! Makefile.com - builds GNU Make for VMS
4 $! P1 is non-empty if you want to link with the VAXCRTL library instead
5 $! of the shareable executable
7 $! In case of problems with the install you might contact me at
8 $! zinser@decus.decus.de (preferred) or eurmpz@eur.sas.com
10 $! Look for the compiler used
13 $ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
15 $ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library:
18 $ ccopt = "/decc/prefix=all"
19 $ if f$trnlnm("SYS").eqs.""
21 $ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes.""
23 $ define sys decc$library_include:
25 $ if f$search("SYS$COMMON:[DECC$LIB.REFERENCE]DECC$RTLDEF.DIR").nes."" -
26 then lval = "SYS$COMMON:[DECC$LIB.REFERENCE.DECC$RTLDEF],"
27 $ if f$search("SYS$COMMON:[DECC$LIB.REFERENCE]SYS$STARLET_C.DIR").nes."" -
28 then lval = lval+"SYS$COMMON:[DECC$LIB.REFERENCE.SYS$STARLET_C],"
29 $ lval=lval+"SYS$LIBRARY:"
34 $ filelist = "alloca ar arscan commands default dir expand file function implicit job main misc read remake remote-stub rule signame variable version vmsfunctions vmsify vpath [.glob]glob [.glob]fnmatch getopt1 getopt"
35 $ copy config.h-vms config.h
37 $ open/write optf make.opt
39 $ cfile = f$elem(n," ",filelist)
40 $ if cfile .eqs. " " then goto linkit
41 $ write sys$output "Compiling ''cfile'..."
42 $ call compileit 'cfile' 'p1'
47 $ if p1 .nes. "" then goto link_using_library
48 $ link/exe=make make.opt/opt
51 $ link/exe=make make.opt/opt,sys$library:vaxcrtl/lib
53 $ compileit : subroutine
54 $ ploc = f$locate("]",p1)
56 $ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
57 $ write optf "''filnam'"
58 $ cc'ccopt'/include=([],[.glob])/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") 'p1'
60 $ endsubroutine : compileit