File: Imake.rules

package info (click to toggle)
ocaml-doc 3.09-1
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 10,428 kB
  • ctags: 4,963
  • sloc: ml: 9,244; makefile: 2,413; ansic: 122; sh: 49; asm: 17
file content (199 lines) | stat: -rw-r--r-- 13,257 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#ifndef TOPDIR
#define TOPDIR .
#endif

#ifdef __STDC__
#define concat(a,b) a##b
#else
#define concat(a,b) a/**/b
#endif

#define Prog(name,objs,others)                                             @@\
name.OBJS=objs                                                             @@\
name.FILES=$(name.OBJS:.cmo=.ml)                                           @@\
                                                                           @@\
all::name                                                                  @@\
                                                                           @@\
depend::                                                                   @@\
	$(CAMLDEP) $(name.FILES) >> Makefile                               @@\
                                                                           @@\
clean::                                                                    @@\
	$(RM) name                                                         @@\

#define ProgOpt(name,objs,others)                                          @@\
name.BINOBJS=objs                                                          @@\
name.FILES=$(name.BINOBJS:.cmx=.ml)                                        @@\
                                                                           @@\
opt::name.opt                                                              @@\
                                                                           @@\
depend::                                                                   @@\
	$(CAMLDEP) $(name.FILES) >> Makefile                               @@\
                                                                           @@\
clean::                                                                    @@\
	$(RM) name name.opt                                                @@\


#define CamlProg(name,objs,others)                                         @@\
        Prog(name,objs,other)                                              @@\
                                                                           @@\
name: objs                                                                 @@\
	$(CAMLC) $(LINKFLAGS) others objs -o name                          @@\


#define CamlProgOpt(name,objs,others)                                      @@\
        ProgOpt(name,objs,other)                                           @@\
                                                                           @@\
name.opt: objs                                                             @@\
	$(CAMLCOPT) $(LINKFLAGSOPT) others objs -o name.opt                @@\
	$(CP) name.opt name                                                @@\

#define CamlProgP4(name,objs,others)                                       @@\
COMPFLAGS=-g -pp camlp4o                                                   @@\
                                                                           @@\
        Prog(name,objs,other)                                              @@\
                                                                           @@\
name: objs                                                                 @@\
	$(CAMLC) -pp camlp4o $(LINKFLAGS) others objs -o name              @@\

#define CamlProgP4Opt(name,objs,others)                                    @@\
COMPFLAGSOPT=-pp camlp4o                                                   @@\
                                                                           @@\
        ProgOpt(name,objs,other)                                           @@\
                                                                           @@\
name.opt: objs                                                             @@\
	$(CAMLCOPT) -pp camlp4o $(LINKFLAGSOPT) others objs -o name.opt    @@\
	$(CP) name.opt name                                                @@\

#define CamlCustomProg(name,objs,others)                                   @@\
        Prog(name,objs,other)                                              @@\
                                                                           @@\
name: objs                                                                 @@\
	$(CAMLC) $(LINKFLAGS) -custom others objs -o name                  @@\

#define CamlCustomProgOpt(name,objs,others)                                @@\
        CamlProgOpt(name,objs,others)                                      @@\

#define CamlCustomProgP4(name,objs,others)                                 @@\
COMPFLAGS=-g -pp camlp4o                                                   @@\
                                                                           @@\
        Prog(name,objs,other)                                              @@\
                                                                           @@\
name: objs                                                                 @@\
	$(CAMLC) -pp camlp4o $(LINKFLAGS) -custom others objs -o name      @@\

#define CamlCustomProgP4Opt(name,objs,others)                              @@\
        CamlProgP4Opt(name,objs,others)

#define CamlGraphProg(name,objs,others)                                    @@\
  CamlCustomProg(name,objs,unix.cma graphics.cma others)                   @@\

#define CamlGraphProgOpt(name,objs,others)                                 @@\
  CamlCustomProgOpt(name,objs,unix.cmxa graphics.cmxa others)              @@\

