Codebase list findlib / 4c2c82c
Imported Upstream version 1.5.2 Stephane Glondu 9 years ago
28 changed file(s) with 2493 addition(s) and 2327 deletion(s). Raw diff Collapse all Expand all
99 .PHONY: all opt install uninstall clean
1010
1111 all:
12 for p in $(PARTS); do ( cd src/$$p; $(MAKE) all ); done
12 for p in $(PARTS); do ( cd src/$$p; $(MAKE) all ) || exit; done
1313 $(MAKE) all-config
1414
1515 opt:
16 for p in $(PARTS); do ( cd src/$$p; $(MAKE) opt ); done
16 for p in $(PARTS); do ( cd src/$$p; $(MAKE) opt ) || exit; done
1717
1818 install:
1919 mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
00 #! /bin/sh
1 # $Id: configure 220 2014-06-25 10:22:58Z gerd $
1 # $Id: configure 227 2014-08-01 11:59:03Z gerd $
22 # ----------------------------------------------------------------------
33 #
44
66
77 #set -x
88
9 version="1.5.1"
9 version="1.5.2"
1010
1111 # Remember the old IFS value:
1212 oldifs="$IFS"
8484 List of Changes
8585 ==============================================================================
8686
87 - 1.5.2: support for the query formats "%+a" and "%+A".
88 Fix: the "ppx" property is now also path-expanded when interpreted in a
89 toploop.
90 Fix: implicit "ppx" is not path-expanded anymore.
91 Fix: Build bytes.cmxs only if natdynlink is enabled (Andy Ray).
92
8793 - 1.5.1: includes a file that was missing in 1.5
8894
8995 - 1.5: Including the "bytes" package that is either a compat package for ocaml
109109 <ul>
110110
111111 <li>
112 <p><em>1.5.2:</em> support for the query formats "%+a" and "%+A".</p>
113 <p>Fix: the "ppx" property is now also path-expanded when interpreted
114 in a toploop.</p>
115 <p>Fix: implicit "ppx" is not path-expanded anymore.</p>
116 <p>Fix: Build bytes.cmxs only if natdynlink is enabled (Andy Ray).</p>
117 </li>
118 <li>
112119 <p><em>1.5.1:</em> includes a file that was missing in 1.5</p>
113120 </li>
114121 <li>
+0
-139
doc/ref-html/c1032.html less more
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >The findlib library</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="UP"
12 TITLE="Library"
13 HREF="p1030.html"><LINK
14 REL="PREVIOUS"
15 TITLE="Library"
16 HREF="p1030.html"></HEAD
17 ><BODY
18 CLASS="CHAPTER"
19 BGCOLOR="#FFFFFF"
20 TEXT="#000000"
21 LINK="#0000FF"
22 VLINK="#840084"
23 ALINK="#0000FF"
24 ><DIV
25 CLASS="NAVHEADER"
26 ><TABLE
27 SUMMARY="Header navigation table"
28 WIDTH="100%"
29 BORDER="0"
30 CELLPADDING="0"
31 CELLSPACING="0"
32 ><TR
33 ><TH
34 COLSPAN="3"
35 ALIGN="center"
36 >The findlib Reference Manual</TH
37 ></TR
38 ><TR
39 ><TD
40 WIDTH="10%"
41 ALIGN="left"
42 VALIGN="bottom"
43 ><A
44 HREF="p1030.html"
45 ACCESSKEY="P"
46 >Prev</A
47 ></TD
48 ><TD
49 WIDTH="80%"
50 ALIGN="center"
51 VALIGN="bottom"
52 ></TD
53 ><TD
54 WIDTH="10%"
55 ALIGN="right"
56 VALIGN="bottom"
57 >&nbsp;</TD
58 ></TR
59 ></TABLE
60 ><HR
61 ALIGN="LEFT"
62 WIDTH="100%"></DIV
63 ><DIV
64 CLASS="CHAPTER"
65 ><H1
66 ><A
67 NAME="AEN1032"
68 ></A
69 >Chapter 1. The findlib library</H1
70 ><P
71 > <A
72 HREF="lib/index.html"
73 TARGET="_top"
74 >The findlib library</A
75 >
76 </P
77 ></DIV
78 ><DIV
79 CLASS="NAVFOOTER"
80 ><HR
81 ALIGN="LEFT"
82 WIDTH="100%"><TABLE
83 SUMMARY="Footer navigation table"
84 WIDTH="100%"
85 BORDER="0"
86 CELLPADDING="0"
87 CELLSPACING="0"
88 ><TR
89 ><TD
90 WIDTH="33%"
91 ALIGN="left"
92 VALIGN="top"
93 ><A
94 HREF="p1030.html"
95 ACCESSKEY="P"
96 >Prev</A
97 ></TD
98 ><TD
99 WIDTH="34%"
100 ALIGN="center"
101 VALIGN="top"
102 ><A
103 HREF="index.html"
104 ACCESSKEY="H"
105 >Home</A
106 ></TD
107 ><TD
108 WIDTH="33%"
109 ALIGN="right"
110 VALIGN="top"
111 >&nbsp;</TD
112 ></TR
113 ><TR
114 ><TD
115 WIDTH="33%"
116 ALIGN="left"
117 VALIGN="top"
118 >Library</TD
119 ><TD
120 WIDTH="34%"
121 ALIGN="center"
122 VALIGN="top"
123 ><A
124 HREF="p1030.html"
125 ACCESSKEY="U"
126 >Up</A
127 ></TD
128 ><TD
129 WIDTH="33%"
130 ALIGN="right"
131 VALIGN="top"
132 >&nbsp;</TD
133 ></TR
134 ></TABLE
135 ></DIV
136 ></BODY
137 ></HTML
138 >
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >The findlib library</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="UP"
12 TITLE="Library"
13 HREF="p1038.html"><LINK
14 REL="PREVIOUS"
15 TITLE="Library"
16 HREF="p1038.html"></HEAD
17 ><BODY
18 CLASS="CHAPTER"
19 BGCOLOR="#FFFFFF"
20 TEXT="#000000"
21 LINK="#0000FF"
22 VLINK="#840084"
23 ALINK="#0000FF"
24 ><DIV
25 CLASS="NAVHEADER"
26 ><TABLE
27 SUMMARY="Header navigation table"
28 WIDTH="100%"
29 BORDER="0"
30 CELLPADDING="0"
31 CELLSPACING="0"
32 ><TR
33 ><TH
34 COLSPAN="3"
35 ALIGN="center"
36 >The findlib Reference Manual</TH
37 ></TR
38 ><TR
39 ><TD
40 WIDTH="10%"
41 ALIGN="left"
42 VALIGN="bottom"
43 ><A
44 HREF="p1038.html"
45 ACCESSKEY="P"
46 >Prev</A
47 ></TD
48 ><TD
49 WIDTH="80%"
50 ALIGN="center"
51 VALIGN="bottom"
52 ></TD
53 ><TD
54 WIDTH="10%"
55 ALIGN="right"
56 VALIGN="bottom"
57 >&nbsp;</TD
58 ></TR
59 ></TABLE
60 ><HR
61 ALIGN="LEFT"
62 WIDTH="100%"></DIV
63 ><DIV
64 CLASS="CHAPTER"
65 ><H1
66 ><A
67 NAME="AEN1040"
68 ></A
69 >Chapter 1. The findlib library</H1
70 ><P
71 > <A
72 HREF="lib/index.html"
73 TARGET="_top"
74 >The findlib library</A
75 >
76 </P
77 ></DIV
78 ><DIV
79 CLASS="NAVFOOTER"
80 ><HR
81 ALIGN="LEFT"
82 WIDTH="100%"><TABLE
83 SUMMARY="Footer navigation table"
84 WIDTH="100%"
85 BORDER="0"
86 CELLPADDING="0"
87 CELLSPACING="0"
88 ><TR
89 ><TD
90 WIDTH="33%"
91 ALIGN="left"
92 VALIGN="top"
93 ><A
94 HREF="p1038.html"
95 ACCESSKEY="P"
96 >Prev</A
97 ></TD
98 ><TD
99 WIDTH="34%"
100 ALIGN="center"
101 VALIGN="top"
102 ><A
103 HREF="index.html"
104 ACCESSKEY="H"
105 >Home</A
106 ></TD
107 ><TD
108 WIDTH="33%"
109 ALIGN="right"
110 VALIGN="top"
111 >&nbsp;</TD
112 ></TR
113 ><TR
114 ><TD
115 WIDTH="33%"
116 ALIGN="left"
117 VALIGN="top"
118 >Library</TD
119 ><TD
120 WIDTH="34%"
121 ALIGN="center"
122 VALIGN="top"
123 ><A
124 HREF="p1038.html"
125 ACCESSKEY="U"
126 >Up</A
127 ></TD
128 ><TD
129 WIDTH="33%"
130 ALIGN="right"
131 VALIGN="top"
132 >&nbsp;</TD
133 ></TR
134 ></TABLE
135 ></DIV
136 ></BODY
137 ></HTML
138 >
6161 ></DD
6262 ><DT
6363 >II. <A
64 HREF="p685.html"
64 HREF="p693.html"
6565 >Files</A
6666 ></DT
6767 ><DD
6868 ><DL
6969 ><DT
7070 ><A
71 HREF="r687.html"
71 HREF="r695.html"
7272 >META</A
7373 >&nbsp;--&nbsp;[File that specifies metainformation of OCaml packages]</DT
7474 ><DT
7575 ><A
76 HREF="r783.html"
76 HREF="r791.html"
7777 >findlib.conf</A
7878 >&nbsp;--&nbsp;[Configuration of findlib/ocamlfind]</DT
7979 ><DT
8080 ><A
81 HREF="r972.html"
81 HREF="r980.html"
8282 >site-lib</A
8383 >&nbsp;--&nbsp;[Location of package directories]</DT
8484 ></DL
8585 ></DD
8686 ><DT
8787 >III. <A
88 HREF="p1030.html"
88 HREF="p1038.html"
8989 >Library</A
9090 ></DT
9191 ><DD
9292 ><DL
9393 ><DT
9494 >1. <A
95 HREF="c1032.html"
95 HREF="c1040.html"
9696 >The findlib library</A
9797 ></DT
9898 ></DL
176176 cyclic dependency.<br>
177177 </div>
178178
179 <pre><span id="VALresolve_path"><span class="keyword">val</span> resolve_path</span> : <code class="type">?base:string -> string -> string</code></pre><div class="info ">
179 <pre><span id="VALresolve_path"><span class="keyword">val</span> resolve_path</span> : <code class="type">?base:string -> ?explicit:bool -> string -> string</code></pre><div class="info ">
180180 Resolves findlib notation in filename paths. The notation
181181 <code class="code"> +name/path </code> can be used to refer to the subdirectory <code class="code">name</code>
182182 of the standard library directory; the continuation <code class="code"> /path </code> is
190190 <div class="param_info"><code class="code">base</code> : When the function is applied on a relative path, the
191191 <code class="code">base</code> path is prepended. Otherwise, the path is returned as
192192 it is.</div>
193 <div class="param_info"><code class="code">explicit</code> : Changes the meaning of <code class="code">base</code> so that only paths
194 count as relative that include at least one slash.</div>
193195
194196 <pre><span id="VALlist_packages"><span class="keyword">val</span> list_packages</span> : <code class="type">?tab:int -> ?descr:bool -> Pervasives.out_channel -> unit</code></pre><div class="info ">
195197 Prints the list of available packages to the <code class="code">out_channel</code>.
5757 &nbsp;&nbsp;<span class="keyword">val</span>&nbsp;package_property&nbsp;:&nbsp;string&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string<br>
5858 &nbsp;&nbsp;<span class="keyword">val</span>&nbsp;package_ancestors&nbsp;:&nbsp;string&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;list<br>
5959 &nbsp;&nbsp;<span class="keyword">val</span>&nbsp;package_deep_ancestors&nbsp;:&nbsp;string&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;list<br>
60 &nbsp;&nbsp;<span class="keyword">val</span>&nbsp;resolve_path&nbsp;:&nbsp;?base:string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string<br>
60 &nbsp;&nbsp;<span class="keyword">val</span>&nbsp;resolve_path&nbsp;:&nbsp;?base:string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;?explicit:bool&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string<br>
6161 &nbsp;&nbsp;<span class="keyword">val</span>&nbsp;list_packages&nbsp;:<br>
6262 &nbsp;&nbsp;&nbsp;&nbsp;?tab:int&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;?descr:bool&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">Pervasives</span>.out_channel&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
6363 <span class="keyword">end</span></code></body></html>
+0
-154
doc/ref-html/p1030.html less more
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Library</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="PREVIOUS"
12 TITLE="site-lib"
13 HREF="r972.html"><LINK
14 REL="NEXT"
15 TITLE="The findlib library"
16 HREF="c1032.html"></HEAD
17 ><BODY
18 CLASS="PART"
19 BGCOLOR="#FFFFFF"
20 TEXT="#000000"
21 LINK="#0000FF"
22 VLINK="#840084"
23 ALINK="#0000FF"
24 ><DIV
25 CLASS="NAVHEADER"
26 ><TABLE
27 SUMMARY="Header navigation table"
28 WIDTH="100%"
29 BORDER="0"
30 CELLPADDING="0"
31 CELLSPACING="0"
32 ><TR
33 ><TH
34 COLSPAN="3"
35 ALIGN="center"
36 >The findlib Reference Manual</TH
37 ></TR
38 ><TR
39 ><TD
40 WIDTH="10%"
41 ALIGN="left"
42 VALIGN="bottom"
43 ><A
44 HREF="r972.html"
45 ACCESSKEY="P"
46 >Prev</A
47 ></TD
48 ><TD
49 WIDTH="80%"
50 ALIGN="center"
51 VALIGN="bottom"
52 ></TD
53 ><TD
54 WIDTH="10%"
55 ALIGN="right"
56 VALIGN="bottom"
57 ><A
58 HREF="c1032.html"
59 ACCESSKEY="N"
60 >Next</A
61 ></TD
62 ></TR
63 ></TABLE
64 ><HR
65 ALIGN="LEFT"
66 WIDTH="100%"></DIV
67 ><DIV
68 CLASS="PART"
69 ><A
70 NAME="AEN1030"
71 ></A
72 ><DIV
73 CLASS="TITLEPAGE"
74 ><H1
75 CLASS="TITLE"
76 >III. Library</H1
77 ><DIV
78 CLASS="TOC"
79 ><DL
80 ><DT
81 ><B
82 >Table of Contents</B
83 ></DT
84 ><DT
85 >1. <A
86 HREF="c1032.html"
87 >The findlib library</A
88 ></DT
89 ></DL
90 ></DIV
91 ></DIV
92 ></DIV
93 ><DIV
94 CLASS="NAVFOOTER"
95 ><HR
96 ALIGN="LEFT"
97 WIDTH="100%"><TABLE
98 SUMMARY="Footer navigation table"
99 WIDTH="100%"
100 BORDER="0"
101 CELLPADDING="0"
102 CELLSPACING="0"
103 ><TR
104 ><TD
105 WIDTH="33%"
106 ALIGN="left"
107 VALIGN="top"
108 ><A
109 HREF="r972.html"
110 ACCESSKEY="P"
111 >Prev</A
112 ></TD
113 ><TD
114 WIDTH="34%"
115 ALIGN="center"
116 VALIGN="top"
117 ><A
118 HREF="index.html"
119 ACCESSKEY="H"
120 >Home</A
121 ></TD
122 ><TD
123 WIDTH="33%"
124 ALIGN="right"
125 VALIGN="top"
126 ><A
127 HREF="c1032.html"
128 ACCESSKEY="N"
129 >Next</A
130 ></TD
131 ></TR
132 ><TR
133 ><TD
134 WIDTH="33%"
135 ALIGN="left"
136 VALIGN="top"
137 >site-lib</TD
138 ><TD
139 WIDTH="34%"
140 ALIGN="center"
141 VALIGN="top"
142 >&nbsp;</TD
143 ><TD
144 WIDTH="33%"
145 ALIGN="right"
146 VALIGN="top"
147 >The findlib library</TD
148 ></TR
149 ></TABLE
150 ></DIV
151 ></BODY
152 ></HTML
153 >
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Library</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="PREVIOUS"
12 TITLE="site-lib"
13 HREF="r980.html"><LINK
14 REL="NEXT"
15 TITLE="The findlib library"
16 HREF="c1040.html"></HEAD
17 ><BODY
18 CLASS="PART"
19 BGCOLOR="#FFFFFF"
20 TEXT="#000000"
21 LINK="#0000FF"
22 VLINK="#840084"
23 ALINK="#0000FF"
24 ><DIV
25 CLASS="NAVHEADER"
26 ><TABLE
27 SUMMARY="Header navigation table"
28 WIDTH="100%"
29 BORDER="0"
30 CELLPADDING="0"
31 CELLSPACING="0"
32 ><TR
33 ><TH
34 COLSPAN="3"
35 ALIGN="center"
36 >The findlib Reference Manual</TH
37 ></TR
38 ><TR
39 ><TD
40 WIDTH="10%"
41 ALIGN="left"
42 VALIGN="bottom"
43 ><A
44 HREF="r980.html"
45 ACCESSKEY="P"
46 >Prev</A
47 ></TD
48 ><TD
49 WIDTH="80%"
50 ALIGN="center"
51 VALIGN="bottom"
52 ></TD
53 ><TD
54 WIDTH="10%"
55 ALIGN="right"
56 VALIGN="bottom"
57 ><A
58 HREF="c1040.html"
59 ACCESSKEY="N"
60 >Next</A
61 ></TD
62 ></TR
63 ></TABLE
64 ><HR
65 ALIGN="LEFT"
66 WIDTH="100%"></DIV
67 ><DIV
68 CLASS="PART"
69 ><A
70 NAME="AEN1038"
71 ></A
72 ><DIV
73 CLASS="TITLEPAGE"
74 ><H1
75 CLASS="TITLE"
76 >III. Library</H1
77 ><DIV
78 CLASS="TOC"
79 ><DL
80 ><DT
81 ><B
82 >Table of Contents</B
83 ></DT
84 ><DT
85 >1. <A
86 HREF="c1040.html"
87 >The findlib library</A
88 ></DT
89 ></DL
90 ></DIV
91 ></DIV
92 ></DIV
93 ><DIV
94 CLASS="NAVFOOTER"
95 ><HR
96 ALIGN="LEFT"
97 WIDTH="100%"><TABLE
98 SUMMARY="Footer navigation table"
99 WIDTH="100%"
100 BORDER="0"
101 CELLPADDING="0"
102 CELLSPACING="0"
103 ><TR
104 ><TD
105 WIDTH="33%"
106 ALIGN="left"
107 VALIGN="top"
108 ><A
109 HREF="r980.html"
110 ACCESSKEY="P"
111 >Prev</A
112 ></TD
113 ><TD
114 WIDTH="34%"
115 ALIGN="center"
116 VALIGN="top"
117 ><A
118 HREF="index.html"
119 ACCESSKEY="H"
120 >Home</A
121 ></TD
122 ><TD
123 WIDTH="33%"
124 ALIGN="right"
125 VALIGN="top"
126 ><A
127 HREF="c1040.html"
128 ACCESSKEY="N"
129 >Next</A
130 ></TD
131 ></TR
132 ><TR
133 ><TD
134 WIDTH="33%"
135 ALIGN="left"
136 VALIGN="top"
137 >site-lib</TD
138 ><TD
139 WIDTH="34%"
140 ALIGN="center"
141 VALIGN="top"
142 >&nbsp;</TD
143 ><TD
144 WIDTH="33%"
145 ALIGN="right"
146 VALIGN="top"
147 >The findlib library</TD
148 ></TR
149 ></TABLE
150 ></DIV
151 ></BODY
152 ></HTML
153 >
+0
-164
doc/ref-html/p685.html less more
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Files</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="PREVIOUS"
12 TITLE="ocamlfind"
13 HREF="r17.html"><LINK
14 REL="NEXT"
15 TITLE="META"
16 HREF="r687.html"></HEAD
17 ><BODY
18 CLASS="PART"
19 BGCOLOR="#FFFFFF"
20 TEXT="#000000"
21 LINK="#0000FF"
22 VLINK="#840084"
23 ALINK="#0000FF"
24 ><DIV
25 CLASS="NAVHEADER"
26 ><TABLE
27 SUMMARY="Header navigation table"
28 WIDTH="100%"
29 BORDER="0"
30 CELLPADDING="0"
31 CELLSPACING="0"
32 ><TR
33 ><TH
34 COLSPAN="3"
35 ALIGN="center"
36 >The findlib Reference Manual</TH
37 ></TR
38 ><TR
39 ><TD
40 WIDTH="10%"
41 ALIGN="left"
42 VALIGN="bottom"
43 ><A
44 HREF="r17.html"
45 ACCESSKEY="P"
46 >Prev</A
47 ></TD
48 ><TD
49 WIDTH="80%"
50 ALIGN="center"
51 VALIGN="bottom"
52 ></TD
53 ><TD
54 WIDTH="10%"
55 ALIGN="right"
56 VALIGN="bottom"
57 ><A
58 HREF="r687.html"
59 ACCESSKEY="N"
60 >Next</A
61 ></TD
62 ></TR
63 ></TABLE
64 ><HR
65 ALIGN="LEFT"
66 WIDTH="100%"></DIV
67 ><DIV
68 CLASS="PART"
69 ><A
70 NAME="AEN685"
71 ></A
72 ><DIV
73 CLASS="TITLEPAGE"
74 ><H1
75 CLASS="TITLE"
76 >II. Files</H1
77 ><DIV
78 CLASS="TOC"
79 ><DL
80 ><DT
81 ><B
82 >Table of Contents</B
83 ></DT
84 ><DT
85 ><A
86 HREF="r687.html"
87 >META</A
88 >&nbsp;--&nbsp;[File that specifies metainformation of OCaml packages]</DT
89 ><DT
90 ><A
91 HREF="r783.html"
92 >findlib.conf</A
93 >&nbsp;--&nbsp;[Configuration of findlib/ocamlfind]</DT
94 ><DT
95 ><A
96 HREF="r972.html"
97 >site-lib</A
98 >&nbsp;--&nbsp;[Location of package directories]</DT
99 ></DL
100 ></DIV
101 ></DIV
102 ></DIV
103 ><DIV
104 CLASS="NAVFOOTER"
105 ><HR
106 ALIGN="LEFT"
107 WIDTH="100%"><TABLE
108 SUMMARY="Footer navigation table"
109 WIDTH="100%"
110 BORDER="0"
111 CELLPADDING="0"
112 CELLSPACING="0"
113 ><TR
114 ><TD
115 WIDTH="33%"
116 ALIGN="left"
117 VALIGN="top"
118 ><A
119 HREF="r17.html"
120 ACCESSKEY="P"
121 >Prev</A
122 ></TD
123 ><TD
124 WIDTH="34%"
125 ALIGN="center"
126 VALIGN="top"
127 ><A
128 HREF="index.html"
129 ACCESSKEY="H"
130 >Home</A
131 ></TD
132 ><TD
133 WIDTH="33%"
134 ALIGN="right"
135 VALIGN="top"
136 ><A
137 HREF="r687.html"
138 ACCESSKEY="N"
139 >Next</A
140 ></TD
141 ></TR
142 ><TR
143 ><TD
144 WIDTH="33%"
145 ALIGN="left"
146 VALIGN="top"
147 >ocamlfind</TD
148 ><TD
149 WIDTH="34%"
150 ALIGN="center"
151 VALIGN="top"
152 >&nbsp;</TD
153 ><TD
154 WIDTH="33%"
155 ALIGN="right"
156 VALIGN="top"
157 >META</TD
158 ></TR
159 ></TABLE
160 ></DIV
161 ></BODY
162 ></HTML
163 >
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Files</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="PREVIOUS"
12 TITLE="ocamlfind"
13 HREF="r17.html"><LINK
14 REL="NEXT"
15 TITLE="META"
16 HREF="r695.html"></HEAD
17 ><BODY
18 CLASS="PART"
19 BGCOLOR="#FFFFFF"
20 TEXT="#000000"
21 LINK="#0000FF"
22 VLINK="#840084"
23 ALINK="#0000FF"
24 ><DIV
25 CLASS="NAVHEADER"
26 ><TABLE
27 SUMMARY="Header navigation table"
28 WIDTH="100%"
29 BORDER="0"
30 CELLPADDING="0"
31 CELLSPACING="0"
32 ><TR
33 ><TH
34 COLSPAN="3"
35 ALIGN="center"
36 >The findlib Reference Manual</TH
37 ></TR
38 ><TR
39 ><TD
40 WIDTH="10%"
41 ALIGN="left"
42 VALIGN="bottom"
43 ><A
44 HREF="r17.html"
45 ACCESSKEY="P"
46 >Prev</A
47 ></TD
48 ><TD
49 WIDTH="80%"
50 ALIGN="center"
51 VALIGN="bottom"
52 ></TD
53 ><TD
54 WIDTH="10%"
55 ALIGN="right"
56 VALIGN="bottom"
57 ><A
58 HREF="r695.html"
59 ACCESSKEY="N"
60 >Next</A
61 ></TD
62 ></TR
63 ></TABLE
64 ><HR
65 ALIGN="LEFT"
66 WIDTH="100%"></DIV
67 ><DIV
68 CLASS="PART"
69 ><A
70 NAME="AEN693"
71 ></A
72 ><DIV
73 CLASS="TITLEPAGE"
74 ><H1
75 CLASS="TITLE"
76 >II. Files</H1
77 ><DIV
78 CLASS="TOC"
79 ><DL
80 ><DT
81 ><B
82 >Table of Contents</B
83 ></DT
84 ><DT
85 ><A
86 HREF="r695.html"
87 >META</A
88 >&nbsp;--&nbsp;[File that specifies metainformation of OCaml packages]</DT
89 ><DT
90 ><A
91 HREF="r791.html"
92 >findlib.conf</A
93 >&nbsp;--&nbsp;[Configuration of findlib/ocamlfind]</DT
94 ><DT
95 ><A
96 HREF="r980.html"
97 >site-lib</A
98 >&nbsp;--&nbsp;[Location of package directories]</DT
99 ></DL
100 ></DIV
101 ></DIV
102 ></DIV
103 ><DIV
104 CLASS="NAVFOOTER"
105 ><HR
106 ALIGN="LEFT"
107 WIDTH="100%"><TABLE
108 SUMMARY="Footer navigation table"
109 WIDTH="100%"
110 BORDER="0"
111 CELLPADDING="0"
112 CELLSPACING="0"
113 ><TR
114 ><TD
115 WIDTH="33%"
116 ALIGN="left"
117 VALIGN="top"
118 ><A
119 HREF="r17.html"
120 ACCESSKEY="P"
121 >Prev</A
122 ></TD
123 ><TD
124 WIDTH="34%"
125 ALIGN="center"
126 VALIGN="top"
127 ><A
128 HREF="index.html"
129 ACCESSKEY="H"
130 >Home</A
131 ></TD
132 ><TD
133 WIDTH="33%"
134 ALIGN="right"
135 VALIGN="top"
136 ><A
137 HREF="r695.html"
138 ACCESSKEY="N"
139 >Next</A
140 ></TD
141 ></TR
142 ><TR
143 ><TD
144 WIDTH="33%"
145 ALIGN="left"
146 VALIGN="top"
147 >ocamlfind</TD
148 ><TD
149 WIDTH="34%"
150 ALIGN="center"
151 VALIGN="top"
152 >&nbsp;</TD
153 ><TD
154 WIDTH="33%"
155 ALIGN="right"
156 VALIGN="top"
157 >META</TD
158 ></TR
159 ></TABLE
160 ></DIV
161 ></BODY
162 ></HTML
163 >
1616 HREF="p15.html"><LINK
1717 REL="NEXT"
1818 TITLE="Files"
19 HREF="p685.html"></HEAD
19 HREF="p693.html"></HEAD
2020 ><BODY
2121 CLASS="REFENTRY"
2222 BGCOLOR="#FFFFFF"
5858 ALIGN="right"
5959 VALIGN="bottom"
6060 ><A
61 HREF="p685.html"
61 HREF="p693.html"
6262 ACCESSKEY="N"
6363 >Next</A
6464 ></TD
516516 than one archive, a separate output record is printed for every archive.</P
517517 ></DD
518518 ><DT
519 >%+a</DT
520 ><DD
521 ><P
522 >Like %a, but the filenames are converted to absolute
523 paths ("+" and "@" notations are resolved)</P
524 ></DD
525 ><DT
519526 >%A</DT
520527 ><DD
521528 ><P
522529 >Replaced by the list of archive filenames.</P
530 ></DD
531 ><DT
532 >%+A</DT
533 ><DD
534 ><P
535 >Like %A, but the filenames are converted to absolute
536 paths ("+" and "@" notations are resolved)</P
523537 ></DD
524538 ><DT
525539 >%o</DT
553567 ><DIV
554568 CLASS="REFSECT1"
555569 ><A
556 NAME="AEN182"
570 NAME="AEN190"
557571 ></A
558572 ><H2
559573 ><A
576590 ><DIV
577591 CLASS="REFSECT2"
578592 ><A
579 NAME="AEN188"
593 NAME="AEN196"
580594 ></A
581595 ><H3
582596 >Synopsis</H3
661675 ><DIV
662676 CLASS="REFSECT2"
663677 ><A
664 NAME="AEN203"
678 NAME="AEN211"
665679 ></A
666680 ><H3
667681 >Description</H3
713727 ><DIV
714728 CLASS="REFSECT2"
715729 ><A
716 NAME="AEN214"
730 NAME="AEN222"
717731 ></A
718732 ><H3
719733 >Options for compiling and linking</H3
896910 ><DIV
897911 CLASS="REFSECT2"
898912 ><A
899 NAME="AEN282"
913 NAME="AEN290"
900914 ></A
901915 ><H3
902916 >Options for preprocessing</H3
956970 ><DIV
957971 CLASS="REFSECT2"
958972 ><A
959 NAME="AEN302"
973 NAME="AEN310"
960974 ></A
961975 ><H3
962976 >Predicates for compiling and linking</H3
10581072 ><DIV
10591073 CLASS="REFSECT2"
10601074 ><A
1061 NAME="AEN346"
1075 NAME="AEN354"
10621076 ></A
10631077 ><H3
10641078 >Predicates for preprocessing</H3
11151129 ><DIV
11161130 CLASS="REFSECT2"
11171131 ><A
1118 NAME="AEN368"
1132 NAME="AEN376"
11191133 ></A
11201134 ><H3
11211135 >Special behaviour of "ocamlmktop"</H3
11321146 ><DIV
11331147 CLASS="REFSECT2"
11341148 ><A
1135 NAME="AEN372"
1149 NAME="AEN380"
11361150 ></A
11371151 ><H3
11381152 >Fixup of the dependency graph for multi-threading</H3
11481162 ><DIV
11491163 CLASS="REFSECT2"
11501164 ><A
1151 NAME="AEN375"
1165 NAME="AEN383"
11521166 ></A
11531167 ><H3
11541168 >Extended file naming</H3
11911205 ><DIV
11921206 CLASS="REFSECT2"
11931207 ><A
1194 NAME="AEN384"
1208 NAME="AEN392"
11951209 ></A
11961210 ><H3
11971211 >How to set the names of the compiler executables</H3
12631277 ><P
12641278 >Alternatively, you can change the configuration file
12651279 <A
1266 HREF="r783.html#FINDLIB.CONF"
1280 HREF="r791.html#FINDLIB.CONF"
12671281 >findlib.conf</A
12681282 >.</P
12691283 ></DIV
12711285 ><DIV
12721286 CLASS="REFSECT1"
12731287 ><A
1274 NAME="AEN404"
1288 NAME="AEN412"
12751289 ></A
12761290 ><H2
12771291 ><A
12821296 ><DIV
12831297 CLASS="REFSECT2"
12841298 ><A
1285 NAME="AEN407"
1299 NAME="AEN415"
12861300 ></A
12871301 ><H3
12881302 >Synopsis</H3
13361350 ><DIV
13371351 CLASS="REFSECT2"
13381352 ><A
1339 NAME="AEN417"
1353 NAME="AEN425"
13401354 ></A
13411355 ><H3
13421356 >Description</H3
13521366 ><DIV
13531367 CLASS="REFSECT1"
13541368 ><A
1355 NAME="AEN421"
1369 NAME="AEN429"
13561370 ></A
13571371 ><H2
13581372 ><A
13631377 ><DIV
13641378 CLASS="REFSECT2"
13651379 ><A
1366 NAME="AEN424"
1380 NAME="AEN432"
13671381 ></A
13681382 ><H3
13691383 >Synopsis</H3
14151429 ><DIV
14161430 CLASS="REFSECT2"
14171431 ><A
1418 NAME="AEN434"
1432 NAME="AEN442"
14191433 ></A
14201434 ><H3
14211435 >Description</H3
14341448 ><DIV
14351449 CLASS="REFSECT2"
14361450 ><A
1437 NAME="AEN439"
1451 NAME="AEN447"
14381452 ></A
14391453 ><H3
14401454 >Options</H3
15331547 ><DIV
15341548 CLASS="REFSECT2"
15351549 ><A
1536 NAME="AEN476"
1550 NAME="AEN484"
15371551 ></A
15381552 ><H3
15391553 >Example</H3
15631577 ><DIV
15641578 CLASS="REFSECT1"
15651579 ><A
1566 NAME="AEN483"
1580 NAME="AEN491"
15671581 ></A
15681582 ><H2
15691583 ><A
15741588 ><DIV
15751589 CLASS="REFSECT2"
15761590 ><A
1577 NAME="AEN486"
1591 NAME="AEN494"
15781592 ></A
15791593 ><H3
15801594 >Synopsis</H3
15981612 ><DIV
15991613 CLASS="REFSECT2"
16001614 ><A
1601 NAME="AEN491"
1615 NAME="AEN499"
16021616 ></A
16031617 ><H3
16041618 >Description</H3
16341648 ><DIV
16351649 CLASS="REFSECT1"
16361650 ><A
1637 NAME="AEN501"
1651 NAME="AEN509"
16381652 ></A
16391653 ><H2
16401654 ><A
16451659 ><DIV
16461660 CLASS="REFSECT2"
16471661 ><A
1648 NAME="AEN504"
1662 NAME="AEN512"
16491663 ></A
16501664 ><H3
16511665 >Synopsis</H3
16921706 ><DIV
16931707 CLASS="REFSECT2"
16941708 ><A
1695 NAME="AEN513"
1709 NAME="AEN521"
16961710 ></A
16971711 ><H3
16981712 >Description</H3
17051719 ><DIV
17061720 CLASS="REFSECT2"
17071721 ><A
1708 NAME="AEN516"
1722 NAME="AEN524"
17091723 ></A
17101724 ><H3
17111725 >Options</H3
17891803 ><DIV
17901804 CLASS="REFSECT1"
17911805 ><A
1792 NAME="AEN543"
1806 NAME="AEN551"
17931807 ></A
17941808 ><H2
17951809 ><A
18001814 ><DIV
18011815 CLASS="REFSECT2"
18021816 ><A
1803 NAME="AEN546"
1817 NAME="AEN554"
18041818 ></A
18051819 ><H3
18061820 >Synopsis</H3
18541868 ><DIV
18551869 CLASS="REFSECT2"
18561870 ><A
1857 NAME="AEN556"
1871 NAME="AEN564"
18581872 ></A
18591873 ><H3
18601874 >Description</H3
18651879 >destdir</TT
18661880 > of
18671881 <A
1868 HREF="r783.html#FINDLIB.CONF"
1882 HREF="r791.html#FINDLIB.CONF"
18691883 >findlib.conf</A
18701884 >), or in the directory
18711885 specified by the -destdir option. This
18871901 >metadir</TT
18881902 > of
18891903 <A
1890 HREF="r783.html#FINDLIB.CONF"
1904 HREF="r791.html#FINDLIB.CONF"
18911905 >findlib.conf</A
18921906 >, or to specify the
18931907 -metadir option. In this case, the file called META is copied to the
19651979 ><DIV
19661980 CLASS="REFSECT1"
19671981 ><A
1968 NAME="AEN580"
1982 NAME="AEN588"
19691983 ></A
19701984 ><H2
19711985 ><A
19761990 ><DIV
19771991 CLASS="REFSECT2"
19781992 ><A
1979 NAME="AEN583"
1993 NAME="AEN591"
19801994 ></A
19811995 ><H3
19821996 >Synopsis</H3
20102024 ><DIV
20112025 CLASS="REFSECT2"
20122026 ><A
2013 NAME="AEN590"
2027 NAME="AEN598"
20142028 ></A
20152029 ><H3
20162030 >Description</H3
20212035 >destdir</TT
20222036 > of
20232037 <A
2024 HREF="r783.html#FINDLIB.CONF"
2038 HREF="r791.html#FINDLIB.CONF"
20252039 >findlib.conf</A
20262040 >). If the package
20272041 resides at a different location, it will not be removed by default;
20382052 >metadir</TT
20392053 > variable
20402054 of <A
2041 HREF="r783.html#FINDLIB.CONF"
2055 HREF="r791.html#FINDLIB.CONF"
20422056 >findlib.conf</A
20432057 >, or by specifying
20442058 the -metadir option.</P
20642078 ><DIV
20652079 CLASS="REFSECT1"
20662080 ><A
2067 NAME="AEN603"
2081 NAME="AEN611"
20682082 ></A
20692083 ><H2
20702084 ><A
20752089 ><DIV
20762090 CLASS="REFSECT2"
20772091 ><A
2078 NAME="AEN606"
2092 NAME="AEN614"
20792093 ></A
20802094 ><H3
20812095 >Synopsis</H3
20862100 ><DIV
20872101 CLASS="REFSECT2"
20882102 ><A
2089 NAME="AEN609"
2103 NAME="AEN617"
20902104 ></A
20912105 ><H3
20922106 >Description</H3
20982112 ><DIV
20992113 CLASS="REFSECT1"
21002114 ><A
2101 NAME="AEN612"
2115 NAME="AEN620"
21022116 ></A
21032117 ><H2
21042118 ><A
21092123 ><DIV
21102124 CLASS="REFSECT2"
21112125 ><A
2112 NAME="AEN615"
2126 NAME="AEN623"
21132127 ></A
21142128 ><H3
21152129 >Synopsis</H3
21202134 ><DIV
21212135 CLASS="REFSECT2"
21222136 ><A
2123 NAME="AEN618"
2137 NAME="AEN626"
21242138 ></A
21252139 ><H3
21262140 >Description</H3
22012215 ><DIV
22022216 CLASS="REFSECT1"
22032217 ><A
2204 NAME="AEN652"
2218 NAME="AEN660"
22052219 ></A
22062220 ><H2
22072221 ><A
22122226 ><DIV
22132227 CLASS="REFSECT2"
22142228 ><A
2215 NAME="AEN655"
2229 NAME="AEN663"
22162230 ></A
22172231 ><H3
22182232 >Synopsis</H3
22382252 ><DIV
22392253 CLASS="REFSECT2"
22402254 ><A
2241 NAME="AEN661"
2255 NAME="AEN669"
22422256 ></A
22432257 ><H3
22442258 >Description</H3
22732287 ><DIV
22742288 CLASS="REFSECT1"
22752289 ><A
2276 NAME="AEN669"
2290 NAME="AEN677"
22772291 ></A
22782292 ><H2
22792293 > CONFIGURATION FILE, ENVIRONMENT VARIABLES</H2
22812295 > The configuration file and environment variables are documented
22822296 in the manual page for
22832297 <A
2284 HREF="r783.html#FINDLIB.CONF"
2298 HREF="r791.html#FINDLIB.CONF"
22852299 >findlib.conf</A
22862300 >.</P
22872301 ></DIV
22882302 ><DIV
22892303 CLASS="REFSECT1"
22902304 ><A
2291 NAME="AEN673"
2305 NAME="AEN681"
22922306 ></A
22932307 ><H2
22942308 ><A
22992313 ><DIV
23002314 CLASS="REFSECT2"
23012315 ><A
2302 NAME="AEN676"
2316 NAME="AEN684"
23032317 ></A
23042318 ><H3
23052319 >Synopsis</H3
23152329 ><DIV
23162330 CLASS="REFSECT2"
23172331 ><A
2318 NAME="AEN680"
2332 NAME="AEN688"
23192333 ></A
23202334 ><H3
23212335 >Description</H3
23302344 can switch to different command sets. For instance, the toolchain
23312345 "foo" may consist of a patched ocamlc compiler.
23322346 See <A
2333 HREF="r783.html#FINDLIB.CONF"
2347 HREF="r791.html#FINDLIB.CONF"
23342348 >findlib.conf</A
23352349 > how to
23362350 configure toolchains.</P
23702384 ALIGN="right"
23712385 VALIGN="top"
23722386 ><A
2373 HREF="p685.html"
2387 HREF="p693.html"
23742388 ACCESSKEY="N"
23752389 >Next</A
23762390 ></TD
+0
-528
doc/ref-html/r687.html less more
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >META</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="UP"
12 TITLE="Files"
13 HREF="p685.html"><LINK
14 REL="PREVIOUS"
15 TITLE="Files"
16 HREF="p685.html"><LINK
17 REL="NEXT"
18 TITLE="findlib.conf"
19 HREF="r783.html"></HEAD
20 ><BODY
21 CLASS="REFENTRY"
22 BGCOLOR="#FFFFFF"
23 TEXT="#000000"
24 LINK="#0000FF"
25 VLINK="#840084"
26 ALINK="#0000FF"
27 ><DIV
28 CLASS="NAVHEADER"
29 ><TABLE
30 SUMMARY="Header navigation table"
31 WIDTH="100%"
32 BORDER="0"
33 CELLPADDING="0"
34 CELLSPACING="0"
35 ><TR
36 ><TH
37 COLSPAN="3"
38 ALIGN="center"
39 >The findlib Reference Manual</TH
40 ></TR
41 ><TR
42 ><TD
43 WIDTH="10%"
44 ALIGN="left"
45 VALIGN="bottom"
46 ><A
47 HREF="p685.html"
48 ACCESSKEY="P"
49 >Prev</A
50 ></TD
51 ><TD
52 WIDTH="80%"
53 ALIGN="center"
54 VALIGN="bottom"
55 ></TD
56 ><TD
57 WIDTH="10%"
58 ALIGN="right"
59 VALIGN="bottom"
60 ><A
61 HREF="r783.html"
62 ACCESSKEY="N"
63 >Next</A
64 ></TD
65 ></TR
66 ></TABLE
67 ><HR
68 ALIGN="LEFT"
69 WIDTH="100%"></DIV
70 ><H1
71 ><A
72 NAME="AEN687"
73 ></A
74 >META</H1
75 ><DIV
76 CLASS="REFNAMEDIV"
77 ><A
78 NAME="META"
79 ></A
80 ><H2
81 >Name</H2
82 >META&nbsp;--&nbsp;[File that specifies metainformation of OCaml packages]</DIV
83 ><DIV
84 CLASS="REFSYNOPSISDIV"
85 ><A
86 NAME="AEN695"
87 ></A
88 ><H2
89 >GRAMMAR</H2
90 ><PRE
91 CLASS="SYNOPSIS"
92 > metafile ::= entry*
93 entry ::= assignment | addition | subpackage
94 subpackage ::= "package" pkgname '(' metafile ')'
95 assignment ::= variable_name [ formal_predicates ] '=' value
96 addition ::= variable_name [ formal_predicates ] '+=' value
97 formal_predicates ::= '(' formal_predicate { ',' formal_predicate } ')'
98 variable_name ::= name
99 formal_predicate ::= name | '-' name
100 name ::= [ 'A'-'Z' 'a'-'z' '0'-'9' '_' '.' ]+
101 pkgname ::= '"' (character but not '.')* '"'
102 value ::= '"' character* '"'</PRE
103 ></DIV
104 ><DIV
105 CLASS="REFSECT1"
106 ><A
107 NAME="AEN698"
108 ></A
109 ><H2
110 >DESCRIPTION</H2
111 ><P
112 >If a package directory contains a file with the fixed name "META" it
113 is interpreted as described here. The file is a sequence of entries
114 following the given grammar; every entry defines a variable under a
115 certain condition given by the list of formal predicates, or it
116 introduces a subpackage.</P
117 ><P
118 >There is a list of predefined variables and a list of standard
119 predicates. These variables define: required packages, description, version
120 information, directories, archive files, and linker options. The
121 predicates denote circumstances of the application of the variables:
122 whether the bytecode or the native compiler is used, if there is a
123 toploop compiled in, details of multi-threading execution, details of
124 profiling. </P
125 ></DIV
126 ><DIV
127 CLASS="REFSECT1"
128 ><A
129 NAME="AEN702"
130 ></A
131 ><H2
132 >DETAILS OF THE FILE FORMAT</H2
133 ><P
134 >The file consists of a sequence of entries which must be formed as the
135 grammar prescribes. The lexical tokens are names, values, and
136 interpunctuation like '(', ',' and so on. Note that linefeeds do not
137 play a special role, i.e. an entry definition may be given in more than
138 one line, or several definitions may occur on a single line. There may
139 be comments which begin with '#' and run until the end of the line.</P
140 ><P
141 >Names are sequences of the characters A-Z, a-z, 0-9, or _. Names
142 containing capital letters and names beginning with digits are
143 allowed but not recommended.</P
144 ><P
145 >Values are enclosed between double quotes. Values may contain any
146 character. The characters " and \ must be preceded by backslashes. </P
147 ><P
148 >Package names must not contain the '.' character because it is used
149 as delimiter of compound names.</P
150 ></DIV
151 ><DIV
152 CLASS="REFSECT1"
153 ><A
154 NAME="AEN708"
155 ></A
156 ><H2
157 >MAIN PACKAGES AND SUBPACKAGES</H2
158 ><P
159 >The outermost variable assignments and additions belong to the main
160 package. The name of the main package is not defined within META;
161 it is either the name of the directory containing META or the suffix
162 of the META file (if the name of the META file is formed like
163 META.name).</P
164 ><P
165 >The keyword <TT
166 CLASS="LITERAL"
167 >package</TT
168 > starts the definition
169 of a subpackage. There must not be two such definitions with the
170 same name. Within the parantheses, the variable assignments and
171 additions refer to the subpackage. It is allowed that a subpackage
172 contains further subpackages.</P
173 ><P
174 >The package name following <TT
175 CLASS="LITERAL"
176 >package</TT
177 >
178 is the local name relative to the main package, i.e. the
179 name of the main package is not mentioned. At all other places,
180 however, the subpackage must be prefixed by the name of the
181 containing package, separated by a '.'.</P
182 ><P
183 >Subpackages are independent of the containing package, except
184 that the subpackage points to the same installation directory as
185 the containing package (i.e. the location of the installation directory
186 is inherited from the containing package).</P
187 ></DIV
188 ><DIV
189 CLASS="REFSECT1"
190 ><A
191 NAME="AEN716"
192 ></A
193 ><H2
194 >SEMANTICS OF VARIABLE DEFINITIONS</H2
195 ><P
196 >In order to determine the value of a variable, first all assignments
197 are inspected, and the most specific assignment is taken (if there is
198 none, the empty string will be taken as value). In a second step,
199 all additions are gone through one after the other in the order
200 they occur in the file, and the values of all matching additions are
201 appended to the current value. In the following, it is further
202 clarified which assignment is the most specific, which additions
203 actually match, and how the details of the value addition look like.</P
204 ><P
205 > The most specific assignment is selected upon a set of actual
206 predicates, i.e. the set of predicates that are assumed to be true.
207 The predicates occuring in the definitions of assignments and
208 additions are called formal predicates. They may be positive or
209 negative; the latter are prepended by a '-' sign. In order to
210 determine the value after the evaluation of the assignments, the
211 following rules apply: </P
212 ><P
213 ></P
214 ><UL
215 COMPACT="COMPACT"
216 ><LI
217 STYLE="list-style-type: disc"
218 ><P
219 > An assignment can only be used if all positive formal
220 predicates are included in the set of actual predicates, and if all
221 negative formal predicates are not included in the set of actual
222 predicates. Such an assignment is called
223 <SPAN
224 CLASS="emphasis"
225 ><I
226 CLASS="EMPHASIS"
227 >applicable</I
228 ></SPAN
229 >. If there is no such assignment, the
230 variable will have no value. </P
231 ></LI
232 ><LI
233 STYLE="list-style-type: disc"
234 ><P
235 >If there is more than one applicable assignment, the definition with
236 the biggest number of formal predicates is selected.</P
237 ></LI
238 ><LI
239 STYLE="list-style-type: disc"
240 ><P
241 >If there is still more than one applicable assignment, both applicable
242 and with a maximum number of formal predicates, the definition that is defined
243 first is selected.</P
244 ></LI
245 ></UL
246 ><P
247 >An addition is matching when all positive formal predicates are
248 included in the set of actual predicates, and all negative formal
249 predicates are not included.</P
250 ><P
251 >The value of an addition is appended to the current value with
252 implicit white space as separator.</P
253 ></DIV
254 ><DIV
255 CLASS="REFSECT1"
256 ><A
257 NAME="AEN730"
258 ></A
259 ><H2
260 >VARIABLES</H2
261 ><P
262 >There is a set of variables with predefined meaning:</P
263 ><P
264 ></P
265 ><UL
266 COMPACT="COMPACT"
267 ><LI
268 STYLE="list-style-type: disc"
269 ><P
270 > The
271 variable "directory" redefines the location of the package
272 directory. Normally, the META file is the first file read in the
273 package directory, and before any other file is read, the "directory"
274 variable is evaluated in order to see if the package directory must be
275 changed. The value of the "directory" variable is determined with an
276 empty set of actual predicates. The value must be either: an absolute
277 path name of the alternate directory, or a path name relative to the
278 stdlib directory of OCaml (written "+path"), or a normal relative path
279 name (without special syntax). In the latter case, the interpretation
280 depends on whether it is contained in a main or sub package, and
281 whether the standard repository layout or the alternate layout is in
282 effect (see <A
283 HREF="r972.html#SITE-LIB"
284 >site-lib</A
285 > for these terms).
286 For a main package in standard layout the base directory is the
287 directory physically containing the META file, and the relative path
288 is interpreted for this base directory. For a main package in
289 alternate layout the base directory is the directory physically
290 containing the META.pkg files. The base directory for subpackages is
291 the package directory of the containing package. (In the case
292 that a subpackage definition does not have a "directory" setting,
293 the subpackage simply inherits the package directory of the containing
294 package. By writing a "directory" directive one can change this
295 location again.)</P
296 ></LI
297 ><LI
298 STYLE="list-style-type: disc"
299 ><P
300 >
301 The variable "requires" specifies the list of required packages. The
302 names of the packages must be separated by white space and/or commas.
303 The names must be fully qualified (i.e. when they refer to a subpackage,
304 the names of all containing packages must be prepended, separated by
305 '.').</P
306 ></LI
307 ><LI
308 STYLE="list-style-type: disc"
309 ><P
310 >
311 The variable "description" may include a short description of the
312 package (displayed by <TT
313 CLASS="LITERAL"
314 >ocamlfind list</TT
315 >).</P
316 ></LI
317 ><LI
318 STYLE="list-style-type: disc"
319 ><P
320 >
321 The variable "version" specifies the version string.</P
322 ></LI
323 ><LI
324 STYLE="list-style-type: disc"
325 ><P
326 >
327 The variable "archive" specifies the list of archive files. These
328 files should be given either as (1) plain names without any directory
329 information; they are only searched in the package directory.
330 (2) Or they have the form "+path" in which case the files are looked up
331 relative to the standard library. (3) Or they have the form "@name/file"
332 in which case the files are looked up in the package directory
333 of another package. (4) Or they are given as absolute paths.</P
334 ><P
335 >The
336 names of the files must be separated by white space and/or commas.
337 In the preprocessor stage, the archive files are passed as extensions
338 to the preprocessor (camlp4) call. In the linker stage (-linkpkg), the archive
339 files are linked. In the compiler stage, the archive files are ignored.</P
340 ></LI
341 ><LI
342 STYLE="list-style-type: disc"
343 ><P
344 >
345 The variable "linkopts" specifies additional linker options.</P
346 ></LI
347 ><LI
348 STYLE="list-style-type: disc"
349 ><P
350 >The variable "error" can be used to signal error conditions. When
351 this variable is applicable, the ocaml compilers are stopped, and
352 an error message is printed. The message is the value of the variable.</P
353 ></LI
354 ><LI
355 STYLE="list-style-type: disc"
356 ><P
357 >
358 The variable "exists_if" can be used to disable subpackages. The
359 value of "exists_if" is a file; the subpackage is hidden if this
360 file does not exist. You can also enumerate several files, and the
361 subpackage is hidden if none of the files exist.</P
362 ></LI
363 ><LI
364 STYLE="list-style-type: disc"
365 ><P
366 >The variable "ppx" is a command that is added to the compiler invocation
367 via the -ppx option (available since OCaml-4.01). If the command is
368 relative to the current directory (e.g. ./cmd), the command is expected
369 in the package directory. The special forms as defined for "archive"
370 are also available (e.g. @otherpkg/cmd). Additional arguments can be
371 specified on the ocamlfind command line with the -ppxopt option.</P
372 ></LI
373 ></UL
374 ><P
375 >It is possible to define additional variables but there is currently
376 no software interpreting them.</P
377 ></DIV
378 ><DIV
379 CLASS="REFSECT1"
380 ><A
381 NAME="AEN756"
382 ></A
383 ><H2
384 >PREDICATES</H2
385 ><P
386 >There is a list of standard predicates:</P
387 ><P
388 ></P
389 ><UL
390 COMPACT="COMPACT"
391 ><LI
392 STYLE="list-style-type: disc"
393 ><P
394 >The "byte" predicate means that the bytecode compiler is used.</P
395 ></LI
396 ><LI
397 STYLE="list-style-type: disc"
398 ><P
399 >The "native" predicate means that the native compiler is used.</P
400 ></LI
401 ><LI
402 STYLE="list-style-type: disc"
403 ><P
404 >The "toploop" predicate means that the toploop is available in the
405 linked program. It is only set when the toploop is running, not when
406 the toploop is generated.</P
407 ></LI
408 ><LI
409 STYLE="list-style-type: disc"
410 ><P
411 >The "create_toploop" predicate means that a toploop is created (using
412 ocamlmktop).</P
413 ></LI
414 ><LI
415 STYLE="list-style-type: disc"
416 ><P
417 >The "mt" predicate means that the program is multi-threaded.</P
418 ></LI
419 ><LI
420 STYLE="list-style-type: disc"
421 ><P
422 >The "mt_posix" predicate means that in the case "mt" is set, too, the
423 POSIX libraries are used to implement threads.</P
424 ></LI
425 ><LI
426 STYLE="list-style-type: disc"
427 ><P
428 >The "mt_vm" predicate means that in the case "mt" is set, too, the
429 VM-based libraries are used to implement threads.</P
430 ></LI
431 ><LI
432 STYLE="list-style-type: disc"
433 ><P
434 >The "gprof" predicate means that in the case "native" is set, too, the
435 program is compiled for profiling</P
436 ></LI
437 ><LI
438 STYLE="list-style-type: disc"
439 ><P
440 >The "autolink" predicate means that ocamlc can/will perform automatic linking.</P
441 ></LI
442 ><LI
443 STYLE="list-style-type: disc"
444 ><P
445 >The "preprocessor" predicate means that the META variables are scanned for
446 preprocessor options.</P
447 ></LI
448 ><LI
449 STYLE="list-style-type: disc"
450 ><P
451 >The "syntax" predicate means that the -syntax option is present on the
452 command line.</P
453 ></LI
454 ></UL
455 ><P
456 >In addition to these predicates, there are package predicates
457 for every package that is finally selected. Of course, this kind of
458 predicate must not be used to select "directory" and "requires"
459 variables, but for the other variables they are perfectly valid.
460 The package predicates have the form "pkg_" plus the name of the
461 package (fully qualified).</P
462 ></DIV
463 ><DIV
464 CLASS="NAVFOOTER"
465 ><HR
466 ALIGN="LEFT"
467 WIDTH="100%"><TABLE
468 SUMMARY="Footer navigation table"
469 WIDTH="100%"
470 BORDER="0"
471 CELLPADDING="0"
472 CELLSPACING="0"
473 ><TR
474 ><TD
475 WIDTH="33%"
476 ALIGN="left"
477 VALIGN="top"
478 ><A
479 HREF="p685.html"
480 ACCESSKEY="P"
481 >Prev</A
482 ></TD
483 ><TD
484 WIDTH="34%"
485 ALIGN="center"
486 VALIGN="top"
487 ><A
488 HREF="index.html"
489 ACCESSKEY="H"
490 >Home</A
491 ></TD
492 ><TD
493 WIDTH="33%"
494 ALIGN="right"
495 VALIGN="top"
496 ><A
497 HREF="r783.html"
498 ACCESSKEY="N"
499 >Next</A
500 ></TD
501 ></TR
502 ><TR
503 ><TD
504 WIDTH="33%"
505 ALIGN="left"
506 VALIGN="top"
507 >Files</TD
508 ><TD
509 WIDTH="34%"
510 ALIGN="center"
511 VALIGN="top"
512 ><A
513 HREF="p685.html"
514 ACCESSKEY="U"
515 >Up</A
516 ></TD
517 ><TD
518 WIDTH="33%"
519 ALIGN="right"
520 VALIGN="top"
521 >findlib.conf</TD
522 ></TR
523 ></TABLE
524 ></DIV
525 ></BODY
526 ></HTML
527 >
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >META</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="UP"
12 TITLE="Files"
13 HREF="p693.html"><LINK
14 REL="PREVIOUS"
15 TITLE="Files"
16 HREF="p693.html"><LINK
17 REL="NEXT"
18 TITLE="findlib.conf"
19 HREF="r791.html"></HEAD
20 ><BODY
21 CLASS="REFENTRY"
22 BGCOLOR="#FFFFFF"
23 TEXT="#000000"
24 LINK="#0000FF"
25 VLINK="#840084"
26 ALINK="#0000FF"
27 ><DIV
28 CLASS="NAVHEADER"
29 ><TABLE
30 SUMMARY="Header navigation table"
31 WIDTH="100%"
32 BORDER="0"
33 CELLPADDING="0"
34 CELLSPACING="0"
35 ><TR
36 ><TH
37 COLSPAN="3"
38 ALIGN="center"
39 >The findlib Reference Manual</TH
40 ></TR
41 ><TR
42 ><TD
43 WIDTH="10%"
44 ALIGN="left"
45 VALIGN="bottom"
46 ><A
47 HREF="p693.html"
48 ACCESSKEY="P"
49 >Prev</A
50 ></TD
51 ><TD
52 WIDTH="80%"
53 ALIGN="center"
54 VALIGN="bottom"
55 ></TD
56 ><TD
57 WIDTH="10%"
58 ALIGN="right"
59 VALIGN="bottom"
60 ><A
61 HREF="r791.html"
62 ACCESSKEY="N"
63 >Next</A
64 ></TD
65 ></TR
66 ></TABLE
67 ><HR
68 ALIGN="LEFT"
69 WIDTH="100%"></DIV
70 ><H1
71 ><A
72 NAME="AEN695"
73 ></A
74 >META</H1
75 ><DIV
76 CLASS="REFNAMEDIV"
77 ><A
78 NAME="META"
79 ></A
80 ><H2
81 >Name</H2
82 >META&nbsp;--&nbsp;[File that specifies metainformation of OCaml packages]</DIV
83 ><DIV
84 CLASS="REFSYNOPSISDIV"
85 ><A
86 NAME="AEN703"
87 ></A
88 ><H2
89 >GRAMMAR</H2
90 ><PRE
91 CLASS="SYNOPSIS"
92 > metafile ::= entry*
93 entry ::= assignment | addition | subpackage
94 subpackage ::= "package" pkgname '(' metafile ')'
95 assignment ::= variable_name [ formal_predicates ] '=' value
96 addition ::= variable_name [ formal_predicates ] '+=' value
97 formal_predicates ::= '(' formal_predicate { ',' formal_predicate } ')'
98 variable_name ::= name
99 formal_predicate ::= name | '-' name
100 name ::= [ 'A'-'Z' 'a'-'z' '0'-'9' '_' '.' ]+
101 pkgname ::= '"' (character but not '.')* '"'
102 value ::= '"' character* '"'</PRE
103 ></DIV
104 ><DIV
105 CLASS="REFSECT1"
106 ><A
107 NAME="AEN706"
108 ></A
109 ><H2
110 >DESCRIPTION</H2
111 ><P
112 >If a package directory contains a file with the fixed name "META" it
113 is interpreted as described here. The file is a sequence of entries
114 following the given grammar; every entry defines a variable under a
115 certain condition given by the list of formal predicates, or it
116 introduces a subpackage.</P
117 ><P
118 >There is a list of predefined variables and a list of standard
119 predicates. These variables define: required packages, description, version
120 information, directories, archive files, and linker options. The
121 predicates denote circumstances of the application of the variables:
122 whether the bytecode or the native compiler is used, if there is a
123 toploop compiled in, details of multi-threading execution, details of
124 profiling. </P
125 ></DIV
126 ><DIV
127 CLASS="REFSECT1"
128 ><A
129 NAME="AEN710"
130 ></A
131 ><H2
132 >DETAILS OF THE FILE FORMAT</H2
133 ><P
134 >The file consists of a sequence of entries which must be formed as the
135 grammar prescribes. The lexical tokens are names, values, and
136 interpunctuation like '(', ',' and so on. Note that linefeeds do not
137 play a special role, i.e. an entry definition may be given in more than
138 one line, or several definitions may occur on a single line. There may
139 be comments which begin with '#' and run until the end of the line.</P
140 ><P
141 >Names are sequences of the characters A-Z, a-z, 0-9, or _. Names
142 containing capital letters and names beginning with digits are
143 allowed but not recommended.</P
144 ><P
145 >Values are enclosed between double quotes. Values may contain any
146 character. The characters " and \ must be preceded by backslashes. </P
147 ><P
148 >Package names must not contain the '.' character because it is used
149 as delimiter of compound names.</P
150 ></DIV
151 ><DIV
152 CLASS="REFSECT1"
153 ><A
154 NAME="AEN716"
155 ></A
156 ><H2
157 >MAIN PACKAGES AND SUBPACKAGES</H2
158 ><P
159 >The outermost variable assignments and additions belong to the main
160 package. The name of the main package is not defined within META;
161 it is either the name of the directory containing META or the suffix
162 of the META file (if the name of the META file is formed like
163 META.name).</P
164 ><P
165 >The keyword <TT
166 CLASS="LITERAL"
167 >package</TT
168 > starts the definition
169 of a subpackage. There must not be two such definitions with the
170 same name. Within the parantheses, the variable assignments and
171 additions refer to the subpackage. It is allowed that a subpackage
172 contains further subpackages.</P
173 ><P
174 >The package name following <TT
175 CLASS="LITERAL"
176 >package</TT
177 >
178 is the local name relative to the main package, i.e. the
179 name of the main package is not mentioned. At all other places,
180 however, the subpackage must be prefixed by the name of the
181 containing package, separated by a '.'.</P
182 ><P
183 >Subpackages are independent of the containing package, except
184 that the subpackage points to the same installation directory as
185 the containing package (i.e. the location of the installation directory
186 is inherited from the containing package).</P
187 ></DIV
188 ><DIV
189 CLASS="REFSECT1"
190 ><A
191 NAME="AEN724"
192 ></A
193 ><H2
194 >SEMANTICS OF VARIABLE DEFINITIONS</H2
195 ><P
196 >In order to determine the value of a variable, first all assignments
197 are inspected, and the most specific assignment is taken (if there is
198 none, the empty string will be taken as value). In a second step,
199 all additions are gone through one after the other in the order
200 they occur in the file, and the values of all matching additions are
201 appended to the current value. In the following, it is further
202 clarified which assignment is the most specific, which additions
203 actually match, and how the details of the value addition look like.</P
204 ><P
205 > The most specific assignment is selected upon a set of actual
206 predicates, i.e. the set of predicates that are assumed to be true.
207 The predicates occuring in the definitions of assignments and
208 additions are called formal predicates. They may be positive or
209 negative; the latter are prepended by a '-' sign. In order to
210 determine the value after the evaluation of the assignments, the
211 following rules apply: </P
212 ><P
213 ></P
214 ><UL
215 COMPACT="COMPACT"
216 ><LI
217 STYLE="list-style-type: disc"
218 ><P
219 > An assignment can only be used if all positive formal
220 predicates are included in the set of actual predicates, and if all
221 negative formal predicates are not included in the set of actual
222 predicates. Such an assignment is called
223 <SPAN
224 CLASS="emphasis"
225 ><I
226 CLASS="EMPHASIS"
227 >applicable</I
228 ></SPAN
229 >. If there is no such assignment, the
230 variable will have no value. </P
231 ></LI
232 ><LI
233 STYLE="list-style-type: disc"
234 ><P
235 >If there is more than one applicable assignment, the definition with
236 the biggest number of formal predicates is selected.</P
237 ></LI
238 ><LI
239 STYLE="list-style-type: disc"
240 ><P
241 >If there is still more than one applicable assignment, both applicable
242 and with a maximum number of formal predicates, the definition that is defined
243 first is selected.</P
244 ></LI
245 ></UL
246 ><P
247 >An addition is matching when all positive formal predicates are
248 included in the set of actual predicates, and all negative formal
249 predicates are not included.</P
250 ><P
251 >The value of an addition is appended to the current value with
252 implicit white space as separator.</P
253 ></DIV
254 ><DIV
255 CLASS="REFSECT1"
256 ><A
257 NAME="AEN738"
258 ></A
259 ><H2
260 >VARIABLES</H2
261 ><P
262 >There is a set of variables with predefined meaning:</P
263 ><P
264 ></P
265 ><UL
266 COMPACT="COMPACT"
267 ><LI
268 STYLE="list-style-type: disc"
269 ><P
270 > The
271 variable "directory" redefines the location of the package
272 directory. Normally, the META file is the first file read in the
273 package directory, and before any other file is read, the "directory"
274 variable is evaluated in order to see if the package directory must be
275 changed. The value of the "directory" variable is determined with an
276 empty set of actual predicates. The value must be either: an absolute
277 path name of the alternate directory, or a path name relative to the
278 stdlib directory of OCaml (written "+path"), or a normal relative path
279 name (without special syntax). In the latter case, the interpretation
280 depends on whether it is contained in a main or sub package, and
281 whether the standard repository layout or the alternate layout is in
282 effect (see <A
283 HREF="r980.html#SITE-LIB"
284 >site-lib</A
285 > for these terms).
286 For a main package in standard layout the base directory is the
287 directory physically containing the META file, and the relative path
288 is interpreted for this base directory. For a main package in
289 alternate layout the base directory is the directory physically
290 containing the META.pkg files. The base directory for subpackages is
291 the package directory of the containing package. (In the case
292 that a subpackage definition does not have a "directory" setting,
293 the subpackage simply inherits the package directory of the containing
294 package. By writing a "directory" directive one can change this
295 location again.)</P
296 ></LI
297 ><LI
298 STYLE="list-style-type: disc"
299 ><P
300 >
301 The variable "requires" specifies the list of required packages. The
302 names of the packages must be separated by white space and/or commas.
303 The names must be fully qualified (i.e. when they refer to a subpackage,
304 the names of all containing packages must be prepended, separated by
305 '.').</P
306 ></LI
307 ><LI
308 STYLE="list-style-type: disc"
309 ><P
310 >
311 The variable "description" may include a short description of the
312 package (displayed by <TT
313 CLASS="LITERAL"
314 >ocamlfind list</TT
315 >).</P
316 ></LI
317 ><LI
318 STYLE="list-style-type: disc"
319 ><P
320 >
321 The variable "version" specifies the version string.</P
322 ></LI
323 ><LI
324 STYLE="list-style-type: disc"
325 ><P
326 >
327 The variable "archive" specifies the list of archive files. These
328 files should be given either as (1) plain names without any directory
329 information; they are only searched in the package directory.
330 (2) Or they have the form "+path" in which case the files are looked up
331 relative to the standard library. (3) Or they have the form "@name/file"
332 in which case the files are looked up in the package directory
333 of another package. (4) Or they are given as absolute paths.</P
334 ><P
335 >The
336 names of the files must be separated by white space and/or commas.
337 In the preprocessor stage, the archive files are passed as extensions
338 to the preprocessor (camlp4) call. In the linker stage (-linkpkg), the archive
339 files are linked. In the compiler stage, the archive files are ignored.</P
340 ></LI
341 ><LI
342 STYLE="list-style-type: disc"
343 ><P
344 >
345 The variable "linkopts" specifies additional linker options.</P
346 ></LI
347 ><LI
348 STYLE="list-style-type: disc"
349 ><P
350 >The variable "error" can be used to signal error conditions. When
351 this variable is applicable, the ocaml compilers are stopped, and
352 an error message is printed. The message is the value of the variable.</P
353 ></LI
354 ><LI
355 STYLE="list-style-type: disc"
356 ><P
357 >
358 The variable "exists_if" can be used to disable subpackages. The
359 value of "exists_if" is a file; the subpackage is hidden if this
360 file does not exist. You can also enumerate several files, and the
361 subpackage is hidden if none of the files exist.</P
362 ></LI
363 ><LI
364 STYLE="list-style-type: disc"
365 ><P
366 >The variable "ppx" is a command that is added to the compiler invocation
367 via the -ppx option (available since OCaml-4.01). If the command is
368 relative to the current directory (e.g. ./cmd), the command is expected
369 in the package directory. The special forms as defined for "archive"
370 are also available (e.g. @otherpkg/cmd). Additional arguments can be
371 specified on the ocamlfind command line with the -ppxopt option.</P
372 ></LI
373 ></UL
374 ><P
375 >It is possible to define additional variables but there is currently
376 no software interpreting them.</P
377 ></DIV
378 ><DIV
379 CLASS="REFSECT1"
380 ><A
381 NAME="AEN764"
382 ></A
383 ><H2
384 >PREDICATES</H2
385 ><P
386 >There is a list of standard predicates:</P
387 ><P
388 ></P
389 ><UL
390 COMPACT="COMPACT"
391 ><LI
392 STYLE="list-style-type: disc"
393 ><P
394 >The "byte" predicate means that the bytecode compiler is used.</P
395 ></LI
396 ><LI
397 STYLE="list-style-type: disc"
398 ><P
399 >The "native" predicate means that the native compiler is used.</P
400 ></LI
401 ><LI
402 STYLE="list-style-type: disc"
403 ><P
404 >The "toploop" predicate means that the toploop is available in the
405 linked program. It is only set when the toploop is running, not when
406 the toploop is generated.</P
407 ></LI
408 ><LI
409 STYLE="list-style-type: disc"
410 ><P
411 >The "create_toploop" predicate means that a toploop is created (using
412 ocamlmktop).</P
413 ></LI
414 ><LI
415 STYLE="list-style-type: disc"
416 ><P
417 >The "mt" predicate means that the program is multi-threaded.</P
418 ></LI
419 ><LI
420 STYLE="list-style-type: disc"
421 ><P
422 >The "mt_posix" predicate means that in the case "mt" is set, too, the
423 POSIX libraries are used to implement threads.</P
424 ></LI
425 ><LI
426 STYLE="list-style-type: disc"
427 ><P
428 >The "mt_vm" predicate means that in the case "mt" is set, too, the
429 VM-based libraries are used to implement threads.</P
430 ></LI
431 ><LI
432 STYLE="list-style-type: disc"
433 ><P
434 >The "gprof" predicate means that in the case "native" is set, too, the
435 program is compiled for profiling</P
436 ></LI
437 ><LI
438 STYLE="list-style-type: disc"
439 ><P
440 >The "autolink" predicate means that ocamlc can/will perform automatic linking.</P
441 ></LI
442 ><LI
443 STYLE="list-style-type: disc"
444 ><P
445 >The "preprocessor" predicate means that the META variables are scanned for
446 preprocessor options.</P
447 ></LI
448 ><LI
449 STYLE="list-style-type: disc"
450 ><P
451 >The "syntax" predicate means that the -syntax option is present on the
452 command line.</P
453 ></LI
454 ></UL
455 ><P
456 >In addition to these predicates, there are package predicates
457 for every package that is finally selected. Of course, this kind of
458 predicate must not be used to select "directory" and "requires"
459 variables, but for the other variables they are perfectly valid.
460 The package predicates have the form "pkg_" plus the name of the
461 package (fully qualified).</P
462 ></DIV
463 ><DIV
464 CLASS="NAVFOOTER"
465 ><HR
466 ALIGN="LEFT"
467 WIDTH="100%"><TABLE
468 SUMMARY="Footer navigation table"
469 WIDTH="100%"
470 BORDER="0"
471 CELLPADDING="0"
472 CELLSPACING="0"
473 ><TR
474 ><TD
475 WIDTH="33%"
476 ALIGN="left"
477 VALIGN="top"
478 ><A
479 HREF="p693.html"
480 ACCESSKEY="P"
481 >Prev</A
482 ></TD
483 ><TD
484 WIDTH="34%"
485 ALIGN="center"
486 VALIGN="top"
487 ><A
488 HREF="index.html"
489 ACCESSKEY="H"
490 >Home</A
491 ></TD
492 ><TD
493 WIDTH="33%"
494 ALIGN="right"
495 VALIGN="top"
496 ><A
497 HREF="r791.html"
498 ACCESSKEY="N"
499 >Next</A
500 ></TD
501 ></TR
502 ><TR
503 ><TD
504 WIDTH="33%"
505 ALIGN="left"
506 VALIGN="top"
507 >Files</TD
508 ><TD
509 WIDTH="34%"
510 ALIGN="center"
511 VALIGN="top"
512 ><A
513 HREF="p693.html"
514 ACCESSKEY="U"
515 >Up</A
516 ></TD
517 ><TD
518 WIDTH="33%"
519 ALIGN="right"
520 VALIGN="top"
521 >findlib.conf</TD
522 ></TR
523 ></TABLE
524 ></DIV
525 ></BODY
526 ></HTML
527 >
+0
-820
doc/ref-html/r783.html less more
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >findlib.conf</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="UP"
12 TITLE="Files"
13 HREF="p685.html"><LINK
14 REL="PREVIOUS"
15 TITLE="META"
16 HREF="r687.html"><LINK
17 REL="NEXT"
18 TITLE="site-lib"
19 HREF="r972.html"></HEAD
20 ><BODY
21 CLASS="REFENTRY"
22 BGCOLOR="#FFFFFF"
23 TEXT="#000000"
24 LINK="#0000FF"
25 VLINK="#840084"
26 ALINK="#0000FF"
27 ><DIV
28 CLASS="NAVHEADER"
29 ><TABLE
30 SUMMARY="Header navigation table"
31 WIDTH="100%"
32 BORDER="0"
33 CELLPADDING="0"
34 CELLSPACING="0"
35 ><TR
36 ><TH
37 COLSPAN="3"
38 ALIGN="center"
39 >The findlib Reference Manual</TH
40 ></TR
41 ><TR
42 ><TD
43 WIDTH="10%"
44 ALIGN="left"
45 VALIGN="bottom"
46 ><A
47 HREF="r687.html"
48 ACCESSKEY="P"
49 >Prev</A
50 ></TD
51 ><TD
52 WIDTH="80%"
53 ALIGN="center"
54 VALIGN="bottom"
55 ></TD
56 ><TD
57 WIDTH="10%"
58 ALIGN="right"
59 VALIGN="bottom"
60 ><A
61 HREF="r972.html"
62 ACCESSKEY="N"
63 >Next</A
64 ></TD
65 ></TR
66 ></TABLE
67 ><HR
68 ALIGN="LEFT"
69 WIDTH="100%"></DIV
70 ><H1
71 ><A
72 NAME="AEN783"
73 ></A
74 >findlib.conf</H1
75 ><DIV
76 CLASS="REFNAMEDIV"
77 ><A
78 NAME="FINDLIB.CONF"
79 ></A
80 ><H2
81 >Name</H2
82 >findlib.conf&nbsp;--&nbsp;[Configuration of findlib/ocamlfind]</DIV
83 ><DIV
84 CLASS="REFSECT1"
85 ><A
86 NAME="AEN791"
87 ></A
88 ><H2
89 >GENERAL</H2
90 ><P
91 >There are three possibilities to configure the findlib library:
92
93 <P
94 ></P
95 ><DIV
96 CLASS="VARIABLELIST"
97 ><DL
98 ><DT
99 >Build time:</DT
100 ><DD
101 ><P
102 > Before findlib is compiled, a "configure" script is invoked to figure
103 out the settings that are most likely to work on the system. Most
104 settings are simply entered into text files and can easily be changed
105 after installation. The following properties cannot be changed later
106 because they are compiled into the resulting binaries:
107
108 <P
109 ></P
110 ><UL
111 ><LI
112 ><P
113 > The default location of the configuration file findlib.conf. However,
114 you can set a different location by the environment variable
115 <TT
116 CLASS="LITERAL"
117 >OCAMLFIND_CONF</TT
118 >.
119 </P
120 ></LI
121 ><LI
122 ><P
123 > Whether the installed O'Caml version supports autolinking or not.
124 </P
125 ></LI
126 ></UL
127 >
128 </P
129 ></DD
130 ><DT
131 >Configuration file findlib.conf:</DT
132 ><DD
133 ><P
134 > An initial version of this file is generated by the configure script,
135 but you are free to modify it later. Most important, this file
136 contains the system-wide search path used to look up packages, and the
137 default location where to install new packages.
138 </P
139 ><P
140 > All files with the suffix ".conf" found in the directory
141 findlib.conf.d are also scanned for parameters.
142 </P
143 ></DD
144 ><DT
145 >Environment variables:</DT
146 ><DD
147 ><P
148 > The settings of findlib.conf can be overridden by environment variables.
149 </P
150 ></DD
151 ></DL
152 ></DIV
153 >
154
155 Last but not least, several settings can also be passed as
156 command-line options, or by invoking the function
157 <TT
158 CLASS="LITERAL"
159 >Findlib.init</TT
160 >. </P
161 ></DIV
162 ><DIV
163 CLASS="REFSECT1"
164 ><A
165 NAME="AEN815"
166 ></A
167 ><H2
168 >findlib.conf</H2
169 ><P
170 >The directory containing findlib.conf is determined at build time (by
171 running the configure script), the fallback default is
172 <TT
173 CLASS="LITERAL"
174 >/usr/local/etc</TT
175 >. You can set a different location by
176 changing the environment variable <TT
177 CLASS="LITERAL"
178 >OCAMLFIND_CONF</TT
179 >
180 which must contain the absolute path of findlib.conf.</P
181 ><P
182 >The file has the same syntax as <A
183 HREF="r687.html#META"
184 ><TT
185 CLASS="LITERAL"
186 >META</TT
187 ></A
188 >, i.e. it consists of a
189 number of lines with the format
190
191 <PRE
192 CLASS="PROGRAMLISTING"
193 ><TT
194 CLASS="REPLACEABLE"
195 ><I
196 >variable</I
197 ></TT
198 > = "<TT
199 CLASS="REPLACEABLE"
200 ><I
201 >value</I
202 ></TT
203 >"</PRE
204 ></P
205 ><P
206 >Here is the list of allowed variables:
207
208 <P
209 ></P
210 ><DIV
211 CLASS="VARIABLELIST"
212 ><DL
213 ><DT
214 ><TT
215 CLASS="LITERAL"
216 >path</TT
217 ></DT
218 ><DD
219 ><P
220 > The search path for META files/package directories. The variable
221 enumerates directories which are separated by colons (Windows:
222 semicolons), and these directories are tried in turn to find a certain
223 package. More exactly, if d is such a directory and p the searched
224 package, the search algorithm will first check whether d/p/META
225 exists. In this case, this META file is taken, and d/p is the package
226 directory. Second, the algorithm tries d/META.p, but the package
227 directory must be specified in this META.p file by a
228 <TT
229 CLASS="LITERAL"
230 >directory</TT
231 > directive.
232 </P
233 ><P
234 > Note that the first found META file is taken, so the order of the
235 directories in the search path counts.
236 </P
237 ><P
238 > This variable is required.
239 </P
240 ><P
241 > Example:
242
243 <PRE
244 CLASS="PROGRAMLISTING"
245 >path = "/usr/local/lib/ocaml/site-lib:/usr/lib/ocaml/site-lib"</PRE
246 >
247 </P
248 ></DD
249 ></DL
250 ></DIV
251 >
252
253
254 <P
255 ></P
256 ><DIV
257 CLASS="VARIABLELIST"
258 ><DL
259 ><DT
260 ><TT
261 CLASS="LITERAL"
262 >destdir</TT
263 ></DT
264 ><DD
265 ><P
266 > This variable determines the location where <TT
267 CLASS="LITERAL"
268 >ocamlfind
269 install</TT
270 > puts the packages by default: If d is this
271 directory, and p the package to install, a new subdirectory d/p will
272 be created containing all the files of the package.
273 </P
274 ><P
275 >Example:
276 <PRE
277 CLASS="PROGRAMLISTING"
278 >destdir = "/usr/local/lib/ocaml/site-lib"</PRE
279 >
280 </P
281 ><P
282 > This variable is required.
283 </P
284 ></DD
285 ></DL
286 ></DIV
287 >
288
289
290 <P
291 ></P
292 ><DIV
293 CLASS="VARIABLELIST"
294 ><DL
295 ><DT
296 ><TT
297 CLASS="LITERAL"
298 >metadir</TT
299 ></DT
300 ><DD
301 ><P
302 > If set, the command <TT
303 CLASS="LITERAL"
304 >ocamlfind install</TT
305 > will put the
306 META files of packages into this directory (files are named META.p
307 where p=package name); otherwise the META files are put into the
308 package directories like any other file.
309 </P
310 ><P
311 >Example:
312 <PRE
313 CLASS="PROGRAMLISTING"
314 >metadir = "/var/lib/findlib/metaregistry"</PRE
315 >
316 </P
317 ><P
318 > This variable is optional. It is not used by default.
319 </P
320 ></DD
321 ></DL
322 ></DIV
323 >
324
325
326 <P
327 ></P
328 ><DIV
329 CLASS="VARIABLELIST"
330 ><DL
331 ><DT
332 ><TT
333 CLASS="LITERAL"
334 >ocamlc</TT
335 >,
336 <TT
337 CLASS="LITERAL"
338 >ocamlopt</TT
339 >,
340 <TT
341 CLASS="LITERAL"
342 >ocamlcp</TT
343 >,
344 <TT
345 CLASS="LITERAL"
346 >ocamlmktop</TT
347 >,
348 <TT
349 CLASS="LITERAL"
350 >ocamldoc</TT
351 >,
352 <TT
353 CLASS="LITERAL"
354 >ocamldep</TT
355 >,
356 <TT
357 CLASS="LITERAL"
358 >ocamlbrowser</TT
359 ></DT
360 ><DD
361 ><P
362 > If you want to call other executables than "ocamlc", "ocamlopt",
363 "ocamlcp", "ocamlmktop", "ocamldoc", "ocamldep", and
364 "ocamlbrowser", you can
365 set the names of
366 the executables here. The command <TT
367 CLASS="LITERAL"
368 >ocamlfind</TT
369 > looks
370 into these four variables to determine the names of the compilers to
371 call.
372 </P
373 ><P
374 >Example:
375 <PRE
376 CLASS="PROGRAMLISTING"
377 >ocamlc = "ocamlc.opt"
378 ocamlopt = "ocamlopt.opt"
379 ocamlcp = "ocamlcp.opt"
380 ocamlmktop = "ocamlmktop.opt"</PRE
381 >
382 </P
383 ><P
384 > This variable is optional. It is not used by default.
385 </P
386 ></DD
387 ></DL
388 ></DIV
389 >
390
391 <P
392 ></P
393 ><DIV
394 CLASS="VARIABLELIST"
395 ><DL
396 ><DT
397 ><TT
398 CLASS="LITERAL"
399 >stdlib</TT
400 ></DT
401 ><DD
402 ><P
403 > This variable determines the location of the standard library. This must
404 be the same directory for which the O'Caml compilers are configured.
405 </P
406 ><P
407 > This variable is optional. It is not recommend to set this variable
408 unless you know what you are doing!
409 </P
410 ></DD
411 ></DL
412 ></DIV
413 >
414
415 <P
416 ></P
417 ><DIV
418 CLASS="VARIABLELIST"
419 ><DL
420 ><DT
421 ><TT
422 CLASS="LITERAL"
423 >ldconf</TT
424 ></DT
425 ><DD
426 ><P
427 > This variable determines the location of the ld.conf file. This must
428 be the same file the O'Caml compilers read in; it is updated by
429 ocamlfind when installing and removing packages. You can set this
430 variable to the special value "<TT
431 CLASS="LITERAL"
432 >ignore</TT
433 >" to disable
434 the automatic modification of the ld.conf file.
435 </P
436 ><P
437 > If not set, the ld.conf file is assumed to reside in the O'Caml
438 standard library directory.
439 </P
440 ><P
441 > This variable is optional. It is not recommended to set this variable
442 unless you know what you are doing!
443 </P
444 ></DD
445 ></DL
446 ></DIV
447 ></P
448 ><P
449 >Toolchains: It is possible to have variants of the original configuration.
450 These variants are called "toolchains" because they are intended to
451 select different compilers, e.g. patched compilers. In order to
452 set a variable for a certain toolchain, use the syntax
453
454 <PRE
455 CLASS="PROGRAMLISTING"
456 ><TT
457 CLASS="REPLACEABLE"
458 ><I
459 >variable</I
460 ></TT
461 >(<TT
462 CLASS="REPLACEABLE"
463 ><I
464 >toolchain</I
465 ></TT
466 >) = "<TT
467 CLASS="REPLACEABLE"
468 ><I
469 >value</I
470 ></TT
471 >"</PRE
472 >
473
474 For example:
475
476 <PRE
477 CLASS="PROGRAMLISTING"
478 >ocamlc(mypatch) = "ocamlc-mypatch"</PRE
479 >
480
481 When the toolchain "mypatch" is selected, this compiler will be used instead
482 of the standard one.</P
483 ><P
484 >In order to switch to a certain toolchain, use the -toolchain
485 option of <A
486 HREF="r17.html#OCAMLFIND"
487 >ocamlfind</A
488 >.</P
489 ></DIV
490 ><DIV
491 CLASS="REFSECT1"
492 ><A
493 NAME="AEN898"
494 ></A
495 ><H2
496 >Environment</H2
497 ><P
498 >A number of environment variables modifies the behaviour of
499 findlib/ocamlfind:
500
501 <P
502 ></P
503 ><DIV
504 CLASS="VARIABLELIST"
505 ><DL
506 ><DT
507 ><TT
508 CLASS="LITERAL"
509 >OCAMLFIND_CONF</TT
510 ></DT
511 ><DD
512 ><P
513 > This variable overrides the location of the configuration file
514 findlib.conf. It must contain the absolute path name of this file.
515 </P
516 ></DD
517 ></DL
518 ></DIV
519 >
520
521 <P
522 ></P
523 ><DIV
524 CLASS="VARIABLELIST"
525 ><DL
526 ><DT
527 ><TT
528 CLASS="LITERAL"
529 >OCAMLPATH</TT
530 ></DT
531 ><DD
532 ><P
533 > This variable may contain an additional search path for package
534 directories. It is treated as if the directories were prepended to
535 the configuration variable <TT
536 CLASS="LITERAL"
537 >path</TT
538 >.
539 </P
540 ></DD
541 ></DL
542 ></DIV
543 >
544
545 <P
546 ></P
547 ><DIV
548 CLASS="VARIABLELIST"
549 ><DL
550 ><DT
551 ><TT
552 CLASS="LITERAL"
553 >OCAMLFIND_DESTDIR</TT
554 ></DT
555 ><DD
556 ><P
557 > This variable overrides the configuration variable
558 <TT
559 CLASS="LITERAL"
560 >destdir</TT
561 >.
562 </P
563 ></DD
564 ></DL
565 ></DIV
566 >
567
568 <P
569 ></P
570 ><DIV
571 CLASS="VARIABLELIST"
572 ><DL
573 ><DT
574 ><TT
575 CLASS="LITERAL"
576 >OCAMLFIND_METADIR</TT
577 ></DT
578 ><DD
579 ><P
580 > This variable overrides the configuration variable
581 <TT
582 CLASS="LITERAL"
583 >metadir</TT
584 >.
585 </P
586 ></DD
587 ></DL
588 ></DIV
589 >
590
591 <P
592 ></P
593 ><DIV
594 CLASS="VARIABLELIST"
595 ><DL
596 ><DT
597 ><TT
598 CLASS="LITERAL"
599 >OCAMLFIND_COMMANDS</TT
600 ></DT
601 ><DD
602 ><P
603 > This variable overrides the configuration variables
604 <TT
605 CLASS="LITERAL"
606 >ocamlc</TT
607 >, <TT
608 CLASS="LITERAL"
609 >ocamlopt</TT
610 >,
611 <TT
612 CLASS="LITERAL"
613 >ocamlcp</TT
614 >, <TT
615 CLASS="LITERAL"
616 >ocamlmktop</TT
617 >,
618 <TT
619 CLASS="LITERAL"
620 >ocamldoc</TT
621 >, <TT
622 CLASS="LITERAL"
623 >ocamldep</TT
624 >, and/or
625 <TT
626 CLASS="LITERAL"
627 >ocamlbrowser</TT
628 >.
629 Its value must conform to the syntax
630
631 <PRE
632 CLASS="PROGRAMLISTING"
633 >ocamlc=<TT
634 CLASS="REPLACEABLE"
635 ><I
636 >name</I
637 ></TT
638 > ocamlopt=<TT
639 CLASS="REPLACEABLE"
640 ><I
641 >name</I
642 ></TT
643 > ocamlcp=<TT
644 CLASS="REPLACEABLE"
645 ><I
646 >name</I
647 ></TT
648 > ocamlmktop=<TT
649 CLASS="REPLACEABLE"
650 ><I
651 >name</I
652 ></TT
653 > ocamldoc=<TT
654 CLASS="REPLACEABLE"
655 ><I
656 >name</I
657 ></TT
658 > ocamldep=<TT
659 CLASS="REPLACEABLE"
660 ><I
661 >name</I
662 ></TT
663 > ocamlbrowser=<TT
664 CLASS="REPLACEABLE"
665 ><I
666 >name</I
667 ></TT
668 ></PRE
669 >
670 </P
671 ><P
672 >Example:
673 <PRE
674 CLASS="PROGRAMLISTING"
675 >ocamlc=ocamlc-3.00 ocamlopt=ocamlopt-3.00 ocamlcp=ocamlcp-3.00 ocamlmktop=ocamlmktop-3.00</PRE
676 >
677 </P
678 ></DD
679 ></DL
680 ></DIV
681 >
682
683 <P
684 ></P
685 ><DIV
686 CLASS="VARIABLELIST"
687 ><DL
688 ><DT
689 ><TT
690 CLASS="LITERAL"
691 >CAMLLIB</TT
692 > or <TT
693 CLASS="LITERAL"
694 >OCAMLLIB</TT
695 ></DT
696 ><DD
697 ><P
698 > This variable overrides the configuration variable
699 <TT
700 CLASS="LITERAL"
701 >stdlib</TT
702 >.
703 </P
704 ></DD
705 ></DL
706 ></DIV
707 >
708
709 <P
710 ></P
711 ><DIV
712 CLASS="VARIABLELIST"
713 ><DL
714 ><DT
715 ><TT
716 CLASS="LITERAL"
717 >OCAMLFIND_LDCONF</TT
718 ></DT
719 ><DD
720 ><P
721 > This variable overrides the configuration variable
722 <TT
723 CLASS="LITERAL"
724 >ldconf</TT
725 >.
726 </P
727 ></DD
728 ></DL
729 ></DIV
730 >
731
732 <P
733 ></P
734 ><DIV
735 CLASS="VARIABLELIST"
736 ><DL
737 ><DT
738 ><TT
739 CLASS="LITERAL"
740 >OCAMLFIND_IGNORE_DUPS_IN</TT
741 ></DT
742 ><DD
743 ><P
744 > This variable instructs findlib not to emit warnings that packages
745 or module occur several times. The variable must be set to the
746 directory where the packages reside that are to be ignored for this
747 warning.
748 </P
749 ></DD
750 ></DL
751 ></DIV
752 >
753 &#13;</P
754 ></DIV
755 ><DIV
756 CLASS="NAVFOOTER"
757 ><HR
758 ALIGN="LEFT"
759 WIDTH="100%"><TABLE
760 SUMMARY="Footer navigation table"
761 WIDTH="100%"
762 BORDER="0"
763 CELLPADDING="0"
764 CELLSPACING="0"
765 ><TR
766 ><TD
767 WIDTH="33%"
768 ALIGN="left"
769 VALIGN="top"
770 ><A
771 HREF="r687.html"
772 ACCESSKEY="P"
773 >Prev</A
774 ></TD
775 ><TD
776 WIDTH="34%"
777 ALIGN="center"
778 VALIGN="top"
779 ><A
780 HREF="index.html"
781 ACCESSKEY="H"
782 >Home</A
783 ></TD
784 ><TD
785 WIDTH="33%"
786 ALIGN="right"
787 VALIGN="top"
788 ><A
789 HREF="r972.html"
790 ACCESSKEY="N"
791 >Next</A
792 ></TD
793 ></TR
794 ><TR
795 ><TD
796 WIDTH="33%"
797 ALIGN="left"
798 VALIGN="top"
799 >META</TD
800 ><TD
801 WIDTH="34%"
802 ALIGN="center"
803 VALIGN="top"
804 ><A
805 HREF="p685.html"
806 ACCESSKEY="U"
807 >Up</A
808 ></TD
809 ><TD
810 WIDTH="33%"
811 ALIGN="right"
812 VALIGN="top"
813 >site-lib</TD
814 ></TR
815 ></TABLE
816 ></DIV
817 ></BODY
818 ></HTML
819 >
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >findlib.conf</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="UP"
12 TITLE="Files"
13 HREF="p693.html"><LINK
14 REL="PREVIOUS"
15 TITLE="META"
16 HREF="r695.html"><LINK
17 REL="NEXT"
18 TITLE="site-lib"
19 HREF="r980.html"></HEAD
20 ><BODY
21 CLASS="REFENTRY"
22 BGCOLOR="#FFFFFF"
23 TEXT="#000000"
24 LINK="#0000FF"
25 VLINK="#840084"
26 ALINK="#0000FF"
27 ><DIV
28 CLASS="NAVHEADER"
29 ><TABLE
30 SUMMARY="Header navigation table"
31 WIDTH="100%"
32 BORDER="0"
33 CELLPADDING="0"
34 CELLSPACING="0"
35 ><TR
36 ><TH
37 COLSPAN="3"
38 ALIGN="center"
39 >The findlib Reference Manual</TH
40 ></TR
41 ><TR
42 ><TD
43 WIDTH="10%"
44 ALIGN="left"
45 VALIGN="bottom"
46 ><A
47 HREF="r695.html"
48 ACCESSKEY="P"
49 >Prev</A
50 ></TD
51 ><TD
52 WIDTH="80%"
53 ALIGN="center"
54 VALIGN="bottom"
55 ></TD
56 ><TD
57 WIDTH="10%"
58 ALIGN="right"
59 VALIGN="bottom"
60 ><A
61 HREF="r980.html"
62 ACCESSKEY="N"
63 >Next</A
64 ></TD
65 ></TR
66 ></TABLE
67 ><HR
68 ALIGN="LEFT"
69 WIDTH="100%"></DIV
70 ><H1
71 ><A
72 NAME="AEN791"
73 ></A
74 >findlib.conf</H1
75 ><DIV
76 CLASS="REFNAMEDIV"
77 ><A
78 NAME="FINDLIB.CONF"
79 ></A
80 ><H2
81 >Name</H2
82 >findlib.conf&nbsp;--&nbsp;[Configuration of findlib/ocamlfind]</DIV
83 ><DIV
84 CLASS="REFSECT1"
85 ><A
86 NAME="AEN799"
87 ></A
88 ><H2
89 >GENERAL</H2
90 ><P
91 >There are three possibilities to configure the findlib library:
92
93 <P
94 ></P
95 ><DIV
96 CLASS="VARIABLELIST"
97 ><DL
98 ><DT
99 >Build time:</DT
100 ><DD
101 ><P
102 > Before findlib is compiled, a "configure" script is invoked to figure
103 out the settings that are most likely to work on the system. Most
104 settings are simply entered into text files and can easily be changed
105 after installation. The following properties cannot be changed later
106 because they are compiled into the resulting binaries:
107
108 <P
109 ></P
110 ><UL
111 ><LI
112 ><P
113 > The default location of the configuration file findlib.conf. However,
114 you can set a different location by the environment variable
115 <TT
116 CLASS="LITERAL"
117 >OCAMLFIND_CONF</TT
118 >.
119 </P
120 ></LI
121 ><LI
122 ><P
123 > Whether the installed O'Caml version supports autolinking or not.
124 </P
125 ></LI
126 ></UL
127 >
128 </P
129 ></DD
130 ><DT
131 >Configuration file findlib.conf:</DT
132 ><DD
133 ><P
134 > An initial version of this file is generated by the configure script,
135 but you are free to modify it later. Most important, this file
136 contains the system-wide search path used to look up packages, and the
137 default location where to install new packages.
138 </P
139 ><P
140 > All files with the suffix ".conf" found in the directory
141 findlib.conf.d are also scanned for parameters.
142 </P
143 ></DD
144 ><DT
145 >Environment variables:</DT
146 ><DD
147 ><P
148 > The settings of findlib.conf can be overridden by environment variables.
149 </P
150 ></DD
151 ></DL
152 ></DIV
153 >
154
155 Last but not least, several settings can also be passed as
156 command-line options, or by invoking the function
157 <TT
158 CLASS="LITERAL"
159 >Findlib.init</TT
160 >. </P
161 ></DIV
162 ><DIV
163 CLASS="REFSECT1"
164 ><A
165 NAME="AEN823"
166 ></A
167 ><H2
168 >findlib.conf</H2
169 ><P
170 >The directory containing findlib.conf is determined at build time (by
171 running the configure script), the fallback default is
172 <TT
173 CLASS="LITERAL"
174 >/usr/local/etc</TT
175 >. You can set a different location by
176 changing the environment variable <TT
177 CLASS="LITERAL"
178 >OCAMLFIND_CONF</TT
179 >
180 which must contain the absolute path of findlib.conf.</P
181 ><P
182 >The file has the same syntax as <A
183 HREF="r695.html#META"
184 ><TT
185 CLASS="LITERAL"
186 >META</TT
187 ></A
188 >, i.e. it consists of a
189 number of lines with the format
190
191 <PRE
192 CLASS="PROGRAMLISTING"
193 ><TT
194 CLASS="REPLACEABLE"
195 ><I
196 >variable</I
197 ></TT
198 > = "<TT
199 CLASS="REPLACEABLE"
200 ><I
201 >value</I
202 ></TT
203 >"</PRE
204 ></P
205 ><P
206 >Here is the list of allowed variables:
207
208 <P
209 ></P
210 ><DIV
211 CLASS="VARIABLELIST"
212 ><DL
213 ><DT
214 ><TT
215 CLASS="LITERAL"
216 >path</TT
217 ></DT
218 ><DD
219 ><P
220 > The search path for META files/package directories. The variable
221 enumerates directories which are separated by colons (Windows:
222 semicolons), and these directories are tried in turn to find a certain
223 package. More exactly, if d is such a directory and p the searched
224 package, the search algorithm will first check whether d/p/META
225 exists. In this case, this META file is taken, and d/p is the package
226 directory. Second, the algorithm tries d/META.p, but the package
227 directory must be specified in this META.p file by a
228 <TT
229 CLASS="LITERAL"
230 >directory</TT
231 > directive.
232 </P
233 ><P
234 > Note that the first found META file is taken, so the order of the
235 directories in the search path counts.
236 </P
237 ><P
238 > This variable is required.
239 </P
240 ><P
241 > Example:
242
243 <PRE
244 CLASS="PROGRAMLISTING"
245 >path = "/usr/local/lib/ocaml/site-lib:/usr/lib/ocaml/site-lib"</PRE
246 >
247 </P
248 ></DD
249 ></DL
250 ></DIV
251 >
252
253
254 <P
255 ></P
256 ><DIV
257 CLASS="VARIABLELIST"
258 ><DL
259 ><DT
260 ><TT
261 CLASS="LITERAL"
262 >destdir</TT
263 ></DT
264 ><DD
265 ><P
266 > This variable determines the location where <TT
267 CLASS="LITERAL"
268 >ocamlfind
269 install</TT
270 > puts the packages by default: If d is this
271 directory, and p the package to install, a new subdirectory d/p will
272 be created containing all the files of the package.
273 </P
274 ><P
275 >Example:
276 <PRE
277 CLASS="PROGRAMLISTING"
278 >destdir = "/usr/local/lib/ocaml/site-lib"</PRE
279 >
280 </P
281 ><P
282 > This variable is required.
283 </P
284 ></DD
285 ></DL
286 ></DIV
287 >
288
289
290 <P
291 ></P
292 ><DIV
293 CLASS="VARIABLELIST"
294 ><DL
295 ><DT
296 ><TT
297 CLASS="LITERAL"
298 >metadir</TT
299 ></DT
300 ><DD
301 ><P
302 > If set, the command <TT
303 CLASS="LITERAL"
304 >ocamlfind install</TT
305 > will put the
306 META files of packages into this directory (files are named META.p
307 where p=package name); otherwise the META files are put into the
308 package directories like any other file.
309 </P
310 ><P
311 >Example:
312 <PRE
313 CLASS="PROGRAMLISTING"
314 >metadir = "/var/lib/findlib/metaregistry"</PRE
315 >
316 </P
317 ><P
318 > This variable is optional. It is not used by default.
319 </P
320 ></DD
321 ></DL
322 ></DIV
323 >
324
325
326 <P
327 ></P
328 ><DIV
329 CLASS="VARIABLELIST"
330 ><DL
331 ><DT
332 ><TT
333 CLASS="LITERAL"
334 >ocamlc</TT
335 >,
336 <TT
337 CLASS="LITERAL"
338 >ocamlopt</TT
339 >,
340 <TT
341 CLASS="LITERAL"
342 >ocamlcp</TT
343 >,
344 <TT
345 CLASS="LITERAL"
346 >ocamlmktop</TT
347 >,
348 <TT
349 CLASS="LITERAL"
350 >ocamldoc</TT
351 >,
352 <TT
353 CLASS="LITERAL"
354 >ocamldep</TT
355 >,
356 <TT
357 CLASS="LITERAL"
358 >ocamlbrowser</TT
359 ></DT
360 ><DD
361 ><P
362 > If you want to call other executables than "ocamlc", "ocamlopt",
363 "ocamlcp", "ocamlmktop", "ocamldoc", "ocamldep", and
364 "ocamlbrowser", you can
365 set the names of
366 the executables here. The command <TT
367 CLASS="LITERAL"
368 >ocamlfind</TT
369 > looks
370 into these four variables to determine the names of the compilers to
371 call.
372 </P
373 ><P
374 >Example:
375 <PRE
376 CLASS="PROGRAMLISTING"
377 >ocamlc = "ocamlc.opt"
378 ocamlopt = "ocamlopt.opt"
379 ocamlcp = "ocamlcp.opt"
380 ocamlmktop = "ocamlmktop.opt"</PRE
381 >
382 </P
383 ><P
384 > This variable is optional. It is not used by default.
385 </P
386 ></DD
387 ></DL
388 ></DIV
389 >
390
391 <P
392 ></P
393 ><DIV
394 CLASS="VARIABLELIST"
395 ><DL
396 ><DT
397 ><TT
398 CLASS="LITERAL"
399 >stdlib</TT
400 ></DT
401 ><DD
402 ><P
403 > This variable determines the location of the standard library. This must
404 be the same directory for which the O'Caml compilers are configured.
405 </P
406 ><P
407 > This variable is optional. It is not recommend to set this variable
408 unless you know what you are doing!
409 </P
410 ></DD
411 ></DL
412 ></DIV
413 >
414
415 <P
416 ></P
417 ><DIV
418 CLASS="VARIABLELIST"
419 ><DL
420 ><DT
421 ><TT
422 CLASS="LITERAL"
423 >ldconf</TT
424 ></DT
425 ><DD
426 ><P
427 > This variable determines the location of the ld.conf file. This must
428 be the same file the O'Caml compilers read in; it is updated by
429 ocamlfind when installing and removing packages. You can set this
430 variable to the special value "<TT
431 CLASS="LITERAL"
432 >ignore</TT
433 >" to disable
434 the automatic modification of the ld.conf file.
435 </P
436 ><P
437 > If not set, the ld.conf file is assumed to reside in the O'Caml
438 standard library directory.
439 </P
440 ><P
441 > This variable is optional. It is not recommended to set this variable
442 unless you know what you are doing!
443 </P
444 ></DD
445 ></DL
446 ></DIV
447 ></P
448 ><P
449 >Toolchains: It is possible to have variants of the original configuration.
450 These variants are called "toolchains" because they are intended to
451 select different compilers, e.g. patched compilers. In order to
452 set a variable for a certain toolchain, use the syntax
453
454 <PRE
455 CLASS="PROGRAMLISTING"
456 ><TT
457 CLASS="REPLACEABLE"
458 ><I
459 >variable</I
460 ></TT
461 >(<TT
462 CLASS="REPLACEABLE"
463 ><I
464 >toolchain</I
465 ></TT
466 >) = "<TT
467 CLASS="REPLACEABLE"
468 ><I
469 >value</I
470 ></TT
471 >"</PRE
472 >
473
474 For example:
475
476 <PRE
477 CLASS="PROGRAMLISTING"
478 >ocamlc(mypatch) = "ocamlc-mypatch"</PRE
479 >
480
481 When the toolchain "mypatch" is selected, this compiler will be used instead
482 of the standard one.</P
483 ><P
484 >In order to switch to a certain toolchain, use the -toolchain
485 option of <A
486 HREF="r17.html#OCAMLFIND"
487 >ocamlfind</A
488 >.</P
489 ></DIV
490 ><DIV
491 CLASS="REFSECT1"
492 ><A
493 NAME="AEN906"
494 ></A
495 ><H2
496 >Environment</H2
497 ><P
498 >A number of environment variables modifies the behaviour of
499 findlib/ocamlfind:
500
501 <P
502 ></P
503 ><DIV
504 CLASS="VARIABLELIST"
505 ><DL
506 ><DT
507 ><TT
508 CLASS="LITERAL"
509 >OCAMLFIND_CONF</TT
510 ></DT
511 ><DD
512 ><P
513 > This variable overrides the location of the configuration file
514 findlib.conf. It must contain the absolute path name of this file.
515 </P
516 ></DD
517 ></DL
518 ></DIV
519 >
520
521 <P
522 ></P
523 ><DIV
524 CLASS="VARIABLELIST"
525 ><DL
526 ><DT
527 ><TT
528 CLASS="LITERAL"
529 >OCAMLPATH</TT
530 ></DT
531 ><DD
532 ><P
533 > This variable may contain an additional search path for package
534 directories. It is treated as if the directories were prepended to
535 the configuration variable <TT
536 CLASS="LITERAL"
537 >path</TT
538 >.
539 </P
540 ></DD
541 ></DL
542 ></DIV
543 >
544
545 <P
546 ></P
547 ><DIV
548 CLASS="VARIABLELIST"
549 ><DL
550 ><DT
551 ><TT
552 CLASS="LITERAL"
553 >OCAMLFIND_DESTDIR</TT
554 ></DT
555 ><DD
556 ><P
557 > This variable overrides the configuration variable
558 <TT
559 CLASS="LITERAL"
560 >destdir</TT
561 >.
562 </P
563 ></DD
564 ></DL
565 ></DIV
566 >
567
568 <P
569 ></P
570 ><DIV
571 CLASS="VARIABLELIST"
572 ><DL
573 ><DT
574 ><TT
575 CLASS="LITERAL"
576 >OCAMLFIND_METADIR</TT
577 ></DT
578 ><DD
579 ><P
580 > This variable overrides the configuration variable
581 <TT
582 CLASS="LITERAL"
583 >metadir</TT
584 >.
585 </P
586 ></DD
587 ></DL
588 ></DIV
589 >
590
591 <P
592 ></P
593 ><DIV
594 CLASS="VARIABLELIST"
595 ><DL
596 ><DT
597 ><TT
598 CLASS="LITERAL"
599 >OCAMLFIND_COMMANDS</TT
600 ></DT
601 ><DD
602 ><P
603 > This variable overrides the configuration variables
604 <TT
605 CLASS="LITERAL"
606 >ocamlc</TT
607 >, <TT
608 CLASS="LITERAL"
609 >ocamlopt</TT
610 >,
611 <TT
612 CLASS="LITERAL"
613 >ocamlcp</TT
614 >, <TT
615 CLASS="LITERAL"
616 >ocamlmktop</TT
617 >,
618 <TT
619 CLASS="LITERAL"
620 >ocamldoc</TT
621 >, <TT
622 CLASS="LITERAL"
623 >ocamldep</TT
624 >, and/or
625 <TT
626 CLASS="LITERAL"
627 >ocamlbrowser</TT
628 >.
629 Its value must conform to the syntax
630
631 <PRE
632 CLASS="PROGRAMLISTING"
633 >ocamlc=<TT
634 CLASS="REPLACEABLE"
635 ><I
636 >name</I
637 ></TT
638 > ocamlopt=<TT
639 CLASS="REPLACEABLE"
640 ><I
641 >name</I
642 ></TT
643 > ocamlcp=<TT
644 CLASS="REPLACEABLE"
645 ><I
646 >name</I
647 ></TT
648 > ocamlmktop=<TT
649 CLASS="REPLACEABLE"
650 ><I
651 >name</I
652 ></TT
653 > ocamldoc=<TT
654 CLASS="REPLACEABLE"
655 ><I
656 >name</I
657 ></TT
658 > ocamldep=<TT
659 CLASS="REPLACEABLE"
660 ><I
661 >name</I
662 ></TT
663 > ocamlbrowser=<TT
664 CLASS="REPLACEABLE"
665 ><I
666 >name</I
667 ></TT
668 ></PRE
669 >
670 </P
671 ><P
672 >Example:
673 <PRE
674 CLASS="PROGRAMLISTING"
675 >ocamlc=ocamlc-3.00 ocamlopt=ocamlopt-3.00 ocamlcp=ocamlcp-3.00 ocamlmktop=ocamlmktop-3.00</PRE
676 >
677 </P
678 ></DD
679 ></DL
680 ></DIV
681 >
682
683 <P
684 ></P
685 ><DIV
686 CLASS="VARIABLELIST"
687 ><DL
688 ><DT
689 ><TT
690 CLASS="LITERAL"
691 >CAMLLIB</TT
692 > or <TT
693 CLASS="LITERAL"
694 >OCAMLLIB</TT
695 ></DT
696 ><DD
697 ><P
698 > This variable overrides the configuration variable
699 <TT
700 CLASS="LITERAL"
701 >stdlib</TT
702 >.
703 </P
704 ></DD
705 ></DL
706 ></DIV
707 >
708
709 <P
710 ></P
711 ><DIV
712 CLASS="VARIABLELIST"
713 ><DL
714 ><DT
715 ><TT
716 CLASS="LITERAL"
717 >OCAMLFIND_LDCONF</TT
718 ></DT
719 ><DD
720 ><P
721 > This variable overrides the configuration variable
722 <TT
723 CLASS="LITERAL"
724 >ldconf</TT
725 >.
726 </P
727 ></DD
728 ></DL
729 ></DIV
730 >
731
732 <P
733 ></P
734 ><DIV
735 CLASS="VARIABLELIST"
736 ><DL
737 ><DT
738 ><TT
739 CLASS="LITERAL"
740 >OCAMLFIND_IGNORE_DUPS_IN</TT
741 ></DT
742 ><DD
743 ><P
744 > This variable instructs findlib not to emit warnings that packages
745 or module occur several times. The variable must be set to the
746 directory where the packages reside that are to be ignored for this
747 warning.
748 </P
749 ></DD
750 ></DL
751 ></DIV
752 >
753 &#13;</P
754 ></DIV
755 ><DIV
756 CLASS="NAVFOOTER"
757 ><HR
758 ALIGN="LEFT"
759 WIDTH="100%"><TABLE
760 SUMMARY="Footer navigation table"
761 WIDTH="100%"
762 BORDER="0"
763 CELLPADDING="0"
764 CELLSPACING="0"
765 ><TR
766 ><TD
767 WIDTH="33%"
768 ALIGN="left"
769 VALIGN="top"
770 ><A
771 HREF="r695.html"
772 ACCESSKEY="P"
773 >Prev</A
774 ></TD
775 ><TD
776 WIDTH="34%"
777 ALIGN="center"
778 VALIGN="top"
779 ><A
780 HREF="index.html"
781 ACCESSKEY="H"
782 >Home</A
783 ></TD
784 ><TD
785 WIDTH="33%"
786 ALIGN="right"
787 VALIGN="top"
788 ><A
789 HREF="r980.html"
790 ACCESSKEY="N"
791 >Next</A
792 ></TD
793 ></TR
794 ><TR
795 ><TD
796 WIDTH="33%"
797 ALIGN="left"
798 VALIGN="top"
799 >META</TD
800 ><TD
801 WIDTH="34%"
802 ALIGN="center"
803 VALIGN="top"
804 ><A
805 HREF="p693.html"
806 ACCESSKEY="U"
807 >Up</A
808 ></TD
809 ><TD
810 WIDTH="33%"
811 ALIGN="right"
812 VALIGN="top"
813 >site-lib</TD
814 ></TR
815 ></TABLE
816 ></DIV
817 ></BODY
818 ></HTML
819 >
+0
-401
doc/ref-html/r972.html less more
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >site-lib</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="UP"
12 TITLE="Files"
13 HREF="p685.html"><LINK
14 REL="PREVIOUS"
15 TITLE="findlib.conf"
16 HREF="r783.html"><LINK
17 REL="NEXT"
18 TITLE="Library"
19 HREF="p1030.html"></HEAD
20 ><BODY
21 CLASS="REFENTRY"
22 BGCOLOR="#FFFFFF"
23 TEXT="#000000"
24 LINK="#0000FF"
25 VLINK="#840084"
26 ALINK="#0000FF"
27 ><DIV
28 CLASS="NAVHEADER"
29 ><TABLE
30 SUMMARY="Header navigation table"
31 WIDTH="100%"
32 BORDER="0"
33 CELLPADDING="0"
34 CELLSPACING="0"
35 ><TR
36 ><TH
37 COLSPAN="3"
38 ALIGN="center"
39 >The findlib Reference Manual</TH
40 ></TR
41 ><TR
42 ><TD
43 WIDTH="10%"
44 ALIGN="left"
45 VALIGN="bottom"
46 ><A
47 HREF="r783.html"
48 ACCESSKEY="P"
49 >Prev</A
50 ></TD
51 ><TD
52 WIDTH="80%"
53 ALIGN="center"
54 VALIGN="bottom"
55 ></TD
56 ><TD
57 WIDTH="10%"
58 ALIGN="right"
59 VALIGN="bottom"
60 ><A
61 HREF="p1030.html"
62 ACCESSKEY="N"
63 >Next</A
64 ></TD
65 ></TR
66 ></TABLE
67 ><HR
68 ALIGN="LEFT"
69 WIDTH="100%"></DIV
70 ><H1
71 ><A
72 NAME="AEN972"
73 ></A
74 >site-lib</H1
75 ><DIV
76 CLASS="REFNAMEDIV"
77 ><A
78 NAME="SITE-LIB"
79 ></A
80 ><H2
81 >Name</H2
82 >site-lib&nbsp;--&nbsp;[Location of package directories]</DIV
83 ><DIV
84 CLASS="REFSYNOPSISDIV"
85 ><A
86 NAME="AEN980"
87 ></A
88 ><H2
89 >STANDARD LAYOUT</H2
90 ><PRE
91 CLASS="SYNOPSIS"
92 >...somewhere in the filesystem hierarchy...
93 |
94 \
95 site-lib
96 |
97 +- (optional) stublibs
98 +- (optional) postinstall
99 +- (optional) postremove
100 |
101 +- <TT
102 CLASS="REPLACEABLE"
103 ><I
104 >package1</I
105 ></TT
106 >
107 | |
108 | +- META
109 | +- <TT
110 CLASS="REPLACEABLE"
111 ><I
112 >archive files</I
113 ></TT
114 >
115 | +- <TT
116 CLASS="REPLACEABLE"
117 ><I
118 >interface definitions</I
119 ></TT
120 >
121 |
122 +- <TT
123 CLASS="REPLACEABLE"
124 ><I
125 >package2</I
126 ></TT
127 >
128 +
129 :
130 :
131 \
132 <TT
133 CLASS="REPLACEABLE"
134 ><I
135 >packageN</I
136 ></TT
137 ></PRE
138 ></DIV
139 ><DIV
140 CLASS="REFSECT1"
141 ><A
142 NAME="AEN988"
143 ></A
144 ><H2
145 >DESCRIPTION</H2
146 ><P
147 >Every installation of "findlib" has a default location for package
148 directories, which is normally a directory called "site-lib". The
149 location can be set by the configuration variables
150 <TT
151 CLASS="LITERAL"
152 >path</TT
153 > (used to look up packages), and
154 <TT
155 CLASS="LITERAL"
156 >destdir</TT
157 > (used to install new packages);
158 see <A
159 HREF="r783.html#FINDLIB.CONF"
160 >findlib.conf</A
161 >.</P
162 ><P
163 >The name of a package is the name of the package directory. For
164 example, if <TT
165 CLASS="LITERAL"
166 >destdir=/usr/local/lib/ocaml/site-lib</TT
167 >, the
168 package p will be installed in the subdirectory
169 <TT
170 CLASS="LITERAL"
171 >/usr/local/lib/ocaml/site-lib/p</TT
172 >. This subdirectory
173 must contain the META file and all other files belonging to the package.
174 Package names must not contain the '.' character.</P
175 ><P
176 >The variable <TT
177 CLASS="LITERAL"
178 >destdir</TT
179 > specifies the directory for
180 new packages. You can only have one such directory at a time; but of
181 course you can change this directory in findlib.conf. The command
182 <TT
183 CLASS="LITERAL"
184 >ocamlfind install</TT
185 > puts new packages into this
186 directory; it is recommended to use this command for installation
187 because it ensures that the directory layout is right.</P
188 ><P
189 >For searching packages, findlib uses (only) the variable
190 <TT
191 CLASS="LITERAL"
192 >path</TT
193 > which may name several locations to look at.</P
194 ><P
195 >For systems with DLL support another directory may exist: stublibs.
196 If present, findlib will install DLLs into this directory that is
197 shared by all packages at the same site-lib location. Findlib remembers
198 which DLL belongs to which package by special files with the suffix
199 ".owner"; e.g. for the DLL "dllpcre.so" there is another file
200 "dllpcre.so.owner" containing the string "pcre", so findlib knows
201 that the package "pcre" owns this DLL. It is not possible that a DLL
202 is owned by several packages.</P
203 ><P
204 >If the stublibs directory does not exist, DLLs are installed regularly
205 in the package directories like any other file.</P
206 ><P
207 >For special needs, a postinstall and/or a postremove script may be
208 installed in the site-lib directory. These scripts are invoked after
209 installation or removal of a package, respectively.</P
210 ></DIV
211 ><DIV
212 CLASS="REFSECT1"
213 ><A
214 NAME="AEN1005"
215 ></A
216 ><H2
217 >ALTERNATE LAYOUT</H2
218 ><P
219 >&#13;<PRE
220 CLASS="PROGRAMLISTING"
221 >...somewhere in the filesystem hierarchy...
222 |
223 \
224 site-lib
225 |
226 +- (optional) stublibs
227 +- (optional) postinstall
228 +- (optional) postremove
229 |
230 +- <TT
231 CLASS="REPLACEABLE"
232 ><I
233 >package1</I
234 ></TT
235 >
236 | |
237 | +- <TT
238 CLASS="REPLACEABLE"
239 ><I
240 >archive files</I
241 ></TT
242 >
243 | +- <TT
244 CLASS="REPLACEABLE"
245 ><I
246 >interface definitions</I
247 ></TT
248 >
249 |
250 +- <TT
251 CLASS="REPLACEABLE"
252 ><I
253 >package2</I
254 ></TT
255 >
256 +
257 :
258 :
259 \
260 : <TT
261 CLASS="REPLACEABLE"
262 ><I
263 >packageN</I
264 ></TT
265 >
266 |
267 \
268 metaregistry
269 |
270 +- META.package1
271 +- META.package2
272 +
273 :
274 \
275 META.packageN</PRE
276 ></P
277 ><P
278 >This is an alternate directory layout collecting all META files in one
279 directory. You can configure this layout by setting
280 <TT
281 CLASS="LITERAL"
282 >path</TT
283 > to the absolute location of
284 <TT
285 CLASS="LITERAL"
286 >metaregistry</TT
287 >. Findlib recognizes that there are
288 META files in this directory and uses them; it is not necessary to
289 include <TT
290 CLASS="LITERAL"
291 >site-lib</TT
292 > into the <TT
293 CLASS="LITERAL"
294 >path</TT
295 >.</P
296 ><P
297 >In order to work, the META files must contain a
298 <TT
299 CLASS="LITERAL"
300 >directory</TT
301 > directive pointing to the corresponding
302 package directory that resides below <TT
303 CLASS="LITERAL"
304 >site-lib</TT
305 >.</P
306 ><P
307 >The command <TT
308 CLASS="LITERAL"
309 >ocamlfind install</TT
310 > copes with this
311 layout, too. The variable <TT
312 CLASS="LITERAL"
313 >destdir</TT
314 > must contain the
315 absolute location of <TT
316 CLASS="LITERAL"
317 >site-lib</TT
318 >, and the variable
319 <TT
320 CLASS="LITERAL"
321 >metadir</TT
322 > must contain the absolute location of
323 <TT
324 CLASS="LITERAL"
325 >metaregistry</TT
326 >. Note that <TT
327 CLASS="LITERAL"
328 >ocamlfind
329 install</TT
330 > automatically adds a <TT
331 CLASS="LITERAL"
332 >directory</TT
333 >
334 directive to the META file, so you need not do it manually.</P
335 ></DIV
336 ><DIV
337 CLASS="NAVFOOTER"
338 ><HR
339 ALIGN="LEFT"
340 WIDTH="100%"><TABLE
341 SUMMARY="Footer navigation table"
342 WIDTH="100%"
343 BORDER="0"
344 CELLPADDING="0"
345 CELLSPACING="0"
346 ><TR
347 ><TD
348 WIDTH="33%"
349 ALIGN="left"
350 VALIGN="top"
351 ><A
352 HREF="r783.html"
353 ACCESSKEY="P"
354 >Prev</A
355 ></TD
356 ><TD
357 WIDTH="34%"
358 ALIGN="center"
359 VALIGN="top"
360 ><A
361 HREF="index.html"
362 ACCESSKEY="H"
363 >Home</A
364 ></TD
365 ><TD
366 WIDTH="33%"
367 ALIGN="right"
368 VALIGN="top"
369 ><A
370 HREF="p1030.html"
371 ACCESSKEY="N"
372 >Next</A
373 ></TD
374 ></TR
375 ><TR
376 ><TD
377 WIDTH="33%"
378 ALIGN="left"
379 VALIGN="top"
380 >findlib.conf</TD
381 ><TD
382 WIDTH="34%"
383 ALIGN="center"
384 VALIGN="top"
385 ><A
386 HREF="p685.html"
387 ACCESSKEY="U"
388 >Up</A
389 ></TD
390 ><TD
391 WIDTH="33%"
392 ALIGN="right"
393 VALIGN="top"
394 >Library</TD
395 ></TR
396 ></TABLE
397 ></DIV
398 ></BODY
399 ></HTML
400 >
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
1 <HTML
2 ><HEAD
3 ><TITLE
4 >site-lib</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
8 REL="HOME"
9 TITLE="The findlib Reference Manual"
10 HREF="index.html"><LINK
11 REL="UP"
12 TITLE="Files"
13 HREF="p693.html"><LINK
14 REL="PREVIOUS"
15 TITLE="findlib.conf"
16 HREF="r791.html"><LINK
17 REL="NEXT"
18 TITLE="Library"
19 HREF="p1038.html"></HEAD
20 ><BODY
21 CLASS="REFENTRY"
22 BGCOLOR="#FFFFFF"
23 TEXT="#000000"
24 LINK="#0000FF"
25 VLINK="#840084"
26 ALINK="#0000FF"
27 ><DIV
28 CLASS="NAVHEADER"
29 ><TABLE
30 SUMMARY="Header navigation table"
31 WIDTH="100%"
32 BORDER="0"
33 CELLPADDING="0"
34 CELLSPACING="0"
35 ><TR
36 ><TH
37 COLSPAN="3"
38 ALIGN="center"
39 >The findlib Reference Manual</TH
40 ></TR
41 ><TR
42 ><TD
43 WIDTH="10%"
44 ALIGN="left"
45 VALIGN="bottom"
46 ><A
47 HREF="r791.html"
48 ACCESSKEY="P"
49 >Prev</A
50 ></TD
51 ><TD
52 WIDTH="80%"
53 ALIGN="center"
54 VALIGN="bottom"
55 ></TD
56 ><TD
57 WIDTH="10%"
58 ALIGN="right"
59 VALIGN="bottom"
60 ><A
61 HREF="p1038.html"
62 ACCESSKEY="N"
63 >Next</A
64 ></TD
65 ></TR
66 ></TABLE
67 ><HR
68 ALIGN="LEFT"
69 WIDTH="100%"></DIV
70 ><H1
71 ><A
72 NAME="AEN980"
73 ></A
74 >site-lib</H1
75 ><DIV
76 CLASS="REFNAMEDIV"
77 ><A
78 NAME="SITE-LIB"
79 ></A
80 ><H2
81 >Name</H2
82 >site-lib&nbsp;--&nbsp;[Location of package directories]</DIV
83 ><DIV
84 CLASS="REFSYNOPSISDIV"
85 ><A
86 NAME="AEN988"
87 ></A
88 ><H2
89 >STANDARD LAYOUT</H2
90 ><PRE
91 CLASS="SYNOPSIS"
92 >...somewhere in the filesystem hierarchy...
93 |
94 \
95 site-lib
96 |
97 +- (optional) stublibs
98 +- (optional) postinstall
99 +- (optional) postremove
100 |
101 +- <TT
102 CLASS="REPLACEABLE"
103 ><I
104 >package1</I
105 ></TT
106 >
107 | |
108 | +- META
109 | +- <TT
110 CLASS="REPLACEABLE"
111 ><I
112 >archive files</I
113 ></TT
114 >
115 | +- <TT
116 CLASS="REPLACEABLE"
117 ><I
118 >interface definitions</I
119 ></TT
120 >
121 |
122 +- <TT
123 CLASS="REPLACEABLE"
124 ><I
125 >package2</I
126 ></TT
127 >
128 +
129 :
130 :
131 \
132 <TT
133 CLASS="REPLACEABLE"
134 ><I
135 >packageN</I
136 ></TT
137 ></PRE
138 ></DIV
139 ><DIV
140 CLASS="REFSECT1"
141 ><A
142 NAME="AEN996"
143 ></A
144 ><H2
145 >DESCRIPTION</H2
146 ><P
147 >Every installation of "findlib" has a default location for package
148 directories, which is normally a directory called "site-lib". The
149 location can be set by the configuration variables
150 <TT
151 CLASS="LITERAL"
152 >path</TT
153 > (used to look up packages), and
154 <TT
155 CLASS="LITERAL"
156 >destdir</TT
157 > (used to install new packages);
158 see <A
159 HREF="r791.html#FINDLIB.CONF"
160 >findlib.conf</A
161 >.</P
162 ><P
163 >The name of a package is the name of the package directory. For
164 example, if <TT
165 CLASS="LITERAL"
166 >destdir=/usr/local/lib/ocaml/site-lib</TT
167 >, the
168 package p will be installed in the subdirectory
169 <TT
170 CLASS="LITERAL"
171 >/usr/local/lib/ocaml/site-lib/p</TT
172 >. This subdirectory
173 must contain the META file and all other files belonging to the package.
174 Package names must not contain the '.' character.</P
175 ><P
176 >The variable <TT
177 CLASS="LITERAL"
178 >destdir</TT
179 > specifies the directory for
180 new packages. You can only have one such directory at a time; but of
181 course you can change this directory in findlib.conf. The command
182 <TT
183 CLASS="LITERAL"
184 >ocamlfind install</TT
185 > puts new packages into this
186 directory; it is recommended to use this command for installation
187 because it ensures that the directory layout is right.</P
188 ><P
189 >For searching packages, findlib uses (only) the variable
190 <TT
191 CLASS="LITERAL"
192 >path</TT
193 > which may name several locations to look at.</P
194 ><P
195 >For systems with DLL support another directory may exist: stublibs.
196 If present, findlib will install DLLs into this directory that is
197 shared by all packages at the same site-lib location. Findlib remembers
198 which DLL belongs to which package by special files with the suffix
199 ".owner"; e.g. for the DLL "dllpcre.so" there is another file
200 "dllpcre.so.owner" containing the string "pcre", so findlib knows
201 that the package "pcre" owns this DLL. It is not possible that a DLL
202 is owned by several packages.</P
203 ><P
204 >If the stublibs directory does not exist, DLLs are installed regularly
205 in the package directories like any other file.</P
206 ><P
207 >For special needs, a postinstall and/or a postremove script may be
208 installed in the site-lib directory. These scripts are invoked after
209 installation or removal of a package, respectively.</P
210 ></DIV
211 ><DIV
212 CLASS="REFSECT1"
213 ><A
214 NAME="AEN1013"
215 ></A
216 ><H2
217 >ALTERNATE LAYOUT</H2
218 ><P
219 >&#13;<PRE
220 CLASS="PROGRAMLISTING"
221 >...somewhere in the filesystem hierarchy...
222 |
223 \
224 site-lib
225 |
226 +- (optional) stublibs
227 +- (optional) postinstall
228 +- (optional) postremove
229 |
230 +- <TT
231 CLASS="REPLACEABLE"
232 ><I
233 >package1</I
234 ></TT
235 >
236 | |
237 | +- <TT
238 CLASS="REPLACEABLE"
239 ><I
240 >archive files</I
241 ></TT
242 >
243 | +- <TT
244 CLASS="REPLACEABLE"
245 ><I
246 >interface definitions</I
247 ></TT
248 >
249 |
250 +- <TT
251 CLASS="REPLACEABLE"
252 ><I
253 >package2</I
254 ></TT
255 >
256 +
257 :
258 :
259 \
260 : <TT
261 CLASS="REPLACEABLE"
262 ><I
263 >packageN</I
264 ></TT
265 >
266 |
267 \
268 metaregistry
269 |
270 +- META.package1
271 +- META.package2
272 +
273 :
274 \
275 META.packageN</PRE
276 ></P
277 ><P
278 >This is an alternate directory layout collecting all META files in one
279 directory. You can configure this layout by setting
280 <TT
281 CLASS="LITERAL"
282 >path</TT
283 > to the absolute location of
284 <TT
285 CLASS="LITERAL"
286 >metaregistry</TT
287 >. Findlib recognizes that there are
288 META files in this directory and uses them; it is not necessary to
289 include <TT
290 CLASS="LITERAL"
291 >site-lib</TT
292 > into the <TT
293 CLASS="LITERAL"
294 >path</TT
295 >.</P
296 ><P
297 >In order to work, the META files must contain a
298 <TT
299 CLASS="LITERAL"
300 >directory</TT
301 > directive pointing to the corresponding
302 package directory that resides below <TT
303 CLASS="LITERAL"
304 >site-lib</TT
305 >.</P
306 ><P
307 >The command <TT
308 CLASS="LITERAL"
309 >ocamlfind install</TT
310 > copes with this
311 layout, too. The variable <TT
312 CLASS="LITERAL"
313 >destdir</TT
314 > must contain the
315 absolute location of <TT
316 CLASS="LITERAL"
317 >site-lib</TT
318 >, and the variable
319 <TT
320 CLASS="LITERAL"
321 >metadir</TT
322 > must contain the absolute location of
323 <TT
324 CLASS="LITERAL"
325 >metaregistry</TT
326 >. Note that <TT
327 CLASS="LITERAL"
328 >ocamlfind
329 install</TT
330 > automatically adds a <TT
331 CLASS="LITERAL"
332 >directory</TT
333 >
334 directive to the META file, so you need not do it manually.</P
335 ></DIV
336 ><DIV
337 CLASS="NAVFOOTER"
338 ><HR
339 ALIGN="LEFT"
340 WIDTH="100%"><TABLE
341 SUMMARY="Footer navigation table"
342 WIDTH="100%"
343 BORDER="0"
344 CELLPADDING="0"
345 CELLSPACING="0"
346 ><TR
347 ><TD
348 WIDTH="33%"
349 ALIGN="left"
350 VALIGN="top"
351 ><A
352 HREF="r791.html"
353 ACCESSKEY="P"
354 >Prev</A
355 ></TD
356 ><TD
357 WIDTH="34%"
358 ALIGN="center"
359 VALIGN="top"
360 ><A
361 HREF="index.html"
362 ACCESSKEY="H"
363 >Home</A
364 ></TD
365 ><TD
366 WIDTH="33%"
367 ALIGN="right"
368 VALIGN="top"
369 ><A
370 HREF="p1038.html"
371 ACCESSKEY="N"
372 >Next</A
373 ></TD
374 ></TR
375 ><TR
376 ><TD
377 WIDTH="33%"
378 ALIGN="left"
379 VALIGN="top"
380 >findlib.conf</TD
381 ><TD
382 WIDTH="34%"
383 ALIGN="center"
384 VALIGN="top"
385 ><A
386 HREF="p693.html"
387 ACCESSKEY="U"
388 >Up</A
389 ></TD
390 ><TD
391 WIDTH="33%"
392 ALIGN="right"
393 VALIGN="top"
394 >Library</TD
395 ></TR
396 ></TABLE
397 ></DIV
398 ></BODY
399 ></HTML
400 >
538538 .sp
539539 .RS "2m"
540540 .ft R
541 %+a\c
542 .RE
543 .ft R
544 .sp
545 .RS "7m"
546 .ft R
547 .ft R
548 Like %a, but the filenames are converted to absolute\c
549 \&
550 \& paths ("+" and "@" notations are resolved)\c
551 .RE
552 .ft R
553 .sp
554 .RS "2m"
555 .ft R
541556 %A\c
542557 .RE
543558 .ft R
546561 .ft R
547562 .ft R
548563 Replaced by the list of archive filenames.\c
564 .RE
565 .ft R
566 .sp
567 .RS "2m"
568 .ft R
569 %+A\c
570 .RE
571 .ft R
572 .sp
573 .RS "7m"
574 .ft R
575 .ft R
576 Like %A, but the filenames are converted to absolute\c
577 \&
578 \& paths ("+" and "@" notations are resolved)\c
549579 .RE
550580 .ft R
551581 .sp
208208 </para></listitem>
209209 </varlistentry>
210210 <varlistentry>
211 <term>%+a</term>
212 <listitem><para>Like %a, but the filenames are converted to absolute
213 paths ("+" and "@" notations are resolved)
214 </para></listitem>
215 </varlistentry>
216 <varlistentry>
211217 <term>%A</term>
212218 <listitem><para>Replaced by the list of archive filenames.</para></listitem>
213219 </varlistentry>
220 <varlistentry>
221 <term>%+A</term>
222 <listitem><para>Like %A, but the filenames are converted to absolute
223 paths ("+" and "@" notations are resolved)
224 </para></listitem>
214225 <varlistentry>
215226 <term>%o</term>
216227 <listitem><para>Replaced by one linker option. If there is more than
230230 >Replaced by the archive filename. If there is more
231231 than one archive, a separate output record is printed for every archive.</PARA></LISTITEM></VARLISTENTRY><VARLISTENTRY
232232 ><TERM
233 >%+a</TERM><LISTITEM
234 ><PARA
235 >Like %a, but the filenames are converted to absolute
236 paths ("+" and "@" notations are resolved)</PARA></LISTITEM></VARLISTENTRY><VARLISTENTRY
237 ><TERM
233238 >%A</TERM><LISTITEM
234239 ><PARA
235240 >Replaced by the list of archive filenames.</PARA></LISTITEM></VARLISTENTRY><VARLISTENTRY
241 ><TERM
242 >%+A</TERM><LISTITEM
243 ><PARA
244 >Like %A, but the filenames are converted to absolute
245 paths ("+" and "@" notations are resolved)</PARA></LISTITEM></VARLISTENTRY><VARLISTENTRY
236246 ><TERM
237247 >%o</TERM><LISTITEM
238248 ><PARA
00 BYTE_FILES=bytes.cmi bytes.cma
1 NATIVE_FILES=bytes.cmx bytes.cmxa bytes.a bytes.cmxs
1 NATIVE_FILES=bytes.cmx bytes.a bytes.cmxa
2 NATIVE_FILES_DYNLINK=bytes.cmxs
23 OCAMLBUILD=ocamlbuild -classic-display -no-links
4
5 TOP=../..
6 include $(TOP)/Makefile.config
37
48 build: all opt
59
711 $(OCAMLBUILD) $(BYTE_FILES)
812
913 opt:
10 $(OCAMLBUILD) $(NATIVE_FILES)
14 files="$(NATIVE_FILES)"; \
15 if [ $(HAVE_NATDYNLINK) = 1 ]; then \
16 files="$$files $(NATIVE_FILES_DYNLINK)"; \
17 fi; \
18 $(OCAMLBUILD) $$files
1119
1220 install: all
13 cd _build/ && ocamlfind install bytes ../META $(BYTE_FILES) -optional $(NATIVE_FILES)
21 cd _build/ && ocamlfind install bytes ../META $(BYTE_FILES) -optional $(NATIVE_FILES) $(NATIVE_FILES_DYNLINK)
1422
1523 uninstall:
1624 ocamlfind remove bytes
0 (* $Id: findlib.ml 189 2013-01-14 17:10:28Z gerd $
0 (* $Id: findlib.ml 225 2014-07-15 22:44:36Z gerd $
11 * ----------------------------------------------------------------------
22 *
33 *)
360360 ;;
361361
362362
363 let resolve_path ?base p =
363 let resolve_path ?base ?(explicit=false) p =
364364 lazy_init();
365365 if p = "" then "" else (
366366 match p.[0] with
386386 ( match base with
387387 None -> p
388388 | Some b ->
389 if Filename.is_relative p then
389 if Filename.is_relative p &&
390 (not explicit || not (Filename.is_implicit p))
391 then
390392 Filename.concat b p
391393 else
392394 p
0 (* $Id: findlib.mli 189 2013-01-14 17:10:28Z gerd $
0 (* $Id: findlib.mli 225 2014-07-15 22:44:36Z gerd $
11 * ----------------------------------------------------------------------
22 *
33 *)
171171 * cyclic dependency.
172172 *)
173173
174 val resolve_path : ?base:string -> string -> string
174 val resolve_path : ?base:string -> ?explicit:bool -> string -> string
175175 (** Resolves findlib notation in filename paths. The notation
176176 * [ +name/path ] can be used to refer to the subdirectory [name]
177177 * of the standard library directory; the continuation [ /path ] is
182182 * @param base When the function is applied on a relative path, the
183183 * [base] path is prepended. Otherwise, the path is returned as
184184 * it is.
185 * @param explicit Changes the meaning of [base] so that only paths
186 * count as relative that include at least one slash.
185187 *)
186188
187189 val list_packages : ?tab:int -> ?descr:bool -> out_channel -> unit
0 (* $Id: frontend.ml 215 2014-06-23 20:32:41Z gerd $
0 (* $Id: frontend.ml 225 2014-07-15 22:44:36Z gerd $
11 * ----------------------------------------------------------------------
22 *
33 *)
1515
1616 type psubst =
1717 Const of string
18 | Percent of string
19 | Lookup of string
18 | Percent of string * modifier
19 | Lookup of string * modifier
20
21 and modifier =
22 | Plain
23 | Plus
2024 ;;
2125
2226
6165
6266
6367
64 let percent_subst spec lookup s =
68 let percent_subst ?base spec lookup s =
6569 (* spec = [ "%c", [ "ctext1"; "ctext2"; ... ];
6670 * "%d", [ "dtext1"; "dtext2"; ... ] ]
6771 * All occurrences of %c in the string s are replaced as specified in spec.
7377 * key for the [lookup] function, which either returns the string value
7478 * or raises Not_found.
7579 *
80 * "+" modifier: A "+" after "%" causes that Findlib.resolve_path is
81 * called for the substitution string (e.g. %+c, %+(name)).
82 *
7683 * Example:
7784 * spec = [ "%a", [ "file1" ] ]
7885 * lookup = function "archive" -> "file2" | _ -> raise Not_found
7986 * Here, %a is substituted by file1, and %(archive) is substituted by
8087 * file2.
88 *
89 * ?base: The base parameter for Findlib.resolve_path.
8190 *)
82
8391 let l = String.length s in
92
93 let fail() =
94 failwith "bad format string" in
95
96 let parenthesized_name j =
97 try
98 if j+1>=l then raise Not_found;
99 let k = String.index_from s (j+1) ')' in
100 let name = String.sub s (j+1) (k-j-1) in
101 (name, k+1)
102 with Not_found ->
103 fail() in
104
84105 let rec preprocess i j =
85106 if j<l then begin
86107 match s.[j] with
91112 match c with
92113 '%' ->
93114 prev :: Const "%" :: preprocess (j+2) (j+2)
94 | '(' -> (
95 try
96 if j+2>=l then raise Not_found;
97 let k = String.index_from s (j+2) ')' in
98 let name = String.sub s (j+2) (k-j-2) in
99 prev :: Lookup name :: preprocess (k+1) (k+1)
100 with Not_found ->
101 failwith "bad format string";
102 )
115 | '(' ->
116 let name, j_next = parenthesized_name (j+1) in
117 prev :: Lookup(name,Plain) :: preprocess j_next j_next
118 | '+' ->
119 if j+2<l then begin
120 let c = s.[j+2] in
121 match c with
122 | '%' | '+' -> fail()
123 | '(' ->
124 let name, j_next = parenthesized_name (j+2) in
125 prev :: Lookup(name,Plus) :: preprocess j_next j_next
126 | _ ->
127 let name = "%" ^ String.make 1 c in
128 prev :: Percent(name,Plus) :: preprocess (j+3) (j+3)
129 end
130 else fail()
103131 | _ ->
104132 let name = "%" ^ String.make 1 c in
105 prev :: Percent name :: preprocess (j+2) (j+2)
133 prev :: Percent(name,Plain) :: preprocess (j+2) (j+2)
106134 end
107 else failwith "bad format string"
135 else fail()
108136 | _ ->
109137 preprocess i (j+1)
110138 end
115143 []
116144 in
117145
146 let plus_subst u =
147 String.concat
148 " "
149 (List.map
150 (Findlib.resolve_path ?base)
151 (Fl_split.in_words u)) in
152
153 let any_subst modi u =
154 match modi with
155 | Plain -> u
156 | Plus -> plus_subst u in
157
118158 let rec subst prefix l =
119159 match l with
120160 [] -> [prefix]
121161 | Const s :: l' ->
122162 subst (prefix ^ s) l'
123 | Percent name :: l' ->
124 let replacements =
163 | Percent(name,modi) :: l' ->
164 let replacements0 =
125165 try List.assoc name spec
126166 with Not_found -> failwith "bad format string" in
167 let replacements =
168 List.map (any_subst modi) replacements0 in
127169 List.flatten
128170 (List.map
129171 (fun replacement ->
130172 subst (prefix ^ replacement) l')
131173 replacements)
132 | Lookup name :: l' ->
133 let replacement =
174 | Lookup(name,modi) :: l' ->
175 let replacement0 =
134176 try lookup name
135177 with Not_found -> "" in
178 let replacement =
179 any_subst modi replacement0 in
136180 subst (prefix ^ replacement) l'
137181 in
138182
470514 ]
471515 in
472516 let lookup = package_property predicates pkg in
473 percent_subst spec lookup format)
517 percent_subst ~base:dir spec lookup format)
474518 eff_packages)
475519 ;;
520
521
522 let help_format() =
523 print_endline
524 "Formats for -format strings:
525
526 %p package name
527 %d package directory
528 %D description
529 %v version
530 %a archive file(s)
531 %+a archive file(s), converted to absolute paths
532 %A archive files as single string
533 %+A archive files as single string, converted to absolute paths
534 %o link option(s)
535 %O link options as single string
536 %(name) the value of the property <name>
537 %+(name) the value of the property <name>, converted to absolute paths
538 (like <archive>)";
539 flush stdout
540
476541
477542
478543 (************************** QUERY SUBCOMMAND ***************************)
490555 else
491556 "-ccopt -L%d" in
492557 let a_format =
493 "%a" in
558 "%+a" in
494559 let o_format =
495560 "%o" in
496561 let p_format =
545610 " prints link options for ocamlc";
546611 "-p-format", Arg.Unit (fun () -> format := p_format),
547612 " prints package names";
613 "-help-format", Arg.Unit help_format,
614 " lists the supported formats for -format";
548615 ]
549616 (fun p -> packages := !packages @ [p])
550617 "usage: ocamlfind query [ -predicates <p> | -format <f> |
720787 with Not_found -> [] in
721788 try
722789 let preprocessor =
723 resolve_path ~base (package_property predicates pname "ppx") in
790 resolve_path
791 ~base ~explicit:true
792 (package_property predicates pname "ppx") in
724793 ["-ppx"; String.concat " " (preprocessor :: options)]
725794 with Not_found -> []
726795 )
0 (* $Id: topfind.ml 213 2014-06-23 19:32:24Z gerd $
0 (* $Id: topfind.ml 225 2014-07-15 22:44:36Z gerd $
11 * ----------------------------------------------------------------------
22 *
33 *)
5050 let load pkglist =
5151 List.iter
5252 (fun pkg ->
53 let stdlibdir = Findlib.ocaml_stdlib() in
53 let _stdlibdir = Findlib.ocaml_stdlib() in
5454 if not (List.mem pkg !loaded) then begin
5555 (* Determine the package directory: *)
5656 let d = Findlib.package_directory pkg in
7272 Topdirs.dir_load
7373 Format.std_formatter arch')
7474 archives;
75 (* Determine the 'ppx' property: *)
76 let ppx =
77 try Some (Findlib.package_property !predicates pkg "ppx")
78 with Not_found -> None
79 in
80 (* Feed the 'ppx' property into the toplevel. To remain compatible
81 with pre-4.01 OCaml, construct and execute a phrase instead of directly
82 altering Clflags. *)
83 match ppx with
84 | Some ppx ->
85 begin try
86 match Hashtbl.find Toploop.directive_table "ppx" with
87 | Toploop.Directive_string fn -> fn ppx; !log (ppx ^ ": activated")
88 | _ -> assert false
89 with Not_found ->
90 failwith "Package defines a ppx preprocessor, but OCaml does not support \
91 the #ppx directive. Use OCaml >=4.02."
92 end
93 | None -> ()
94 end;
75 (* Determine the 'ppx' property: *)
76 let ppx =
77 try
78 Some(Findlib.resolve_path
79 ~base:d ~explicit:true
80 (Findlib.package_property !predicates pkg "ppx")
81 )
82 with Not_found -> None
83 in
84 (* Feed the 'ppx' property into the toplevel. To remain compatible
85 with pre-4.01 OCaml, construct and execute a phrase instead of directly
86 altering Clflags. *)
87 match ppx with
88 | Some ppx ->
89 begin try
90 match Hashtbl.find Toploop.directive_table "ppx" with
91 | Toploop.Directive_string fn ->
92 fn ppx; !log (ppx ^ ": activated")
93 | _ -> assert false
94 with Not_found ->
95 failwith "Package defines a ppx preprocessor, but OCaml does not support \
96 the #ppx directive. Use OCaml >=4.02."
97 end
98 | None -> ()
99 end;
95100 (* The package is loaded: *)
96101 loaded := pkg :: !loaded
97102 end)
112117 forbidden := remove_dups (pkglist @ !forbidden);
113118 List.iter
114119 (fun pkg ->
115 let d = Findlib.package_directory pkg in
120 let _d = Findlib.package_directory pkg in
116121 ()
117122 )
118123 pkglist