Makefile 18.1 KB
Newer Older
huet's avatar
huet committed
1 2 3 4 5 6 7
############################################################################
#                                                                          #
#                     The Sanskrit Heritage Platform                       #
#                                                                          #
#                        Gérard Huet & Pawan Goyal                         #
#                                                                          #
############################################################################
8
# Makefile of Sanskrit Heritage Software  02-06-2017  Copyright INRIA 2017 #
huet's avatar
huet committed
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
############################################################################
# Prerequisites: Ocaml and Camlp4 preprocessor

# For change of make in all recursive Makefiles
MAKE=make

# ZEN computational linguistics toolkit Ocaml library 
ZEN=../ZEN

# Linguistic database
DATA=../DATA

# Literate programming tool ocamlweb (available from Ocaml hump) J.C. Filliatre
NOWEB=ocamlweb 

ZENSOURCES=gen.ml list2.ml word.ml share.mli share.ml unshare.ml trie.ml \
mini.ml deco.ml lexmap.ml minimap.mli minimap.ml zen_lexer.ml

VPATH=$(ZEN) 

# debug by $(MAKE) debug, which calls ocaml -I +camlp4 -I . 
# loading the Pidgin ML syntax by .ocamlinit

# $(MAKE) clean; $(MAKE) depend; $(MAKE) all

# CORE package - utilities, transducers, sanskrit and french lexers, dico spec
35
CORE=$(DISTR_CORE) paths.ml 
36
DISTR_CORE = control.ml version.ml date.ml canon.ml transduction.ml	\
Gérard Huet's avatar
Gérard Huet committed
37 38
	     encode.ml order.ml padapatha.ml sanskrit.mli		\
             sanskrit.ml skt_lexer.ml test_stamp.ml dir.mli dir.ml
huet's avatar
huet committed
39 40

# GRAM package - phonetics, morphology, segmentation and tagging engines
Gérard Huet's avatar
Gérard Huet committed
41 42 43 44 45 46 47 48 49 50 51
GRAM = index.ml phonetics.ml int_sandhi.ml skt_morph.mli morphology.mli \
       naming.ml inflected.mli inflected.ml sandhi.ml sandhier.ml pada.ml \
       nouns.mli nouns.ml verbs.mli verbs.ml parts.ml conj_infos.mli \
       morpho_string.ml morpho.ml declension.ml conjugation.ml indexer.ml \
       indexerd.ml phases.ml lemmatizer.ml auto.mli load_transducers.ml \
       dispatcher.mli dispatcher.ml segmenter.ml load_morphs.ml lexer.mli \
       lexer.ml rank.ml scl_parser.ml reader.ml parser.ml constraints.mli \
       constraints.ml multilingual.ml paraphrase.mli paraphrase.ml \
       bank_lexer.ml regression.ml checkpoints.ml graph_segmenter.ml \
       automaton.ml interface.mli interface.ml user_aid.ml reset_caches.ml \
       params.mli params.ml
huet's avatar
huet committed
52 53

# WEB package - HTML, HTTP, CGI utilities for Web interface
Gérard Huet's avatar
Gérard Huet committed
54 55 56
WEB = html.ml web.ml css.ml cgi.ml morpho_html.ml chapters.ml morpho_scl.ml \
    mk_index_page.ml mk_grammar_page.ml mk_reader_page.ml mk_sandhi_page.ml \
    mk_corpus_page.ml
57 58

# CORPUS package - corpus manager
59
CORPUS = corpus.mli corpus.ml web_corpus.mli web_corpus.ml		\
Gérard Huet's avatar
Gérard Huet committed
60 61 62 63
 	 corpus_manager.mli corpus_manager.ml corpus_manager_cgi.ml	\
	 save_corpus_params.mli save_corpus_params.ml save_corpus_cgi.ml	\
	 mkdir_corpus_params.mli mkdir_corpus_params.ml			\
	 mkdir_corpus_cgi.ml mk_corpus.ml
64

65
# extra file SCLpaths.ml for SCL interfacing - not distributed.
huet's avatar
huet committed
66 67

# TREE package - tree bank manager and syntax analyser - legacy
Gérard Huet's avatar
Gérard Huet committed
68
TREE = parse_tree.ml parse_apte.ml stemmer.ml tag_tree.ml tag_apte.ml 
huet's avatar
huet committed
69 70 71

