-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
543 lines (420 loc) · 19 KB
/
Makefile.in
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# Copyright (C) 2001 Jean-Christophe FILLIATRE
# 2002, 2003, 2004, 2005, 2006, 2009, 2010, 2011 Yamagata
# Yoriyuki
# 2010 Pierre Chambart
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#
# You can contact the authour by sending email to
# where to install the binaries
prefix=@prefix@
exec_prefix=@exec_prefix@
BINDIR=@bindir@
# where to install the data files
DATADIR=@datadir@
# other variables set by ./configure
CPPO = @CPPO@
FGREP = @FGREP@
OCAMLC = @OCAMLC@
OCAMLOPT = @OCAMLOPT@
OCAMLYACC = @OCAMLYACC@
OCAMLLEX = @OCAMLLEX@
OCAMLDEP = @OCAMLDEP@ -slash
OCAMLLIB = @OCAMLLIB@
OCAMLBEST= @OCAMLBEST@
OCAMLVERSION = @OCAMLVERSION@
CAMLP4O = -pp "@CAMLP4O@ -I $(OCAMLLIB)"
INSTALL = @OCAMLINSTALL@
UNINSTALL = un@OCAMLINSTALL@
OCAMLDOC = @OCAMLDOC@
OCAMLMKLIB = @OCAMLMKLIB@
# compiler options
BOPTIONS = @DEBUG@ @ASSERT@
OOPTIONS = @COPTIONS@ @PROFILE@ @ASSERT@
#
PACKAGE = camomile
VERSION = @VERSION@
###################################################################
# Build procedure
###################################################################
.PHONY : all byte opt tools toolslib test test.opt unimaps chamap_data unidata dist depend clean distclean allclean
SUBDIR = -I internal -I public -I toolslib -I .
INCLUDES = $(SUBDIR)
BFLAGS = $(BOPTIONS) $(INCLUDES)
OFLAGS = $(OOPTIONS) $(INCLUDES)
# Generic targets
#################
all : byte $(OCAMLBEST) unidata unimaps charmap_data locale_data
# Build the library
###################
lib : byte $(OCAMLBEST) opt
NOOBJ_INT= \
public/unicodeString.cmi configInt.cmi internal/uReStrParserType.cmi
#Modules without configuration
OBJNOINI= \
internal/database.cmo\
camomileDefaultConfig.cmo\
internal/bitsvect.cmo internal/bytesvect.cmo \
internal/avlTree.cmo internal/iSet.cmo internal/iMap.cmo \
internal/tbl31.cmo internal/byte_labeled_dag.cmo \
internal/xArray.cmo public/oOChannel.cmo \
public/uChar.cmo public/uSet.cmo \
public/uMap.cmo public/uCharTbl.cmo \
public/uText.cmo public/xString.cmo \
public/subText.cmo public/uLine.cmo public/locale.cmo \
internal/hangul.cmo internal/unidata.cmo \
internal/charmap.cmo internal/unimap.cmo public/charEncoding.cmo \
public/uTF8.cmo public/uTF16.cmo public/uCS4.cmo \
public/uPervasives.cmo
OBJECTS_WITH_CONFIG =\
public/uCharInfo.cmo public/uNF.cmo public/uCol.cmo \
public/caseMap.cmo public/uRe.cmo\
internal/uReStrParser.cmo internal/uReStrLexer.cmo public/uReStr.cmo\
internal/stringPrep_data.cmo public/stringPrep.cmo
OBJECTS = $(NOOBJ_INT:.cmi=.cmo) $(OBJNOINI) $(OBJECTS_WITH_CONFIG)
OPTOBJECTS= $(OBJECTS:.cmo=.cmx)
SUBMLI= configInt.mli public/oOChannel.mli public/uChar.mli \
public/uSet.mli public/uMap.mli public/uCharTbl.mli \
public/unicodeString.mli public/uText.mli public/xString.mli \
public/subText.mli public/uLine.mli public/locale.mli \
public/uTF8.mli public/uTF16.mli public/uCS4.mli \
public/uPervasives.mli public/uRe.mli public/charEncoding.mli \
public/uCharInfo.mli public/uNF.mli public/uCol.mli \
public/caseMap.mli public/uReStr.mli public/stringPrep.mli \
internal/uReStrParser.cmo : internal/uReStrParser.cmi
internal/uReStrParser.cmx : internal/uReStrParser.cmi
byte : camomile.cma camomileLibrary.cma
opt : camomile.cmxa camomileLibrary.cmxa
$(NOOBJ_INT:.cmi=.cmo) : %.cmo : %.mli %.cmi
$(OCAMLC) -c $(BFLAGS) -impl $<
$(NOOBJ_INT:.cmi=.cmx) : %.cmx : %.mli %.cmi
$(OCAMLOPT) -c $(OFLAGS) -impl $<
camomileLibrary.mli : camomileLibrary.mlip $(SUBMLI)
$(CPPO) $(SUBDIR) -o camomileLibrary.mli camomileLibrary.mlip
camomileLibrary.ml : camomileLibrary.mlp $(SUBMLI)
$(CPPO) $(SUBDIR) -o camomileLibrary.ml camomileLibrary.mlp
camomile.cma : $(OBJECTS) camomileLibrary.cmo camomileLibraryDefault.cmo camomileLibraryDyn.cmo
$(OCAMLC) -a -o camomile.cma $(OBJECTS) camomileLibrary.cmo camomileLibraryDefault.cmo camomileLibraryDyn.cmo
camomile.cmxa : $(OPTOBJECTS) camomileLibrary.cmx camomileLibraryDefault.cmx camomileLibraryDyn.cmx
$(OCAMLOPT) -a -o camomile.cmxa $(OPTOBJECTS) camomileLibrary.cmx camomileLibraryDefault.cmx camomileLibraryDyn.cmx
camomileLibrary.cma : $(OBJECTS) camomileLibrary.cmo
$(OCAMLC) -a -o camomileLibrary.cma $(OBJECTS) camomileLibrary.cmo
camomileLibrary.cmxa : $(OPTOBJECTS) camomileLibrary.cmx
$(OCAMLOPT) -a -o camomileLibrary.cmxa $(OPTOBJECTS) camomileLibrary.cmx
# Documentation
.PHONY : dochtml doclatex doctexi man
htdoc : dochtml
dochtml :
mkdir -p dochtml
$(OCAMLDOC) $(INCLUDES) -html -d dochtml camomileLibrary.mli camomileLibraryDefault.mli camomileLibraryDyn.mli
doclatex :
mkdir -p doclatex
$(OCAMLDOC) $(INCLUDES) -latex -o doclatex/camomile.tex camomileLibrary.mli camomileLibraryDefault.mli camomileLibraryDyn.mli
doctexi :
mkdir -p doctexi
$(OCAMLDOC) $(INCLUDES) -texi -o doctexi/camomile.texi camomileLibrary.mli camomileLibraryDefault.mli camomileLibraryDyn.mli
man :
mkdir -p man
$(OCAMLDOC) $(INCLUDES) -man -d man camomileLibrary.mli camomileLibraryDefault.mli camomileLibraryDyn.mli
# Configuration File
############################
camomileDefaultConfig.ml : Makefile
echo '(* This file is automatically generated *)' > camomileDefaultConfig.ml
echo 'let datadir = Filename.concat (Filename.concat "$(DATADIR)" "camomile") "database"' >> camomileDefaultConfig.ml
echo 'let localedir = Filename.concat (Filename.concat "$(DATADIR)" "camomile") "locales"' >> camomileDefaultConfig.ml
echo 'let charmapdir = Filename.concat (Filename.concat "$(DATADIR)" "camomile") "charmaps"' >> camomileDefaultConfig.ml
echo 'let unimapdir = Filename.concat (Filename.concat "$(DATADIR)" "camomile") "mappings"' >> camomileDefaultConfig.ml
# Build procedures for tools
############################
TOOLSOBJ =\
$(OBJECTS) toolslib/camomileconfig.cmo toolslib/toolslib.cmo\
toolslib/absOrd.cmo toolslib/absCe.cmo\
toolslib/colParser.cmo toolslib/colLexer.cmo
OPTTOOLSOBJ = $(TOOLSOBJ:.cmo=.cmx)
toolslib : toolslib.cma
toolslib.cma : $(TOOLSOBJ)
$(OCAMLC) $(BFLAGS) -a -o toolslib.cma $(TOOLSOBJ)
toolslib.cmxa : $(OPTTOOLSOBJ)
$(OCAMLOPT) $(OFLAGS) -a -o toolslib.cmxa $(OPTTOOLSOBJ)
toolslib/colParser.cmo : toolslib/colParser.cmi
toolslib/colParser.cmx : toolslib/colParser.cmi
TOOLS = \
tools/parse_unidata.byte tools/parse_uniset.byte tools/camomilecharmap.byte \
tools/parse_specialcasing.byte tools/parse_casefolding.byte \
tools/parse_scripts.byte tools/parse_allkeys.byte mappings/gen_mappings.byte\
tools/parse_age.byte \
tools/camomilelocaledef.byte tools/camomilestringprep.byte
OPTTOOLS = $(TOOLS:.byte=.opt)
TOOLSLIB=bigarray.cma str.cma toolslib.cma
OPTTOOLSLIB=$(TOOLSLIB:.cma=.cmxa)
tools : $(TOOLS)
$(TOOLS) : %.byte : toolslib.cma %.cmo
$(OCAMLC) $(BFLAGS) -o $@ $(TOOLSLIB) $*.cmo
$(OPTTOOLS) : %.opt : toolslib.cmxa %.cmx
$(OCAMLOPT) $(OFLAGS) -o $@ $(OPTTOOLSLIB) $*.cmx
tools/camomilelocaledef.cmo : tools/camomilelocaledef.ml
$(OCAMLC) $(CAMLP4O) -c $(BFLAGS) tools/camomilelocaledef.ml
tools/camomilelocaledef.cmx : tools/camomilelocaledef.ml
$(OCAMLOPT) $(CAMLP4O) -c $(OFLAGS) tools/camomilelocaledef.ml
# Compile unidata
###################################################################
UNIDATA_DIR = unidata
TR10DATA_DIR = unidata/tr10
FROM_UNIDATA = \
database/combined_class.mar database/composition.mar \
database/decomposition.mar database/general_category.mar \
database/to_lower1.mar database/to_title1.mar database/to_upper1.mar \
database/general_category_map.mar
STRINGPREP_TABLES = \
database/map_b1b2.mar database/map_b1.mar \
database/d1.mar database/d2.mar \
database/saslprep_map.mar database/nodeprep_prohibited.mar \
database/resourceprep_prohibited.mar database/nameprep_prohibited.mar \
database/saslprep_prohibited.mar database/trace_prohibited.mar \
database/iscsi_prohibited.mar database/mib_prohibited.mar
PROPS = \
White_Space Bidi_Control Join_Control \
Hyphen Quotation_Mark Terminal_Punctuation Other_Math Hex_Digit \
ASCII_Hex_Digit Other_Alphabetic Ideographic Diacritic Extender \
Other_Lowercase Other_Uppercase Noncharacter_Code_Point \
Other_Grapheme_Extend Grapheme_Link IDS_Binary_Operator \
IDS_Trinary_Operator Radical Unified_Ideograph \
Other_Default_Ignorable_Code_Point Deprecated Soft_Dotted \
Logical_Order_Exception
CORE_DERIVED_PROPS = \
Math Alphabetic Lowercase Uppercase ID_Start ID_Continue \
XID_Start XID_Continue Default_Ignorable_Code_Point Grapheme_Extend \
Grapheme_Base
PROP_TBLS = $(patsubst %, database/%.mar, $(PROPS))
PROP_SETS = $(patsubst %, database/%_set.mar, $(PROPS))
CORE_DERIVED_PROP_TBLS = $(patsubst %, database/%.mar, $(CORE_DERIVED_PROPS))
CORE_DERIVED_PROP_SETS = $(patsubst %, database/%_set.mar, \
$(CORE_DERIVED_PROPS))
DATABASE = \
$(FROM_UNIDATA) $(PROP_TBLS) $(PROP_SETS) \
$(CORE_DERIVED_PROP_TBLS) $(CORE_DERIVED_PROP_TBL_SETS) \
$(STRINGPREP_TABLES) \
database/case_folding.mar database/composition_exclusion.mar \
database/age.mar database/scripts.mar \
database/special_casing.mar database/allkeys.mar
unidata : $(DATABASE)
$(DATABASE) : database
database :
mkdir -p database
$(PROP_TBLS) : database/%.mar : $(UNIDATA_DIR)/PropList.txt tools/parse_uniset.$(OCAMLBEST)
$(FGREP) $* $< | tools/parse_uniset.$(OCAMLBEST) database $*
$(PROP_SETS) : database/%_set.mar : $(UNIDATA_DIR)/PropList.txt tools/parse_uniset.$(OCAMLBEST)
$(FGREP) $* $< | tools/parse_uniset.$(OCAMLBEST) database $*
$(CORE_DERIVED_PROP_TBLS) : database/%.mar : $(UNIDATA_DIR)/DerivedCoreProperties.txt tools/parse_uniset.$(OCAMLBEST)
$(FGREP) $* $< | tools/parse_uniset.$(OCAMLBEST) database $*
$(CORE_DERIVED_PROP_SETS) : database/%_set.mar : $(UNIDATA_DIR)/DerivedCoreProperties.txt tools/parse_uniset.$(OCAMLBEST)
$(FGREP) $* $< | tools/parse_uniset.$(OCAMLBEST) database $*
$(FROM_UNIDATA) : tools/parse_unidata.$(OCAMLBEST) $(UNIDATA_DIR)/UnicodeData.txt
tools/parse_unidata.$(OCAMLBEST) database < $(UNIDATA_DIR)/UnicodeData.txt
$(STRINGPREP_TABLES) : tools/camomilestringprep.$(OCAMLBEST)
tools/camomilestringprep.$(OCAMLBEST) -in unidata/stringprep -out database
database/allkeys.mar : $(FROM_UNIDATA) $(PROP_TBLS) tools/parse_allkeys.$(OCAMLBEST)\
$(TR10DATA_DIR)/allkeys.txt
tools/parse_allkeys.$(OCAMLBEST) database < $(TR10DATA_DIR)/allkeys.txt
database/case_folding.mar : tools/parse_casefolding.$(OCAMLBEST)\
$(UNIDATA_DIR)/CaseFolding.txt
tools/parse_casefolding.$(OCAMLBEST) database < $(UNIDATA_DIR)/CaseFolding.txt
database/composition_exclusion.mar : tools/parse_uniset.$(OCAMLBEST) $(UNIDATA_DIR)/CompositionExclusions.txt
tools/parse_uniset.$(OCAMLBEST) database composition_exclusion < $(UNIDATA_DIR)/CompositionExclusions.txt
database/lowercases.mar : tools/parse_uniset.$(OCAMLBEST) $(UNIDATA_DIR)/DerivedCoreProperties.txt
database/special_casing.mar : tools/parse_specialcasing.$(OCAMLBEST) $(UNIDATA_DIR)/SpecialCasing.txt
tools/parse_specialcasing.$(OCAMLBEST) database < $(UNIDATA_DIR)/SpecialCasing.txt
database/scripts.mar : tools/parse_scripts.$(OCAMLBEST) $(UNIDATA_DIR)/Scripts.txt
tools/parse_scripts.$(OCAMLBEST) database < $(UNIDATA_DIR)/Scripts.txt
database/scripts_map.mar : tools/parse_scripts.$(OCAMLBEST) $(UNIDATA_DIR)/Scripts.txt
tools/parse_scripts.$(OCAMLBEST) database < $(UNIDATA_DIR)/Scripts.txt
database/age.mar database/age_map.mar : tools/parse_age.$(OCAMLBEST) $(UNIDATA_DIR)/DerivedAge.txt
tools/parse_age.$(OCAMLBEST) database < $(UNIDATA_DIR)/DerivedAge.txt
# Create Unicode mapping tables
###############################
MAPPING_SOURCES = \
charmaps/GB2312 charmaps/EUC-JP charmaps/EUC-KR charmaps/EUC-TW\
charmaps/ISO-8859-7
MAPPINGS = \
mappings/cns11643.mar mappings/jisx0201.mar mappings/ksc5601.mar\
mappings/gb2312.mar mappings/jisx0208.mar\
mappings/iso88597.mar mappings/jisx0212.mar
unimaps : $(MAPPINGS)
$(MAPPINGS) : $(MAPPING_SOURCES) mappings/gen_mappings.$(OCAMLBEST)
cd mappings && ./gen_mappings.$(OCAMLBEST)
# Compilation of charmap files
##############################
# NF_Z_62-010_(1973) and WIN-SAMI-2 are defined in the files whose
# names are different from the code names. This cause unnecessary
# rebuild of NF_Z_62-010_(1973).mar and WIN-SAMI-2.mar. However,
# since charmap files are derived from outside sources, we let them as
# they are.
CHARMAP_DATA := $(patsubst charmaps/%,charmaps/%.mar, \
$(filter-out charmaps/CVS charmaps/%.mar, $(wildcard charmaps/*)))
test :
echo $(CHARMAP_DATA)
charmap_data : $(CHARMAP_DATA)
$(CHARMAP_DATA) : charmaps/%.mar : tools/camomilecharmap.$(OCAMLBEST) charmaps/%
tools/camomilecharmap.$(OCAMLBEST) -d charmaps charmaps/$* || true
# Compilation of locale data
############################
LOCALE_DATA := $(patsubst locales/%.txt,locales/%.mar, \
$(wildcard locales/*.txt))
locale_data : $(LOCALE_DATA)
$(LOCALE_DATA) : locales/%.mar : database tools/camomilelocaledef.$(OCAMLBEST) locales/%.txt
tools/camomilelocaledef.$(OCAMLBEST) --file $(@:.mar=.txt) locales
# ###################################################################
# # libre
# ###################################################################
# libre.byte: byte
# cd libre && $(MAKE) byte
# libre.opt: opt
# cd libre && $(MAKE) opt
# libre: libre.byte libre.$(OCAMLBEST)
# install-libre: libre
# cd libre && $(MAKE) install
###################################################################
# Installation and export
###################################################################
MLI = camomileLibrary.mli camomileLibraryDefault.mli camomileLibraryDyn.mli
install: $(INSTALL) install-data
install-without-ocamlfind:
mkdir -p $(DESTDIR)$(OCAMLLIB)
cp -f camomileLibrary.cmi '$(DESTDIR)$(OCAMLLIB)'
cp -f camomileLibraryDefault.cmi '$(DESTDIR)$(OCAMLLIB)'
cp -f camomileLibraryDyn.cmi '$(DESTDIR)$(OCAMLLIB)'
if [ -f camomileLibrary.cmx ]; then cp -f camomileLibrary.cmx '$(DESTDIR)$(OCAMLLIB)'; fi
if [ -f camomileLibrary.cma ]; then cp -f camomileLibrary.cma '$(DESTDIR)$(OCAMLLIB)'; fi
if [ -f camomileLibrary.cmxa ]; then cp -f camomileLibrary.cmxa '$(DESTDIR)$(OCAMLLIB)'; fi
if [ -f camomileLibrary.a ]; then cp -f camomileLibrary.a '$(DESTDIR)$(OCAMLLIB)'; fi
if [ -f camomileLibraryDefault.cmx ]; then cp -f camomileLibraryDefault.cmx '$(DESTDIR)$(OCAMLLIB)'; fi
if [ -f camomileLibraryDyn.cmx ]; then cp -f camomileLibraryDyn.cmx '$(DESTDIR)$(OCAMLLIB)'; fi
if [ -f camomile.cma ]; then cp -f camomile.cma '$(DESTDIR)$(OCAMLLIB)'; fi
if [ -f camomile.cmxa ]; then cp -f camomile.cmxa '$(DESTDIR)$(OCAMLLIB)'; fi
if [ -f camomile.a ]; then cp -f camomile.a '$(DESTDIR)$(OCAMLLIB)'; fi
install-with-ocamlfind:
files= &&\
if [ -f camomileLibrary.cmx ]; then files=camomileLibrary.cmx; fi && \
if [ -f camomileLibrary.cma ]; then files="camomileLibrary.cma $$files"; fi && \
if [ -f camomileLibrary.cmxa ]; then files="camomileLibrary.cmxa $$files"; fi && \
if [ -f camomileLibraryDefault.cmx ]; then files="camomileLibraryDefault.cmx $$files"; fi && \
if [ -f camomileLibraryDyn.cmx ]; then files="camomileLibraryDyn.cmx $$files"; fi && \
if [ -f camomile.cma ]; then files="camomile.cma $$files"; fi&& \
if [ -f camomile.cmxa ]; then files="camomile.cmxa $$files"; fi&& \
if [ -f camomile.a ]; then files="camomile.a $$files"; fi && \
ocamlfind install camomile $$files META $(MLI) camomileLibrary.cmi camomileLibraryDefault.cmi camomileLibraryDyn.cmi
install-data:
mkdir -p '$(DESTDIR)$(DATADIR)'
mkdir -p '$(DESTDIR)$(DATADIR)'/camomile
mkdir -p '$(DESTDIR)$(DATADIR)'/camomile/database
cp -f database/*.mar '$(DESTDIR)$(DATADIR)'/camomile/database || true
mkdir -p '$(DESTDIR)$(DATADIR)'/camomile/charmaps
cp -f charmaps/*.mar '$(DESTDIR)$(DATADIR)'/camomile/charmaps || true
mkdir -p '$(DESTDIR)$(DATADIR)'/camomile/mappings
cp -f mappings/*.mar '$(DESTDIR)$(DATADIR)'/camomile/mappings || true
mkdir -p '$(DESTDIR)$(DATADIR)'/camomile/locales
cp -f locales/*.mar '$(DESTDIR)$(DATADIR)'/camomile/locales || true
uninstall: $(UNINSTALL)
uninstall-without-ocamlfind:
rm -f '$(DESTDIR)$(OCAMLLIB)'/camomile.*
rm -f '$(DESTDIR)$(OCAMLLIB)'/camomileLibrary.*
rm -f '$(DESTDIR)$(OCAMLLIB)'/camomileLibraryDefault.*
rm -f '$(DESTDIR)$(OCAMLLIB)'/camomileLibraryDyn.*
uninstall-with-ocamlfind:
ocamlfind remove camomile
rm -fr '$(DESTDIR)$(DATADIR)'/camomile
###################################################################
# Generic rules
###################################################################
.SUFFIXES: .mli .ml .cmi .cmo .cmx .mll .mly
.mli.cmi:
$(OCAMLC) -c $(BFLAGS) $<
.ml.cmo:
$(OCAMLC) -c $(BFLAGS) $<
.ml.o:
$(OCAMLOPT) -c $(OFLAGS) $<
.ml.cmx:
$(OCAMLOPT) -c $(OFLAGS) $<
.mll.ml:
$(OCAMLLEX) $<
.mly.ml:
$(OCAMLYACC) -v $<
.mly.mli:
$(OCAMLYACC) -v $<
###################################################################
# distribution
###################################################################
dist : $(PACKAGE)-$(VERSION).tar.bz2
configure : configure.in
autoconf
DISTDIR = $(PACKAGE)-$(VERSION)
$(PACKAGE)-$(VERSION).tar.bz2 : camomileLibrary.mli camomileLibrary.ml .depend configure
mkdir -p $(DISTDIR)
cp -p --parents \
README Changes META.in COPYING \
.depend Makefile.in configure configure.in configInt.mli \
camomileLibrary.mli camomileLibrary.mlip \
camomileLibrary.ml camomileLibrary.mlp \
camomileLibraryDefault.ml camomileLibraryDefault.mli \
camomileLibraryDyn.ml camomileLibraryDyn.mli \
$(CHARMAP_DATA:.mar=) \
locales/license.html locales/*.txt \
unidata/README unidata/*.txt unidata/*.html \
unidata/tr10/README unidata/tr10/*.txt \
unidata/stringprep/* \
internal/*.ml internal/*.ml[ily] \
public/*.ml public/*.mli \
mappings/*.ml \
toolslib/*.ml toolslib/*.ml[ily] \
tools/*.ml \
$(DISTDIR)
tar -cjvf $(DISTDIR).tar.bz2 $(DISTDIR)
rm -Rf $(DISTDIR)
###################################################################
# tags, clean, dist and depend :
###################################################################
tags :
otags */*.ml */*.mli *.ml *.mli
clean :
rm -f *.cm[ioxa] *.cmxa *.o *.so *.a */*.cm[iox] */*.o pocaml\
*/*.byte */*.opt
rm -f database/*.mar
rm -f charmaps/*.mar
rm -f mappings/*.mar
rm -f locales/*.mar
rm -f toolslib/*.cma toolslib/*.cmxa
distclean : clean
rm -f TAGS
rm -f config.status
rm Makefile META
allclean : distclean
rm .depend
rm configure
rm camomileLibrary.mli camomileLibrary.ml
depend : .depend
.depend : camomileLibrary.mli camomileLibrary.ml camomileDefaultConfig.ml *.ml *.mli internal/*.ml internal/uReStrParser.mli internal/uReStrParser.ml \
internal/*.mli public/*.ml public/*.mli mappings/*.ml \
toolslib/*.ml toolslib/*.mli $(TOOLS:.byte=.ml)
$(OCAMLDEP) $(SUBDIR) *.ml *.mli \
internal/*.ml internal/*.mli \
public/*.ml public/*.mli \
mappings/*.ml mappings/*.mli \
toolslib/*.ml toolslib/*.mli \
> .depend
$(OCAMLDEP) $(CAMLP4O) $(SUBDIR) \
tools/$(TOOLS:.byte=.ml) >> .depend
include .depend