#define CamlGraphProgP4(name,objs,others)                                  @@\
  CamlCustomProgP4(name,objs,unix.cma graphics.cma others)                 @@\

#define CamlGraphProgP4Opt(name,objs,others)                               @@\
  CamlCustomProgP4Opt(name,objs,unix.cmxa graphics.cmxa others)            @@\

#define CamlTkProg(name,objs,others)                                       @@\
COMPFLAGS=-I +labltk                                                       @@\
LINKFLAGS=$(COMPFLAGS)                                                     @@\
  CamlCustomProg(name,objs,labltk.cma others)

#define CamlTkProgOpt(name,objs,others)                                    @@\
COMPFLAGSOPT=-I +labltk                                                    @@\
LINKFLAGSOPT=$(COMPFLAGSOPT)                                               @@\
  CamlCustomProgOpt(name,objs,labltk.cmxa others)

#define CamlLibrary(name,ojs,others)                                      @@\
all::name                                                                  @@\
                                                                           @@\
name: objs                                                                 @@\
	$(CAMLLIBR) others objs -o name                                    @@\
                                                                           @@\
clean::                                                                    @@\
	$(RM) name                                                         @@\
                                                                           @@\

#define CamlYaccFile(basename)                                             @@\
basename.ml basename.mli: basename.mly                                     @@\
	@$(RM) basename.ml basename.mli                                    @@\
	$(CAMLYACC) basename.mly                                           @@\
	@chmod a-w basename.ml basename.mli                                @@\
                                                                           @@\
clean::                                                                    @@\
	$(RM) basename.ml basename.mli                                     @@\
                                                                           @@\
beforedepend:: basename.ml basename.mli                                    @@\
                                                                           @@\

#define CamlLexFile(basename)                                              @@\
basename.ml: basename.mll                                                  @@\
	@$(RM) basename.ml                                                 @@\
	$(CAMLLEX) basename.mll                                            @@\
	@chmod a-w basename.ml                                             @@\
                                                                           @@\
clean::                                                                    @@\
	$(RM) basename.ml                                                  @@\
                                                                           @@\
beforedepend:: basename.ml                                                 @@\
                                                                           @@\

#define CamlPreproFile(target)                                             @@\
target: concat(target,p)                                                   @@\
	@$(RM) target                                                      @@\
	@echo '(* GENERATED FILE --- DO NOT EDIT. *)' > target             @@\
	$(CPP) < concat(target,p) >> target                                @@\
	@chmod a-w target                                                  @@\
                                                                           @@\
clean::                                                                    @@\
	$(RM) target                                                       @@\
                                                                           @@\
beforedepend:: target                                                      @@\
                                                                           @@\

#define SubDir(dir)                                                        @@\
all::                                                                      @@\
	@-echo "-- Making all in" dir; cd dir; make all                    @@\
                                                                           @@\
allopt : opt                                                               @@\
                                                                           @@\
opt::                                                                      @@\
	@-echo "-- Making opt in" dir; cd dir; make opt                    @@\
                                                                           @@\
clean::                                                                    @@\
	@-echo "-- Making clean in" dir; cd dir; make clean                @@\
                                                                           @@\
makefiles::                                                                @@\
	@-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\
                                                                           @@\

#define SubGraphDir(dir)                                                   @@\
all::                                                                      @@\
	@-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                    @@\
                                                                           @@\
opt::                                                                      @@\
	@-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                    @@\
                                                                           @@\
clean::                                                                    @@\
	@-echo "-- Making clean in" dir; cd dir; make clean                @@\
                                                                           @@\
makefiles::                                                                @@\
	@-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\
                                                                           @@\

#define SubTkDir(dir)                                                      @@\
all::                                                                      @@\
	@-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                    @@\
                                                                           @@\
opt::                                                                      @@\
	@-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                    @@\
                                                                           @@\
clean::                                                                    @@\
	@-echo "-- Making clean in" dir; cd dir; make clean                @@\
                                                                           @@\
makefiles::                                                                @@\
	@-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\
                                                                           @@\