DEBUG=debug.ml 

72
ENGINE=$(CORE) $(GRAM) $(WEB) $(CORPUS)
huet's avatar
huet committed
73 74 75 76 77 78 79 80
INACTIVE=$(TREE) nyaaya.ml mk_nyaaya_page.ml 

SOURCES=$(ENGINE) $(DEBUG) $(INACTIVE) 

CORENATIVES=list2.cmx gen.cmx paths.cmx version.cmx word.cmx canon.cmx \
zen_lexer.cmx phonetics.cmx transduction.cmx encode.cmx skt_lexer.cmx \
padapatha.cmx sanskrit.cmx order.cmx

81
ANNOTFLAGS = -annot -bin-annot
huet's avatar
huet committed
82

83 84 85 86 87
COMPILE=ocamlopt -pp "camlp4r pa_extend.cmo" -I $(ZEN) -I +camlp4 -c	\
		$(ANNOTFLAGS)

COMPILEI=ocamlc -pp "camlp4r pa_extend.cmo" -I $(ZEN) -I +camlp4 -c	\
		$(ANNOTFLAGS)
huet's avatar
huet committed
88 89 90

LINK=ocamlopt -I $(ZEN) -I +camlp4  dynlink.cmxa camlp4lib.cmxa

91
# standard installation of Sanskrit Heritage platform - assumes ZEN library
huet's avatar
huet committed
92

93
engine: test_version cgis reset_caches static_pages regression mk_corpus
94
# reader_plugin  parse_apte
huet's avatar
huet committed
95

96 97 98 99 100
# testing consistency of Heritage_resources and Heritage_platform
test_version: paths.cmx gen.cmx version.cmx control.cmx test_stamp.cmx
	$(LINK) paths.cmx gen.cmx version.cmx control.cmx  test_stamp.cmx \
-o test_stamp
        
101 102
static_pages: css mk_index_page mk_grammar_page mk_sandhi_page mk_reader_page \
		mk_corpus_page
huet's avatar
huet committed
103

104
all: engine static_pages reset_caches sandhi_test
huet's avatar
huet committed
105 106 107

# legacy in need of re-design
regression: rank.cmx regression.cmx
108
	$(LINK) $(CORENATIVES) str.cmxa unix.cmxa date.cmx control.cmx deco.cmx \
Gérard Huet's avatar
Gérard Huet committed
109 110 111 112 113
lexmap.cmx inflected.cmx html.cmx SCLpaths.cmx web.cmx naming.cmx \
morpho_string.cmx morpho.cmx load_transducers.cmx pada.cmx phases.cmx \
dispatcher.cmx chapters.cmx morpho_html.cmx bank_lexer.cmx cgi.cmx \
segmenter.cmx morpho_scl.cmx load_morphs.cmx lexer.cmx constraints.cmx \
rank.cmx regression.cmx -o regression
huet's avatar
huet committed
114 115 116 117 118 119 120 121 122 123

obsolete: tagger panini

COPYRIGHT: 
	echo "COPYRIGHT is hand-made"

install:
	echo "go back to development directory to do make install"

reset_caches: reset_caches.cmx
124
	$(LINK) $(CORENATIVES) str.cmxa unix.cmxa trie.cmx deco.cmx html.cmx date.cmx \
125
SCLpaths.cmx web.cmx reset_caches.cmx -o reset_caches
huet's avatar
huet committed
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

# clears the cached lexicon (irreversible operation)
clear_cache: reset_caches
	./reset_caches

parse_apte: parse_apte.cmx
	$(LINK) $(CORENATIVES) date.cmx deco.cmx segmenter.cmx \
load_transducers.cmx pada.cmx naming.cmx dispatcher.cmx stemmer.cmx \
bank_lexer.cmx parse_tree.cmx parse_apte.cmx -o parse_apte

tag_apte: tag_apte.cmx
	$(LINK) $(CORENATIVES) date.cmx deco.cmx segmenter.cmx naming.cmx \
load_transducers.cmx pada.cmx dispatcher.cmx stemmer.cmx \
bank_lexer.cmx tag_tree.cmx tag_apte.cmx -o tag_apte

