* texinfo.tex (\value): handle active _ or - in argument (happens
[make.git] / makefile.com
blobb7bb65cb915d637d2db5c4f8629041b32ad48222
1 $!
2 $! Makefile.com - builds GNU Make for VMS
3 $!
4 $! P1 is non-empty if you want to link with the VAXCRTL library instead
5 $!    of the shareable executable
6 $!
7 $! In case of problems with the install you might contact me at 
8 $! zinser@decus.decus.de (preferred) or eurmpz@eur.sas.com
9 $!
10 $! Look for the compiler used
12 $ lval = ""
13 $ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
14 $  then
15 $   if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library:
16 $   ccopt = ""
17 $  else
18 $   ccopt = "/decc/prefix=all"
19 $   if f$trnlnm("SYS").eqs.""
20 $    then
21 $     if f$trnlnm("DECC$LIBRARY_INCLUDE").nes."" 
22 $      then 
23 $       define sys decc$library_include:
24 $      else
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:"
30 $       define sys 'lval           
31 $      endif
32 $   endif
33 $ endif
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
36 $ n=0
37 $ open/write optf make.opt
38 $ loop:
39 $ cfile = f$elem(n," ",filelist)
40 $ if cfile .eqs. " " then goto linkit
41 $ write sys$output "Compiling ''cfile'..."
42 $ call compileit 'cfile' 'p1'
43 $ n = n + 1
44 $ goto loop
45 $ linkit:
46 $ close optf
47 $ if p1 .nes. "" then goto link_using_library
48 $ link/exe=make make.opt/opt
49 $ exit
50 $ link_using_library:
51 $ link/exe=make make.opt/opt,sys$library:vaxcrtl/lib
53 $ compileit : subroutine
54 $ ploc = f$locate("]",p1)
55 $ filnam = 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'
59 $ exit
60 $ endsubroutine : compileit