]> www.fi.muni.cz Git - evince.git/blob - pdf/xpdf/vms_make.com
Synched with Xpdf 0.92
[evince.git] / pdf / xpdf / vms_make.com
1 $!========================================================================
2 $!
3 $! Xpdf compile script for VMS.
4 $!
5 $! Written by Patrick Moreau, Martin P.J. Zinser.
6 $!
7 $! Copyright 1996 Derek B. Noonburg
8 $!
9 $!========================================================================
10 $!
11 $ i = 0
12 $ j = 0
13 $ APPS = "XPDF,PDFTOPS,PDFTOTEXT,PDFINFO,PDFTOPBM,PDFIMAGES"
14 $ if f$search("COMMON.OLB").eqs."" then lib/create common.olb
15 $!
16 $ COMMON_OBJS = "Array.obj,Catalog.obj,Decrypt.obj,Dict.obj,Error.obj," + -
17                 "FontEncoding.obj,FontFile.obj,FormWidget.obj,Gfx.obj," + -
18                 "GfxFont.obj,GfxState.obj,Lexer.obj,Link.obj,Object.obj," + -
19                 "OutputDev.obj,Page.obj,Params.obj,Parser.obj,PDFdoc.obj," + -
20                 "Stream.obj,XRef.obj"
21 $ COMMON_LIBS = "[]common.olb/lib,[-.goo]libgoo.olb/lib"
22 $!
23 $ XPDF_OBJS = "xpdf.obj,LTKOutputDev.obj,PSOutputDev.obj,SFont.obj," + - 
24               "T1Font.obj,TextOutputDev.obj,TTFont.obj,XOutputDev.obj"
25 $ XPDF_LIBS = "[-.ltk]libltk.olb/lib"
26 $!
27 $ PDFTOPS_OBJS = "pdftops.obj,PSOutputDev.obj" 
28 $ PDFTOPS_LIBS = ""
29 $!
30 $ PDFTOTEXT_OBJS = "pdftotext.obj,TextOutputDev.obj"
31 $ PDFTOTEXT_LIBS = ""
32 $!
33 $ PDFINFO_OBJS =  "pdfinfo.obj"
34 $ PDFINFO_LIBS = ""
35 $!
36 $ PDFTOPBM_OBJS = "pdftopbm.obj,PBMOutputDev.obj,SFont.obj,T1Font.obj," + -
37                   "TextOutputDev.obj,TTFont.obj,XOutputDev.obj"
38 $ PDFTOPBM_LIBS = ""
39 $!
40 $ PDFIMAGES_OBJS = "pdfimages.obj,ImageOutputDev.obj"
41 $ PDFIMAGES_LIBS = ""
42 $!
43 $! Build xpdf-ltk.h
44 $ def/user sys$input xpdf.ltk
45 $ def/user sys$output xpdf-ltk.h
46 $ run [-.ltk]ltkbuild
47 $!
48 $COMPILE_CXX_LOOP:
49 $ file = f$element(i, ",",COMMON_OBJS)
50 $ if file .eqs. "," then goto BUILD_APPS
51 $ i = i + 1
52 $ name = f$parse(file,,,"NAME")
53 $ call make 'file "CXXCOMP ''name'.cc" - 
54        'name'.cc
55 $ call make common.olb "lib/replace common.olb ''name'.obj" - 
56        'name'.obj
57 $ goto COMPILE_CXX_LOOP
58 $!
59 $BUILD_APPS:
60 $ curr_app = f$element(j,",",APPS)
61 $ if curr_app .eqs. "," then exit
62 $ j = j + 1
63 $ i = 0
64 $COMPILE_APP:
65 $ file = f$element(i,",",'curr_app'_OBJS)
66 $ if file .eqs. "," then goto LINK_APP
67 $ i = i + 1
68 $ name = f$parse(file,,,"NAME")
69 $ call make 'file "CXXCOMP ''name'.cc" - 
70        'name'.cc
71 $ goto COMPILE_APP
72 $LINK_APP:
73 $ if 'curr_app'_LIBS .nes. "" 
74 $ then 
75 $   LIBS = 'curr_app'_LIBS + "," + COMMON_LIBS
76 $ else
77 $   LIBS = COMMON_LIBS 
78 $ endif
79 $ OBJS = 'curr_app'_OBJS
80 $ xpdf_link/exe='curr_app'.exe 'OBJS','libs',[-]xpdf.opt/opt
81 $!  
82 $ goto BUILD_APPS
83 $ exit
84 $!
85 $MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
86 $ V = 'F$Verify(0)
87 $! P1 = What we are trying to make
88 $! P2 = Command to make it
89 $! P3 - P8  What it depends on
90 $
91 $ If F$Search(P1) .Eqs. "" Then Goto Makeit
92 $ Time = F$CvTime(F$File(P1,"RDT"))
93 $arg=3
94 $Loop:
95 $       Argument = P'arg
96 $       If Argument .Eqs. "" Then Goto Exit
97 $       El=0
98 $Loop2:
99 $       File = F$Element(El," ",Argument)
100 $       If File .Eqs. " " Then Goto Endl
101 $       AFile = ""
102 $Loop3:
103 $       OFile = AFile
104 $       AFile = F$Search(File)
105 $       If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
106 $       If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
107 $       Goto Loop3
108 $NextEL:
109 $       El = El + 1
110 $       Goto Loop2
111 $EndL:
112 $ arg=arg+1
113 $ If arg .Le. 8 Then Goto Loop
114 $ Goto Exit
115 $
116 $Makeit:
117 $ VV=F$VERIFY(0)
118 $ write sys$output P2
119 $ 'P2
120 $ VV='F$Verify(VV)
121 $Exit:
122 $ If V Then Set Verify
123 $ENDSUBROUTINE