test_apte: parse_apte
	./parse_apte <../CORPUS/APTE/apte.e 

test_apte_tag: tag_apte
	./tag_apte <../CORPUS/APTE/apte.e 

debug_apte: share.cmo date.cmo deco.cmo segmenter.cmo canon.cmo encode.cmo naming.cmo \
skt_lexer.cmo sanskrit.cmo load_transducers.cmo dispatcher.cmo stemmer.cmo \
bank_lexer.cmo tag_tree.cmo tag_apte.cmo
	(cat debug_apte.ml ; cat -) | ocaml -I +camlp4 -I . -I $(ZEN)

cgis: skt_morph.cmi auto.cmi indexer indexerd declension conjugation \
153
lemmatizer reader parser sandhier reader interface user_aid \
154
corpus_manager save_corpus mkdir_corpus
huet's avatar
huet committed
155 156

indexer: indexer.cmx
157
	$(LINK) str.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx \
huet's avatar
huet committed
158
control.cmx word.cmx canon.cmx trie.cmx deco.cmx zen_lexer.cmx phonetics.cmx \
159
transduction.cmx encode.cmx html.cmx SCLpaths.cmx web.cmx cgi.cmx index.cmx \
huet's avatar
huet committed
160 161 162 163
naming.cmx morpho_string.cmx morpho.cmx order.cmx chapters.cmx morpho_html.cmx \
indexer.cmx -o indexer

indexerd: indexerd.cmx 
164
	$(LINK) str.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx control.cmx \
huet's avatar
huet committed
165
word.cmx zen_lexer.cmx canon.cmx phonetics.cmx transduction.cmx encode.cmx \
166
deco.cmx html.cmx SCLpaths.cmx web.cmx naming.cmx cgi.cmx morpho_string.cmx \
huet's avatar
huet committed
167 168 169
morpho.cmx order.cmx chapters.cmx morpho_html.cmx indexerd.cmx -o indexerd

lemmatizer: lemmatizer.cmx 
170
	$(LINK) str.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx control.cmx \
huet's avatar
huet committed
171
word.cmx deco.cmx zen_lexer.cmx canon.cmx phonetics.cmx transduction.cmx \
172
encode.cmx html.cmx SCLpaths.cmx web.cmx cgi.cmx naming.cmx morpho_string.cmx \
huet's avatar
huet committed
173 174 175
morpho.cmx order.cmx chapters.cmx morpho_html.cmx lemmatizer.cmx -o lemmatizer

declension: declension.cmx
176
	$(LINK) str.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx control.cmx \
huet's avatar
huet committed
177 178
word.cmx canon.cmx zen_lexer.cmx phonetics.cmx transduction.cmx encode.cmx \
deco.cmx int_sandhi.cmx lexmap.cmx inflected.cmx bank_lexer.cmx html.cmx \
179
SCLpaths.cmx web.cmx nouns.cmx naming.cmx morpho_string.cmx morpho.cmx order.cmx \
huet's avatar
huet committed
180 181 182 183
chapters.cmx morpho_html.cmx cgi.cmx share.cmx trie.cmx index.cmx \
multilingual.cmx declension.cmx -o declension

conjugation: conjugation.cmx
184
	$(LINK) str.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx control.cmx \
huet's avatar
huet committed
185 186
word.cmx canon.cmx zen_lexer.cmx phonetics.cmx transduction.cmx encode.cmx \
deco.cmx int_sandhi.cmx lexmap.cmx inflected.cmx parts.cmx pada.cmx verbs.cmx \
187
html.cmx SCLpaths.cmx web.cmx naming.cmx morpho_string.cmx morpho.cmx order.cmx \
huet's avatar
huet committed
188 189 190 191
chapters.cmx morpho_html.cmx cgi.cmx share.cmx trie.cmx index.cmx \
multilingual.cmx conjugation.cmx -o conjugation

sandhier: sandhier.cmx
192
	$(LINK) str.cmxa list2.cmx gen.cmx paths.cmx version.cmx control.cmx word.cmx \
huet's avatar
huet committed
193
zen_lexer.cmx canon.cmx phonetics.cmx transduction.cmx encode.cmx sandhi.cmx \
194
int_sandhi.cmx date.cmx html.cmx SCLpaths.cmx web.cmx cgi.cmx sandhier.cmx \
huet's avatar
huet committed
195 196 197
-o sandhier

