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