1$! $XFree86: xc/programs/xterm/link_axp.com,v 1.1 2000/02/08 17:19:35 dawes Exp $
2$ SAVE_VERIFY='F$VERIFY(0)
3$ if p1 .Eqs. "CLEAN" then goto clean
4$ if p1 .Eqs. "CLOBBER" then goto clobber
5$ if p1 .Eqs. "INSTALL" then goto install
6$!
7$!	Compile the X11R4 Xterm application
8$!
9$ Set Symbol/Scope=NoGlobal
10$!
11$!  Define logicals pointing to the needed directories
12$!
13$ x11lib_device = f$parse("[.lib]",,,"DEVICE")
14$ x11lib_directory = f$parse("[.lib]",,,"DIRECTORY")
15$ define/nolog x11lib 'x11lib_device''x11lib_directory'
16$!
17$ x11inc_device = f$parse("[]",,,"DEVICE")
18$ x11inc_directory = f$parse("[]",,,"DIRECTORY")
19$ define/nolog x11inc 'x11inc_device''x11inc_directory'
20$!
21$ xmu_device = f$parse("[.lib.xmu]",,,"DEVICE")
22$ xmu_directory = f$parse("[.lib.xmu]",,,"DIRECTORY")
23$ define/nolog x11xmu 'xmu_device''xmu_directory'
24$!
25$ xbm_device = f$parse("[.lib.x11]",,,"DEVICE")
26$ xbm_directory = f$parse("[.lib.x11]",,,"DIRECTORY")
27$ define/nolog x11xbm 'xbm_device''xbm_directory'
28$!
29$ xaw_device = f$parse("[.lib.xaw]",,,"DEVICE")
30$ xaw_directory = f$parse("[.lib.xaw]",,,"DIRECTORY")
31$ define/nolog x11xaw 'xaw_device''xaw_directory'
32$!
33$ x11vms_device = f$parse("[.lib.misc]",,,"DEVICE")
34$ x11vms_directory = f$parse("[.lib.misc]",,,"DIRECTORY")
35$ define/nolog x11vms 'x11vms_device''x11vms_directory'
36$!
37$!  Get the compiler options via the logical name COPTS
38$!
39$ cc_options = f$trnlnm("COPTS")
40$!
41$!  Get the linker options via the logical name LOPTS
42$!
43$ link_options = f$trnlnm("LOPTS")
44$!
45$ write sys$output "Building XTERM Image"
46$ CALL MAKE XTERM.EXE	"LINK ''link_options' /EXE=XTERM.EXE_AXP/CROSS/FULL/MAP=XTERM.MAP XTERM_AXP/OPT" *.OBJ
47$!
48$ deassign x11lib
49$ deassign x11vms
50$ deassign x11xmu
51$ deassign x11xbm
52$ deassign x11xaw
53$!
54$ exit
55$!
56$ Clobber:	! Delete executables, Purge directory and clean up object files and listings
57$ Delete/noconfirm/log *.exe;*
58$!
59$ Clean:	! Purge directory, clean up object files and listings
60$ Purge
61$ Delete/noconfirm/log *.lis;*
62$ Delete/noconfirm/log *.obj;*
63$!
64$ exit
65$!
66$ Install:
67$ Copy/log *.exe x11bin:
68$ exit
69$!
70$MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
71$ V = 'F$Verify(0)
72$! P1 = What we are trying to make
73$! P2 = Command to make it
74$! P3 - P8  What it depends on
75$
76$ If F$Search(P1) .Eqs. "" Then Goto Makeit
77$ Time = F$CvTime(F$File(P1,"RDT"))
78$arg=3
79$Loop:
80$	Argument = P'arg
81$	If Argument .Eqs. "" Then Goto Exit
82$	El=0
83$Loop2:
84$	File = F$Element(El," ",Argument)
85$	If File .Eqs. " " Then Goto Endl
86$	AFile = ""
87$Loop3:
88$	OFile = AFile
89$	AFile = F$Search(File)
90$	If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
91$	If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
92$	Goto Loop3
93$NextEL:
94$	El = El + 1
95$	Goto Loop2
96$EndL:
97$ arg=arg+1
98$ If arg .Le. 8 Then Goto Loop
99$ Goto Exit
100$
101$Makeit:
102$ Set Verify
103$ 'P2
104$ VV='F$Verify(0)
105$Exit:
106$ If V Then Set Verify
107$ENDSUBROUTINE
108