reader: reader.cmx 
198
	$(LINK) str.cmxa unix.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx \
huet's avatar
huet committed
199 200
control.cmx word.cmx canon.cmx zen_lexer.cmx phonetics.cmx transduction.cmx \
encode.cmx skt_lexer.cmx padapatha.cmx sanskrit.cmx deco.cmx lexmap.cmx \
201
inflected.cmx html.cmx SCLpaths.cmx web.cmx naming.cmx morpho_string.cmx morpho.cmx \
huet's avatar
huet committed
202
load_transducers.cmx pada.cmx phases.cmx dispatcher.cmx order.cmx \
Gérard Huet's avatar
Gérard Huet committed
203
chapters.cmx morpho_html.cmx cgi.cmx segmenter.cmx morpho_scl.cmx \
huet's avatar
huet committed
204
load_morphs.cmx lexer.cmx constraints.cmx rank.cmx bank_lexer.cmx \
205
scl_parser.cmx checkpoints.cmx reader.cmx -o reader 
huet's avatar
huet committed
206

207
interface: interface.cmx
208
	$(LINK) str.cmxa unix.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx \
huet's avatar
huet committed
209 210
control.cmx word.cmx canon.cmx zen_lexer.cmx phonetics.cmx transduction.cmx \
encode.cmx skt_lexer.cmx padapatha.cmx sanskrit.cmx deco.cmx lexmap.cmx \
211
inflected.cmx html.cmx SCLpaths.cmx web.cmx naming.cmx morpho_string.cmx morpho.cmx \
huet's avatar
huet committed
212 213 214
load_transducers.cmx pada.cmx phases.cmx dispatcher.cmx order.cmx \
chapters.cmx morpho_html.cmx bank_lexer.cmx cgi.cmx load_morphs.cmx \
int_sandhi.cmx nouns.cmx share.cmx minimap.cmx mini.cmx nums.cmxa \
215
graph_segmenter.cmx checkpoints.cmx automaton.cmx params.cmx \
216
save_corpus_params.cmx dir.cmx corpus.cmx web_corpus.cmx interface.cmx -o interface
huet's avatar
huet committed
217 218

user_aid: user_aid.cmx
219
	$(LINK) str.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx \
huet's avatar
huet committed
220 221
control.cmx word.cmx canon.cmx deco.cmx zen_lexer.cmx phonetics.cmx \
transduction.cmx encode.cmx skt_lexer.cmx padapatha.cmx sanskrit.cmx html.cmx \
222
SCLpaths.cmx web.cmx naming.cmx morpho_string.cmx morpho.cmx order.cmx chapters.cmx \
huet's avatar
huet committed
223 224 225 226
morpho_html.cmx bank_lexer.cmx cgi.cmx phases.cmx checkpoints.cmx user_aid.cmx \
-o user_aid

parser: parser.cmx 
227
	$(LINK) str.cmxa unix.cmxa list2.cmx gen.cmx paths.cmx version.cmx date.cmx \
huet's avatar
huet committed
228 229
control.cmx word.cmx canon.cmx zen_lexer.cmx phonetics.cmx transduction.cmx \
encode.cmx skt_lexer.cmx padapatha.cmx sanskrit.cmx deco.cmx lexmap.cmx \
230
inflected.cmx html.cmx SCLpaths.cmx web.cmx naming.cmx morpho_string.cmx morpho.cmx \
huet's avatar
huet committed
231 232
load_transducers.cmx pada.cmx phases.cmx dispatcher.cmx order.cmx \
chapters.cmx morpho_html.cmx bank_lexer.cmx cgi.cmx segmenter.cmx \
Gérard Huet's avatar
Gérard Huet committed
233
morpho_scl.cmx load_morphs.cmx lexer.cmx constraints.cmx checkpoints.cmx \
234
paraphrase.cmx scl_parser.cmx parser.cmx -o parser
huet's avatar
huet committed
235

