~ubuntu-branches/ubuntu/hardy/ocaml-doc/hardy

« back to all changes in this revision

Viewing changes to examples/config/Imake.rules

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2007-09-08 01:49:22 UTC
  • mfrom: (0.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070908014922-lvihyehz0ndq7suu
Tags: 3.10-1
* New upstream release.
* Removed camlp4 documentation since it is not up-to-date.
* Updated to standards version 3.7.2, no changes needed.
* Updated my email address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef TOPDIR
2
 
#define TOPDIR .
3
 
#endif
4
 
 
5
 
#ifdef __STDC__
6
 
#define concat(a,b) a##b
7
 
#else
8
 
#define concat(a,b) a/**/b
9
 
#endif
10
 
 
11
 
#define Prog(name,objs,others)                                             @@\
12
 
name.OBJS=objs                                                             @@\
13
 
name.FILES=$(name.OBJS:.cmo=.ml)                                           @@\
14
 
                                                                           @@\
15
 
all::name                                                                  @@\
16
 
                                                                           @@\
17
 
depend::                                                                   @@\
18
 
        $(CAMLDEP) $(name.FILES) >> Makefile                               @@\
19
 
                                                                           @@\
20
 
clean::                                                                    @@\
21
 
        $(RM) name                                                         @@\
22
 
 
23
 
#define ProgOpt(name,objs,others)                                          @@\
24
 
name.BINOBJS=objs                                                          @@\
25
 
name.FILES=$(name.BINOBJS:.cmx=.ml)                                        @@\
26
 
                                                                           @@\
27
 
opt::name.opt                                                              @@\
28
 
                                                                           @@\
29
 
depend::                                                                   @@\
30
 
        $(CAMLDEP) $(name.FILES) >> Makefile                               @@\
31
 
                                                                           @@\
32
 
clean::                                                                    @@\
33
 
        $(RM) name name.opt                                                @@\
34
 
 
35
 
 
36
 
#define CamlProg(name,objs,others)                                         @@\
37
 
        Prog(name,objs,other)                                              @@\
38
 
                                                                           @@\
39
 
name: objs                                                                 @@\
40
 
        $(CAMLC) $(LINKFLAGS) others objs -o name                          @@\
41
 
 
42
 
 
43
 
#define CamlProgOpt(name,objs,others)                                      @@\
44
 
        ProgOpt(name,objs,other)                                           @@\
45
 
                                                                           @@\
46
 
name.opt: objs                                                             @@\
47
 
        $(CAMLCOPT) $(LINKFLAGSOPT) others objs -o name.opt                @@\
48
 
        $(CP) name.opt name                                                @@\
49
 
 
50
 
#define CamlProgP4(name,objs,others)                                       @@\
51
 
COMPFLAGS=-g -pp camlp4o                                                   @@\
52
 
                                                                           @@\
53
 
        Prog(name,objs,other)                                              @@\
54
 
                                                                           @@\
55
 
name: objs                                                                 @@\
56
 
        $(CAMLC) -pp camlp4o $(LINKFLAGS) others objs -o name              @@\
57
 
 
58
 
#define CamlProgP4Opt(name,objs,others)                                    @@\
59
 
COMPFLAGSOPT=-pp camlp4o                                                   @@\
60
 
                                                                           @@\
61
 
        ProgOpt(name,objs,other)                                           @@\
62
 
                                                                           @@\
63
 
name.opt: objs                                                             @@\
64
 
        $(CAMLCOPT) -pp camlp4o $(LINKFLAGSOPT) others objs -o name.opt    @@\
65
 
        $(CP) name.opt name                                                @@\
66
 
 
67
 
#define CamlCustomProg(name,objs,others)                                   @@\
68
 
        Prog(name,objs,other)                                              @@\
69
 
                                                                           @@\
70
 
name: objs                                                                 @@\
71
 
        $(CAMLC) $(LINKFLAGS) -custom others objs -o name                  @@\
72
 
 
73
 
#define CamlCustomProgOpt(name,objs,others)                                @@\
74
 
        CamlProgOpt(name,objs,others)                                      @@\
75
 
 
76
 
#define CamlCustomProgP4(name,objs,others)                                 @@\
77
 
COMPFLAGS=-g -pp camlp4o                                                   @@\
78
 
                                                                           @@\
79
 
        Prog(name,objs,other)                                              @@\
80
 
                                                                           @@\
81
 
name: objs                                                                 @@\
82
 
        $(CAMLC) -pp camlp4o $(LINKFLAGS) -custom others objs -o name      @@\
83
 
 
84
 
#define CamlCustomProgP4Opt(name,objs,others)                              @@\
85
 
        CamlProgP4Opt(name,objs,others)
86
 
 
87
 
#define CamlGraphProg(name,objs,others)                                    @@\
88
 
  CamlCustomProg(name,objs,unix.cma graphics.cma others)                   @@\
89
 
 
90
 
#define CamlGraphProgOpt(name,objs,others)                                 @@\
91
 
  CamlCustomProgOpt(name,objs,unix.cmxa graphics.cmxa others)              @@\
92
 
 
93
 
#define CamlGraphProgP4(name,objs,others)                                  @@\
94
 
  CamlCustomProgP4(name,objs,unix.cma graphics.cma others)                 @@\
95
 
 
96
 
#define CamlGraphProgP4Opt(name,objs,others)                               @@\
97
 
  CamlCustomProgP4Opt(name,objs,unix.cmxa graphics.cmxa others)            @@\
98
 
 
99
 
#define CamlTkProg(name,objs,others)                                       @@\
100
 
COMPFLAGS=-I +labltk                                                       @@\
101
 
LINKFLAGS=$(COMPFLAGS)                                                     @@\
102
 
  CamlCustomProg(name,objs,labltk.cma others)
103
 
 
104
 
#define CamlTkProgOpt(name,objs,others)                                    @@\
105
 
COMPFLAGSOPT=-I +labltk                                                    @@\
106
 
LINKFLAGSOPT=$(COMPFLAGSOPT)                                               @@\
107
 
  CamlCustomProgOpt(name,objs,labltk.cmxa others)
108
 
 
109
 
#define CamlLibrary(name,ojs,others)                                      @@\
110
 
all::name                                                                  @@\
111
 
                                                                           @@\
112
 
name: objs                                                                 @@\
113
 
        $(CAMLLIBR) others objs -o name                                    @@\
114
 
                                                                           @@\
115
 
clean::                                                                    @@\
116
 
        $(RM) name                                                         @@\
117
 
                                                                           @@\
118
 
 
119
 
#define CamlYaccFile(basename)                                             @@\
120
 
basename.ml basename.mli: basename.mly                                     @@\
121
 
        @$(RM) basename.ml basename.mli                                    @@\
122
 
        $(CAMLYACC) basename.mly                                           @@\
123
 
        @chmod a-w basename.ml basename.mli                                @@\
124
 
                                                                           @@\
125
 
clean::                                                                    @@\
126
 
        $(RM) basename.ml basename.mli                                     @@\
127
 
                                                                           @@\
128
 
beforedepend:: basename.ml basename.mli                                    @@\
129
 
                                                                           @@\
130
 
 
131
 
#define CamlLexFile(basename)                                              @@\
132
 
basename.ml: basename.mll                                                  @@\
133
 
        @$(RM) basename.ml                                                 @@\
134
 
        $(CAMLLEX) basename.mll                                            @@\
135
 
        @chmod a-w basename.ml                                             @@\
136
 
                                                                           @@\
137
 
clean::                                                                    @@\
138
 
        $(RM) basename.ml                                                  @@\
139
 
                                                                           @@\
140
 
beforedepend:: basename.ml                                                 @@\
141
 
                                                                           @@\
142
 
 
143
 
#define CamlPreproFile(target)                                             @@\
144
 
target: concat(target,p)                                                   @@\
145
 
        @$(RM) target                                                      @@\
146
 
        @echo '(* GENERATED FILE --- DO NOT EDIT. *)' > target             @@\
147
 
        $(CPP) < concat(target,p) >> target                                @@\
148
 
        @chmod a-w target                                                  @@\
149
 
                                                                           @@\
150
 
clean::                                                                    @@\
151
 
        $(RM) target                                                       @@\
152
 
                                                                           @@\
153
 
beforedepend:: target                                                      @@\
154
 
                                                                           @@\
155
 
 
156
 
#define SubDir(dir)                                                        @@\
157
 
all::                                                                      @@\
158
 
        @-echo "-- Making all in" dir; cd dir; make all                    @@\
159
 
                                                                           @@\
160
 
allopt : opt                                                               @@\
161
 
                                                                           @@\
162
 
opt::                                                                      @@\
163
 
        @-echo "-- Making opt in" dir; cd dir; make opt                    @@\
164
 
                                                                           @@\
165
 
clean::                                                                    @@\
166
 
        @-echo "-- Making clean in" dir; cd dir; make clean                @@\
167
 
                                                                           @@\
168
 
makefiles::                                                                @@\
169
 
        @-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\
170
 
                                                                           @@\
171
 
 
172
 
#define SubGraphDir(dir)                                                   @@\
173
 
all::                                                                      @@\
174
 
        @-echo "-- Making all in" dir; echo "(This program requires the libgraph library;"; echo " if you haven't installed it, compilation will fail.)"; cd dir; make all                    @@\
175
 
                                                                           @@\
176
 
opt::                                                                      @@\
177
 
        @-echo "-- Making opt in" dir; echo "(This program requires the libgraph library compiled to the native code;"; echo " if you haven't installed it, compilation will fail.)"; cd dir; make opt                    @@\
178
 
                                                                           @@\
179
 
clean::                                                                    @@\
180
 
        @-echo "-- Making clean in" dir; cd dir; make clean                @@\
181
 
                                                                           @@\
182
 
makefiles::                                                                @@\
183
 
        @-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\
184
 
                                                                           @@\
185
 
 
186
 
#define SubTkDir(dir)                                                      @@\
187
 
all::                                                                      @@\
188
 
        @-echo "-- Making all in" dir; echo "(This program requires the CamlTk library;"; echo " if you haven't installed it, compilation will fail.)"; cd dir; make all                    @@\
189
 
                                                                           @@\
190
 
opt::                                                                      @@\
191
 
        @-echo "-- Making opt in" dir; echo "(This program requires the CamlTk library compiled to native code;"; echo " if you haven't installed it, compilation will fail.)"; cd dir; make opt                    @@\
192
 
                                                                           @@\
193
 
clean::                                                                    @@\
194
 
        @-echo "-- Making clean in" dir; cd dir; make clean                @@\
195
 
                                                                           @@\
196
 
makefiles::                                                                @@\
197
 
        @-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\
198
 
                                                                           @@\
199