236 237 238 239 240 241 242 243 244 245 246 247
corpus_manager: corpus_manager_cgi.cmx
	$(LINK) str.cmxa unix.cmxa list2.cmx gen.cmx paths.cmx		\
		version.cmx date.cmx control.cmx word.cmx canon.cmx	\
		zen_lexer.cmx phonetics.cmx transduction.cmx encode.cmx	\
		skt_lexer.cmx padapatha.cmx sanskrit.cmx deco.cmx	\
		lexmap.cmx inflected.cmx html.cmx SCLpaths.cmx web.cmx	\
		naming.cmx morpho_string.cmx morpho.cmx			\
		load_transducers.cmx pada.cmx phases.cmx dispatcher.cmx	\
		order.cmx chapters.cmx morpho_html.cmx bank_lexer.cmx	\
		cgi.cmx load_morphs.cmx int_sandhi.cmx nouns.cmx	\
		share.cmx minimap.cmx mini.cmx nums.cmxa		\
		graph_segmenter.cmx checkpoints.cmx automaton.cmx	\
248
		params.cmx save_corpus_params.cmx dir.cmx corpus.cmx	\
249
		web_corpus.cmx multilingual.cmx				\
250
		mkdir_corpus_params.cmx corpus_manager.cmx $< -o $@
251 252 253 254 255 256 257 258 259 260 261 262 263

save_corpus: save_corpus_cgi.cmx
	$(LINK) str.cmxa unix.cmxa list2.cmx gen.cmx paths.cmx		\
		version.cmx date.cmx control.cmx word.cmx canon.cmx	\
		zen_lexer.cmx phonetics.cmx transduction.cmx encode.cmx	\
		skt_lexer.cmx padapatha.cmx sanskrit.cmx deco.cmx	\
		lexmap.cmx inflected.cmx html.cmx SCLpaths.cmx web.cmx	\
		naming.cmx morpho_string.cmx morpho.cmx			\
		load_transducers.cmx pada.cmx phases.cmx dispatcher.cmx	\
		order.cmx chapters.cmx morpho_html.cmx bank_lexer.cmx	\
		cgi.cmx load_morphs.cmx int_sandhi.cmx nouns.cmx	\
		share.cmx minimap.cmx mini.cmx nums.cmxa		\
		graph_segmenter.cmx checkpoints.cmx automaton.cmx	\
264
		params.cmx save_corpus_params.cmx dir.cmx corpus.cmx	\
265
		web_corpus.cmx multilingual.cmx				\
266
		mkdir_corpus_params.cmx corpus_manager.cmx $< -o $@
267 268 269 270 271 272 273 274 275 276 277 278 279

mkdir_corpus: mkdir_corpus_cgi.cmx
	$(LINK) str.cmxa unix.cmxa list2.cmx gen.cmx paths.cmx		\
		version.cmx date.cmx control.cmx word.cmx canon.cmx	\
		zen_lexer.cmx phonetics.cmx transduction.cmx encode.cmx	\
		skt_lexer.cmx padapatha.cmx sanskrit.cmx deco.cmx	\
		lexmap.cmx inflected.cmx html.cmx SCLpaths.cmx web.cmx	\
		naming.cmx morpho_string.cmx morpho.cmx			\
		load_transducers.cmx pada.cmx phases.cmx dispatcher.cmx	\
		order.cmx chapters.cmx morpho_html.cmx bank_lexer.cmx	\
		cgi.cmx load_morphs.cmx int_sandhi.cmx nouns.cmx	\
		share.cmx minimap.cmx mini.cmx nums.cmxa		\
		graph_segmenter.cmx checkpoints.cmx automaton.cmx	\
280
		params.cmx save_corpus_params.cmx dir.cmx corpus.cmx	\
281
		web_corpus.cmx multilingual.cmx				\
282
		mkdir_corpus_params.cmx corpus_manager.cmx $< -o $@
Idir Lankri's avatar
Idir Lankri committed
283

284 285 286 287 288 289 290 291 292 293 294 295
mk_corpus: mk_corpus.cmx
	$(LINK) str.cmxa unix.cmxa list2.cmx gen.cmx paths.cmx		\
		version.cmx date.cmx control.cmx word.cmx canon.cmx	\
		zen_lexer.cmx phonetics.cmx transduction.cmx encode.cmx	\
		skt_lexer.cmx padapatha.cmx sanskrit.cmx deco.cmx	\
		lexmap.cmx inflected.cmx html.cmx SCLpaths.cmx web.cmx	\
		naming.cmx morpho_string.cmx morpho.cmx			\
		load_transducers.cmx pada.cmx phases.cmx dispatcher.cmx	\
		order.cmx chapters.cmx morpho_html.cmx bank_lexer.cmx	\
		cgi.cmx load_morphs.cmx int_sandhi.cmx nouns.cmx	\
		share.cmx minimap.cmx mini.cmx nums.cmxa		\
		graph_segmenter.cmx checkpoints.cmx automaton.cmx	\
296
		params.cmx save_corpus_params.cmx dir.cmx corpus.cmx	\
297
		web_corpus.cmx  multilingual.cmx			\
298
		mkdir_corpus_params.cmx $< -o $@
299

huet's avatar
huet committed
300
css: css.cmx
301
	$(LINK) str.cmxa gen.cmx paths.cmx version.cmx date.cmx html.cmx \
302
SCLpaths.cmx web.cmx css.cmx -o css
huet's avatar
huet committed
303 304

mk_index_page: mk_index_page.cmx 
305
	$(LINK) str.cmxa gen.cmx paths.cmx version.cmx date.cmx html.cmx \
306
SCLpaths.cmx web.cmx mk_index_page.cmx -o mk_index_page
huet's avatar
huet committed
307 308

mk_grammar_page: mk_grammar_page.cmx 
309
	$(LINK) str.cmxa gen.cmx paths.cmx version.cmx date.cmx html.cmx \
310
SCLpaths.cmx web.cmx mk_grammar_page.cmx -o mk_grammar_page
huet's avatar
huet committed
311 312

mk_reader_page: mk_reader_page.cmx
313
	$(LINK) $(CORENATIVES) str.cmxa unix.cmxa control.cmx cgi.cmx date.cmx SCLpaths.cmx html.cmx web.cmx params.cmx dir.cmx corpus.cmx web_corpus.cmx mk_reader_page.cmx -o mk_reader_page
huet's avatar
huet committed
314 315 316

mk_nyaaya_page: mk_nyaaya_page.cmx
	$(LINK) gen.cmx paths.cmx version.cmx date.cmx \
317
html.cmx SCLpaths.cmx web.cmx cgi.cmx mk_nyaaya_page.cmx -o mk_nyaaya_page
huet's avatar
huet committed
318 319

mk_sandhi_page: mk_sandhi_page.cmx
320
	$(LINK) str.cmxa gen.cmx paths.cmx version.cmx date.cmx html.cmx \
321
SCLpaths.cmx web.cmx mk_sandhi_page.cmx -o mk_sandhi_page
huet's avatar
huet committed
322

323
mk_corpus_page: mk_corpus_page.cmx
324 325
	$(LINK) $(CORENATIVES) str.cmxa unix.cmxa date.cmx	\
		html.cmx SCLpaths.cmx web.cmx params.cmx dir.cmx cgi.cmx corpus.cmx web_corpus.cmx $< -o $@
326

huet's avatar
huet committed
327 328
# site_pages must be recomputed after configuration and creation of DICO dir
# the style sheet must be recomputed, since it contains absolute URLs as well
329 330
site_pages: mk_index_page mk_grammar_page mk_reader_page mk_sandhi_page	\
		mk_corpus_page css
huet's avatar
huet committed
331 332 333 334 335 336 337 338 339 340 341
	./mk_index_page
	cd ../DICO; ln -f index.fr.html index.html # backward compatibility
	./mk_grammar_page
	cd ../DICO; ln -f grammar.fr.html grammar.html # id
	./mk_reader_page -en
	./mk_reader_page -fr
#	./mk_nyaaya_page -en
#	./mk_nyaaya_page -fr
	cd ../DICO; ln -f reader.fr.html reader.html # id
	./mk_sandhi_page
	cd ../DICO; ln -f sandhi.fr.html sandhi.html # id
342 343
	./mk_corpus_page
	cd ../DICO; ln -f corpus.fr.html corpus.html # id
Gérard Huet's avatar
Gérard Huet committed
344
# XML info file copied in DICO by make web_services in main Makefile
huet's avatar
huet committed
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
	./css 
# but install sets index.html to .fr. ou .en. according to config lexicon choice 

# sandhi non-regression tests
sandhi_test: sandhi_test.cmx
	$(LINK) list2.cmx gen.cmx paths.cmx version.cmx \
word.cmx canon.cmx zen_lexer.cmx phonetics.cmx transduction.cmx encode.cmx \
sandhi.cmx int_sandhi.cmx sandhi_test.cmx -o sandhi_test
	./sandhi_test

# tagger1 uni-phase for noun phrases - obsolete but good for teaching
tagger1: tagger1.cmx 
#	cd $(DATA) && $(MAKE) transn.rem
	$(LINK) list2.cmx gen.cmx paths.cmx version.cmx \
word.cmx canon.cmx zen_lexer.cmx phonetics.cmx transduction.cmx \
skt_lexer.cmx deco.cmx sandhi.cmx padapatha.cmx sanskrit.cmx naming.cmx \
morpho.cmx segmenter1.cmx tagger1.cmx -o tagger1

# enter in ocaml toplevel '#use "debug.ml";' in order to debug 
# adapt to your need in modules 
# NB best used by first hiding all .mli, make clean, make depend 
debug: gen.cmo version.cmo date.cmo word.cmo zen_lexer.cmo order.cmo \
canon.cmo phonetics.cmo transduction.cmo padapatha.cmo sanskrit.cmo \
Gérard Huet's avatar
Gérard Huet committed
368 369
sandhi.cmo int_sandhi.cmo share.cmo trie.cmo deco.cmo skt_lexer.cmo \
encode.cmo order.cmo lexmap.cmo inflected.cmo parts.cmo verbs.cmo \
370
morpho_html.cmo cgi.cmo html.cmo web.cmo indexer.cmo declension.cmo 
huet's avatar
huet committed
371 372 373 374 375 376 377 378 379
	(cat debug.ml ; cat -) | ocaml -I +camlp4 -I . -I $(ZEN)

morpho_debug: list2.cmo word.cmo deco.cmo morpho_string.cmo paths.cmo \
install.cmo canon.cmo zen_lexer.cmo gen.cmo transduction.cmo phonetics.cmo \
encode.cmo naming.cmo version.cmo date.cmo html.cmo morpho.cmo 
	(cat morpho_debug.ml ; cat -) | ocaml -I +camlp4 -I . -I $(ZEN)

# Documentation of the ML library - all packages 
doc: 
380
	$(MAKE) Heritage_Platform.pdf
huet's avatar
huet committed
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395

Heritage_Platform.pdf: $(ENGINE) 
	$(NOWEB) --noweb --tex ../DOC/docintro.tex $(ENGINE) -o ../DOC/Heritage_Platform.tex
	cd ../DOC && pdflatex Heritage_Platform


.depend depend:: # $(ENGINE) # remove dependency on sources to avoid depend comp
	> .depend.new
	for i in $(ZENSOURCES); do \
	ocamldep -pp camlp4rf -I $(ZEN) -I . $(ZEN)/$$i >> .depend.new ; done
	for i in $(ENGINE); do \
	ocamldep -pp camlp4rf -I $(ZEN) -I . $$i >> .depend.new ; done
	mv .depend.new .depend

clean:
396
	rm -f *.cmo *.cmi *.cmx *.ppi *.ppo *.o *.annot *.cmt *.cmti
Gérard Huet's avatar
Gérard Huet committed
397
	rm -f css indexer indexerd sandhier reader parser lemmatizer \
huet's avatar
huet committed
398
declension conjugation mk_index_page mk_grammar_page mk_reader_page regression \
399
mk_sandhi_page mk_corpus_page sandhi_test reset_caches interface user_aid \
400
parse_apte tag_apte corpus_manager save_corpus mkdir_corpus mk_corpus
huet's avatar
huet committed
401 402 403 404 405 406 407 408 409 410 411 412 413 414
#	make dico.cmi auto.cmi conj_infos.cmi # needed to get dependencies right 

.SUFFIXES: .ml .mli .cmx .cmo .cmi

.ml.cmo:
	$(COMPILEI) $<

.mli.cmi:
	$(COMPILEI) $<

.ml.cmx:
	$(COMPILE) $<

include .depend