MMakefile 32.3 KB
Newer Older
huet's avatar
huet committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
############################################################################
#                                                                          #
#                      The Sanskrit Heritage Platform                      #
#                                                                          #
#                         Gérard Huet & Pawan Goyal                        #
#                                                                          #
############################################################################
#TEMPLATE Makefile of SKT Platform      #DATE      Copyright Gérard Huet 2017 #
############################################################################
#WARN

# This software presupposes a Unix-like OS environment, with c, make and sed
# Also python is assumed for package management, and javascript for scripts.
# Stand-alone distribution ought to include Zen and Ocaml/Camlp4 distributions.
15
# Also Apache2 for managing the Web site.
huet's avatar
huet committed
16 17 18 19

############################ VERSIONING ####################################

# If you change VERSION/DATE: ./configure (triggering make version)
20
# and separately update lexicon version counter in Heritage.e
huet's avatar
huet committed
21 22 23 24 25 26 27 28 29
VERSION=#VERSION
# DATE ought to be of the form YYYY-MM-DD, consistently with ISO 8601
DATE=#DATE

# Sanskrit resources are defined at configuration time:
SKTRESOURCES=#SKTRESOURCES

DATA=$(SKTRESOURCES)DATA# morphological data and transducers
HERITAGE=$(SKTRESOURCES)DICO# hypertext Heritage read-only
30
DICO=DICO# hypertext Heritage
huet's avatar
huet committed
31 32 33 34 35
BOOK=$(SKTRESOURCES)BOOK# Heritage.pdf abrevs.pdf
MW=$(SKTRESOURCES)MW# hypertext Monier-Williams
GOLD=$(SKTRESOURCES)GOLD# Heritage in Goldendict format databases
XMLBANKS=$(SKTRESOURCES)XML# Heritage Sanskrit morphology in XML databases

36 37 38 39 40 41
# Path to global Sanskrit corpus downloaded from Git.
SKTCORPUS = #SKTCORPUS

# Path to the corpus in the server area.
SERVERCORPUS = $(SERVERPUBLICDIR)CORPUS

42 43 44 45 46 47 48 49
# Macro to extract information from the Apache configuration.
apache_config_extract = $(shell apachectl -S | grep $(1) |		\
				cut -d ' ' -f 2 | cut -d '=' -f 2)

# User and group under which CGIs are executed.
APACHE_USER = $(call apache_config_extract,"User")
APACHE_GROUP = $(call apache_config_extract,"Group")

huet's avatar
huet committed
50
# Virtual path for make
51
VPATH=ML
huet's avatar
huet committed
52 53 54 55 56 57 58

# For change of make in all recursive Makefiles
MAKE=make
SHELL=/bin/sh

############### Distribution Parameterization Begin #########################

59
# Distribution licenses - depends on the packages selection
huet's avatar
huet committed
60 61 62
# LGPL distribution Kerala workshop 25-12-2011 Happy Christmas !
# LGPL distribution WSC Conference Bangkok 25-06-2015
# GitLab archive 15-04-2017
63
# SCL parser interface 02-06-2017
huet's avatar
huet committed
64 65 66

SOFT_LICENSE=LEGAL/LGPL/LICENSE # Free software license LGPL
#SOFT_LICENSE=LEGAL/UoH/LICENSE # University of Hyderabad distribution
67
DATA_LICENSE=$(DATA)/LGPLLR.pdf
huet's avatar
huet committed
68 69 70 71
DATA_LICENSES=$(DATA)/LGPLLR.pdf $(DATA)/LGPLLR.tex $(DATA)/LGPLLR.html
LICENSES=$(SOFT_LICENSE) $(DATA_LICENSE)

ML_COPYRIGHT=ML/COPYRIGHT
72
LEGAL=$(ML_COPYRIGHT) $(LICENSES)
huet's avatar
huet committed
73 74 75 76 77 78 79 80 81 82 83 84 85

CONFIGS=SETUP/CONFIGS SETUP/config_help.txt

# System installation
SYSTEM_SETUP=SETUP/version.txt SETUP/MMakefile SETUP/INSTALL $(CONFIGS) \
SETUP/issudo.sh SETUP/counter.py SETUP/zen.tar
SYSTEM_configure=configure
# currently disabled
SYSTEM_supplements=SETUP/TEX SETUP/wwwcount2.5.tar.gz

# General information
INFOS=README INSTALLATION

Gérard Huet's avatar
Gérard Huet committed
86 87
INRIA_IMAGES=IMAGES/icon_ocaml.png IMAGES/JoeCaml.png \
IMAGES/logo_inria.png # Copyright Inria
huet's avatar
huet committed
88 89 90 91 92 93 94 95 96 97 98 99
# W3C_IMAGES=IMAGES/valid-xhtml10.png # Copy W3C - obsolete
GH_IMAGES=IMAGES/smallyantra.gif IMAGES/Yantra.jpg IMAGES/favicon.ico \
IMAGES/apple-touch-icon-ipad-76x76.png \
IMAGES/apple-touch-icon-ipad-retina-152x152.png \
IMAGES/apple-touch-icon-iphone-60x60.png \
IMAGES/apple-touch-icon-iphone-retina-120x120.png # Copy GH
DOC_IMAGES=IMAGES/lexer10.jpg IMAGES/lexer17.jpg IMAGES/lexer40.jpg # Copy GH
# These gif images are various simplifications of the lexer automaton
# They were compiled by GraphViz from DOC/lexer10.dot lexer17.dot lexer40.dot
# NB. Use of gif vs others formats such as jpg is due to browser compatibility

# Scripts
100
SCRIPTS=JAVASCRIPT/utf82VH.js JAVASCRIPT/dragtable.js JAVASCRIPT/util.js
huet's avatar
huet committed
101

102
# Next are copyright specific images
huet's avatar
huet committed
103
SITE_IMAGES=IMAGES/yinyang.gif IMAGES/panini.jpg IMAGES/spin-new.gif \
104 105 106
IMAGES/arrw01_06a.gif IMAGES/arrw01_16a.gif
TOP_IMAGES=IMAGES/sanskrit.gif IMAGES/borderl.jpg IMAGES/borderr.jpg
BACK_IMAGES=IMAGES/om.jpg IMAGES/om1.jpg IMAGES/om2.jpg IMAGES/om3.jpg IMAGES/om4.jpg
huet's avatar
huet committed
107 108 109 110 111 112
MISC_IMAGES=IMAGES/ganesh.gif IMAGES/ganesh.jpg IMAGES/jagannath.jpg \
IMAGES/hare.jpg IMAGES/ganeshgannath.jpg IMAGES/krishnagannath.jpg \
IMAGES/jagannath2.jpg IMAGES/sarasvati.jpg IMAGES/Panini2.jpg \
IMAGES/jaganyantra.png IMAGES/geopattern.gif IMAGES/vajra.jpg \
IMAGES/kaadambarii.png IMAGES/vajra.png

113
# Distributed images for mirror Web site
huet's avatar
huet committed
114 115 116 117 118 119 120 121 122
#IMAGES= # no image in distribution
IMAGES=$(INRIA_IMAGES) $(GH_IMAGES) $(SITE_IMAGES) $(TOP_IMAGES) \
$(BACK_IMAGES) $(DOC_IMAGES) $(MISC_IMAGES)

# Fonts for diacritics and devanagari - OBSOLETE
# diacritics: tim-iu.zip 'IndUni' font courtesy John Smith, Cambridge
# devanagari: it99otf.zip 'Sanskrit 99' font courtesy Ulrich Stiehl, Heidelberg
# FONTS=FONTS/tim-iu.zip FONTS/it99otf.zip

123
# Lexical databases
huet's avatar
huet committed
124 125 126 127 128 129 130 131 132 133 134 135 136
DIC_PDF=Heritage.pdf
DIC_HTML=Heritage.html #in 1 page! (used for Goldendict format translation)

############### Distribution Parameterization End #########################

####################### Customization Begin ###############################

# Installation parameters - Customize by ./configure in main dir
# according to the config file in SETUP dir
PLATFORM=#PLATFORM# Computer or Station -- no blank character in such strings
# PLATFORM=Simputer# Amida Simputer handheld device - historical

TRANSLIT=#TRANSLIT# Transliteration scheme VH, KH or WX
137
LEXICON=#LEXICON# Lexicon toggle default
huet's avatar
huet committed
138 139 140
DISPLAY=#DISPLAY# Default display font deva or roma

# Main directory, where the sanskrit tools are installed
141
SKTINSTALLDIR=#SKTINSTALLDIR# To be set at configuration time
huet's avatar
huet committed
142 143 144 145

# Host name of the server - used only for installation message below
SERVERHOST=#SERVERHOST
# SERVERHOST=sanskrit.inria.fr# quincy sanskrit [official site]
146
# SERVERHOST=pauillac.inria.fr# pauillac
huet's avatar
huet committed
147
# SERVERHOST=213.41.153.152# dhruva gerardh.net1.nerim.net [legacy]
148 149 150

# For remote invocation of cgi services (eg Sanskrit Library)
REMOTESERVERHOST=http://sanskrit.inria.fr/# remote host Inria
huet's avatar
huet committed
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

# The SKT public http directory on the server
SERVERPUBLICDIR=#SERVERPUBLICDIR
# SERVERPUBLICDIR=/Users/huet/Sites/SKT/# amrita
# SERVERPUBLICDIR=/var/www/html/sanskrit/# quincy/sanskrit

# Its local URL on the server
SKTDIRURL=#SKTDIRURL

# URL where to look for cgis
CGIBINURL=#CGIBINURL
# CGIBINURL=/cgi-bin/# amrita sanskrit

# The httpd server executables directory
CGIDIR=#CGIDIR
# CGIDIR=/Library/WebServer/CGI-Executables/# amrita [Mac OSX]
# CGIDIR=/home/httpd/cgi-bin/# pushpak [WindowsNT]
# CGIDIR=/var/www/cgi-bin/# dhruva [Linux Redhat]
# CGIDIR=/var/www/cgi-bin/SKT/# sanskrit [Linux Ubuntu]

# Extension suffix of cgis
CGIEXT=#CGIEXT
# CGIEXT=# amrita sanskrit

# cgi name under which the lexicon index is installed on the server
CGIINDEX=sktindex$(CGIEXT)
# cgi name under which the search facility is installed on the server
CGIINDEXD=sktsearch$(CGIEXT)
# cgi name under which the declension engine is installed on the server
CGIDECL=sktdeclin$(CGIEXT)
# cgi name under which the conjugation engine is installed on the server
CGICONJ=sktconjug$(CGIEXT)
# cgi name under which the sanskrit lemmatizer is installed on the server
CGILEMMA=sktlemmatizer$(CGIEXT)
# cgi name under which the sanskrit reader is installed on the server
CGIREADER=sktreader$(CGIEXT)
# cgi name under which the sanskrit parser is installed on the server
CGIPARSER=sktparser$(CGIEXT)
# cgi name reserved for sanskrit tagger (* unused in current version *)
190
CGITAGGER=skttagger$(CGIEXT)
huet's avatar
huet committed
191 192 193 194 195 196
# cgi name under which the sanskrit sandhi segmenter is installed on the server
CGISANDHI=sktsandhier$(CGIEXT)
# cgi name under which the sanskrit tagging summarizer is installed on the server
CGIGRAPH=sktgraph$(CGIEXT)
# cgi name under which the user aid for unknown chunks is installed on the server
CGIUSER=sktuser$(CGIEXT)
197
# CGI name under which the corpus manager is installed on the server.
198
CGIMANAGER = sktcorpus$(CGIEXT)
Idir Lankri's avatar
Idir Lankri committed
199 200
# CGI name under which the program that enriches the corpus is installed
# on the server.
Idir Lankri's avatar
Idir Lankri committed
201
CGISAVECORPUS = savecorpus$(CGIEXT)
202 203 204
# CGI name under which the program that creates a corpus subdirectory is
# installed on the server.
CGIMKDIRCORPUS = mkdircorpus$(CGIEXT)
205

huet's avatar
huet committed
206 207 208 209 210 211 212 213 214
# what mouse action to use for viewing lemmatization
MOUSEACTION=#MOUSEACTION
# MOUSEACTION='CLICK'#amrita

# The web server home page (reserved for server administrator)
# SERVERPAGE=/Library/WebServer/Documents/index.html.fr # amrita [Mac OSX]
# SERVERPAGE=/var/www/html/sanskrit/index.html # quincy [Linux, virtual server]
# SERVERPAGE=/var/www/html/index.html # dhruva [Linux, direct server]

215
# Customisation of SCL platform interface - under rehaul
huet's avatar
huet committed
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
SCLURL=#SCLURL
SCLINSTALLDIR=#SCLINSTALLDIR
OUTPUTFONT=#OUTPUTFONT
TEMPAREA=#TEMPAREA

#################### Customization End ######################################

##########
# Macros #
##########

# System sources packages

# CORE is needed by all other packages - as well as the ZEN library
# GRAM is needed to generate the Sanskrit Heritage Engine
231
# WEB is needed to create the web pages and cgi-bin executables
huet's avatar
huet committed
232

233
# Les packages de modules - Tous dans la bibliothèque ML
huet's avatar
huet committed
234 235 236
# Linked to the ZEN library (generic Ocaml computational linguistic library)

# UTIL utilities for ML folder
237
UTIL=ML/Makefile $(ML_COPYRIGHT) ML/.ocamlinit ML/.depend
huet's avatar
huet committed
238 239 240 241

# CORE package - utilities, transducers, sanskrit and french lexers, dico spec
DISTR_CORE=ML/control.ml ML/dico.mli ML/version.ml ML/date.ml ML/install.ml \
ML/canon.ml ML/transduction.ml ML/encode.ml ML/order.ml ML/padapatha \
242 243
ML/sanskrit.mli ML/sanskrit.ml ML/french.mli ML/french.ml ML/skt_lexer.ml \
ML/dir.mli ML/dir.ml
244
CORE=$(DISTR_CORE) ML/paths.ml
huet's avatar
huet committed
245 246 247 248 249 250 251 252 253

# GRAM package - phonetics, morphology, segmentation and tagging engines
GRAM=ML/index.ml ML/phonetics.ml ML/int_sandhi.ml ML/morphology.mli \
ML/naming.ml ML/inflected.mli ML/inflected.ml ML/sandhi.ml ML/sandhicheck.ml \
ML/sandhier.ml ML/pada.ml ML/nouns.mli ML/nouns.ml ML/conj_infos.mli \
ML/verbs.mli ML/verbs.ml ML/parts.ml ML/morpho.ml ML/declension.ml \
ML/conjugation.ml ML/indexer.ml ML/indexerd.ml ML/phases.ml ML/lemmatizer.ml \
ML/auto.mli ML/load_transducers.ml ML/dispatcher.mli ML/dispatcher.ml \
ML/morpho_string.ml ML/segmenter.ml ML/load_morphs.ml ML/lexer.mli ML/lexer.ml \
254
ML/rank.ml ML/scl_parser.ml ML/reader.ml ML/parser.ml ML/constraints.mli \
huet's avatar
huet committed
255
ML/constraints.ml ML/multilingual.ml ML/paraphrase.mli ML/paraphrase.ml \
256
ML/bank_lexer.ml ML/regression.ml ML/checkpoints.ml \
huet's avatar
huet committed
257
ML/graph_segmenter.ml ML/interface.mli ML/interface.ml ML/user_aid.ml \
258
ML/reset_caches.ml ML/params.mli ML/params.ml ML/interface_cgi.ml
huet's avatar
huet committed
259 260 261 262

# WEB package - HTML, HTTP, CGI ad-hoc utilities for Web interface
WEB=ML/html.ml ML/web.ml ML/css.ml ML/cgi.ml ML/morpho_html.ml ML/chapters.ml \
ML/mk_index_page.ml ML/mk_grammar_page.ml ML/mk_reader_page.ml \
263 264
ML/mk_sandhi_page.ml ML/mk_corpus_page.ml ML/morpho_scl.ml \
ML/compute_mw_links.ml
huet's avatar
huet committed
265 266 267

# TREE package - tree bank manager and syntax analyser - deprecated
TREE=ML/stemmer.ml ML/parse_tree.ml ML/parse_apte.ml ML/tag_tree.ml \
268
ML/tag_apte.ml
huet's avatar
huet committed
269

270
# CORPUS package - corpus manager
271 272 273 274
CORPUS = ML/corpus.mli ML/corpus.ml ML/web_corpus.mli ML/web_corpus.ml	\
	ML/corpus_manager.mli ML/corpus_manager.ml			\
	ML/corpus_manager_cgi.ml ML/save_corpus_cgi.ml			\
	ML/mkdir_corpus_cgi.ml ML/mk_corpus.ml
275

276
DEBUG= ML/morpho_debug.ml ML/debug.ml
huet's avatar
huet committed
277

278
# Historical versions of the segmenter, tagger and reader with single phase
huet's avatar
huet committed
279 280 281 282 283
OBSOLETE_ML=ML/segmenter1.ml ML/tagger1.ml ML/reader1.ml ML/tagger.ml \
ML/nyaaya.ml ML/mk_nyaaya_page.ml \
ML/patch_auto.ml # awful hack for patching automata structures - now unused

# Modules of all software packages are in library ML (besides the ZEN library)
284
ML=$(UTIL) $(CORE) $(GRAM) $(WEB) $(TREE) $(LEGAL) $(CORPUS)
huet's avatar
huet committed
285 286 287 288 289 290 291 292

# Directory STAT contains a few log and regression files like regression_template
# Also files mw_exc.txt and mw_index_txt_file.txt for Monier-Williams alignment
STAT=STAT

# dynamic statistics such as current regression file
VAR=VAR

293 294
# System documentation
DOC=DOC/doc.ps DOC/doc.html DOC/doc.pdf
huet's avatar
huet committed
295 296 297 298 299 300
# documentation source # needs ocamlweb and hevea to create documentation
DOCSOURCE=DOC/docintro DOC/ocamlweb.sty DOC/lexer10.dot DOC/lexer17.dot DOC/lexer40.dot
# Site entry page and XML entry page
SITESOURCE=SITE/site_entry_page SITE/xml_entry_page SITE/goldendict_entry_page
SITEPAGE_FR=SITE/index.fr.html
SITEPAGE_EN=SITE/index.en.html
301
SITEPAGES=$(SITEPAGE_FR) $(SITEPAGE_EN)
huet's avatar
huet committed
302 303
PORTALPAGE_FR=SITE/portal.fr.html
PORTALPAGE_EN=SITE/portal.en.html
304
PORTALPAGES=$(PORTALPAGE_FR) $(PORTALPAGE_EN)
huet's avatar
huet committed
305 306
FAQPAGE_FR=SITE/faq.fr.html
FAQPAGE_EN=SITE/faq.en.html
307
FAQPAGES=$(FAQPAGE_FR) $(FAQPAGE_EN)
huet's avatar
huet committed
308
MANUAL=SITE/manual.html
Gérard Huet's avatar
Gérard Huet committed
309 310 311
XMLPAGE=SITE/xml.html
FAQ=SITE/faq.html
PORTAL=SITE/portal.html
huet's avatar
huet committed
312
GOLD=SITE/gold.html
Gérard Huet's avatar
Gérard Huet committed
313 314 315
GOLDEN=SITE/goldendict.html
ABREVS=SITE/abrevs.pdf
ROBOTS=SITE/robots.txt # currently disabled to allow Google access
huet's avatar
huet committed
316

317 318 319
# Goldendict data banks are now distributed from sanskrit.inria.fr
#GOLDENDICT=SITE/Heritage_du_sanskrit_san-fra.tar.gz SITE/Declension-heritage_du_sanskrit_san-eng.tar.gz SITE/Grammar-heritage_du_sanskrit_san-eng.tar.gz SITE/mw-heritage_du_sanskrit_san-eng.tar.gz

320
WEBSOURCES=$(PORTAL) $(FAQ) $(ABREVS) $(GOLD) $(GOLDEN) $(MANUAL) $(XMLPAGE)
321
ALLWEBSOURCES=$(SITESOURCE) $(WEBSOURCES)
huet's avatar
huet committed
322 323 324 325 326 327
# Sources of morphology documents
XMLDATA=$(DATA)/XML
DATASOURCE=$(DATA)/titn.tex $(DATA)/titpn.tex $(DATA)/titr.tex $(DATA)/titp.tex \
$(DATA)/tita.tex $(DATA)/titb.tex $(DATA)/titf.tex $(DATA)/titi.tex \
$(DATA)/titv.tex $(DATA)/tity.tex $(DATA)/titc.tex \
$(XMLDATA)/SL_morph.dtd $(XMLDATA)/WX_morph.dtd \
328 329 330
$(DATA_LICENSES) $(DATA)/Makefile
# All data sources
SOURCE=$(DOCSOURCE) $(DATASOURCE) $(ALLWEBSOURCES)
huet's avatar
huet committed
331

332 333
# Miscellaneous documentation
OBSOLETE_DOCS=DOC/sanskrit.pdf
huet's avatar
huet committed
334
DOCS=DOC/sanskrit.pdf DOC/wsc.pdf DOC/tagger.pdf DOC/wcre.pdf DOC/coling.pdf \
335
DOC/Mumbai.pdf DOC/Brown.pdf DOC/IWRIDL.pdf DOC/COLING_2012.pdf DOC/WSC13.pdf
huet's avatar
huet committed
336
DOC_ML=DOC/Heritage_Platform.pdf
337
# Automata databases for use by the Sanskrit Engine
huet's avatar
huet committed
338 339 340 341 342 343

AUTOMATA=$(DATA)/nouns.rem $(DATA)/roots.rem $(DATA)/preverbs.rem \
$(DATA)/lopas.rem $(DATA)/pronouns.rem $(DATA)/transpn.rem $(DATA)/parts.rem \
$(DATA)/lopaks.rem $(DATA)/indecls.rem $(DATA)/abstvaa.rem $(DATA)/absya.rem \
$(DATA)/iics.rem $(DATA)/piics.rem $(DATA)/ifcs.rem $(DATA)/iivs.rem \
$(DATA)/iifcs.rem $(DATA)/auxi.rem $(DATA)/voca.rem $(DATA)/invs.rem \
344 345 346
$(DATA)/inftu.rem $(DATA)/kama.rem $(DATA)/nouns2.rem $(DATA)/iics2.rem \
$(DATA)/avyayais.rem $(DATA)/avyayafs.rem $(DATA)/ifcs2.rem $(DATA)/sandhis.rem \
$(DATA)/sandhis_pv.rem $(DATA)/sandhis_ph.rem $(DATA)/peris.rem \
huet's avatar
huet committed
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
$(DATA)/transperi.rem $(DATA)/transn.rem $(DATA)/transr.rem \
$(DATA)/transiiy.rem $(DATA)/transavy.rem $(DATA)/transp.rem \
$(DATA)/transpa.rem $(DATA)/transic.rem $(DATA)/sfxs.rem $(DATA)/isfxs.rem \
$(DATA)/transsfx.rem $(DATA)/transisfx.rem $(DATA)/transif.rem \
$(DATA)/transpic.rem $(DATA)/transiif.rem $(DATA)/transabsya.rem \
$(DATA)/transabstvaa.rem $(DATA)/transiv.rem $(DATA)/transinde.rem \
$(DATA)/partvocs.rem $(DATA)/transpav.rem $(DATA)/translopak.rem \
$(DATA)/transauxi.rem $(DATA)/transvoca.rem $(DATA)/translopa.rem \
$(DATA)/transn2.rem $(DATA)/transif2.rem $(DATA)/transic2.rem \
$(DATA)/auxik.rem $(DATA)/auxiick.rem $(DATA)/transauxik.rem \
$(DATA)/transauxiick.rem $(DATA)/transinv.rem \
$(DATA)/transinftu.rem $(DATA)/transkama.rem \
$(DATA)/roots_infos.rem $(DATA)/roots_usage.rem \
$(DATA)/sandhis_id.rem $(DATA)/unique_kridantas.rem $(DATA)/lexical_kridantas.rem

# roots_infos.rem is used at run time for generating abs and ger of verbs
363
# roots_usage.rem is used at run time by Dispatcher.validate
huet's avatar
huet committed
364 365
# sandhis_id.rem is used at run time by Segmenter
# lexical_kridantas.rem is used at run time by the loading of inflected.cmx
366
# by cgis declension and conjugation
huet's avatar
huet committed
367

368 369
# Persistent Ocaml values files stored in DICO dir for indexing purposes
DICOREMS=entries.rem defs.rem dummies.rem
huet's avatar
huet committed
370 371 372 373 374 375 376 377
# data files for MW linking
DATAMW=$(DATA)/mw_exceptions.rem $(DATA)/mw_index.rem $(DATA)/guess_index.rem

# cache related files in $(SERVERPUBLICDIR)$(DATA)
CACHES=cache.txt cache.rem minica.rem transca.rem

# Linguistic resources: Sanskrit morphology documents

378 379 380
PDF_MORPHOLOGY=$(DATA)/nouns.pdf $(DATA)/roots.pdf $(DATA)/parts.pdf \
$(DATA)/indecls.pdf $(DATA)/final.pdf # enormous, useless

huet's avatar
huet committed
381 382 383 384 385
SL_XML_MORPHOLOGY=$(XMLDATA)/SL_morph.tar.gz
WX_XML_MORPHOLOGY=$(XMLDATA)/WX_morph.tar.gz
XML_DTD=$(XMLDATA)/SL_morph.dtd $(XMLDATA)/WX_morph.dtd
XML_MORPHOLOGY=$(SL_XML_MORPHOLOGY) $(WX_XML_MORPHOLOGY) $(XML_DTD)

386
# Various test examples
huet's avatar
huet committed
387 388 389 390 391 392 393
# CORPUS=CORPUS/APTE CORPUS/Baladarza CORPUS/NN CORPUS/S_Raama CORPUS/REGRESSION

###########
# Scripts #
###########

# Sanskrit Heritage Platform site construction; release with "make release"
394
all: ZEN
395
	test -e $(DATA) && echo "Heritage_Resources detected" && exit 0 \
396
|| echo "You should first install Heritage_Resources at $(DATA)" && exit 1
huet's avatar
huet committed
397
	cd ZEN && $(MAKE) all
398
	cp -Rp $(HERITAGE) . # local copy of DICO from Resources/DICO
huet's avatar
huet committed
399
	cp -Rp $(MW) . # local copy of MW
huet's avatar
huet committed
400
#	cd ML && $(MAKE) depend # reset dependencies (might be partial subset)
401
	test -e ML/SCLpaths.ml && echo "SCL config detected" \
402
|| cp SETUP/dummy_SCLpaths.ml ML/SCLpaths.ml
403 404 405
	cd ML && $(MAKE) test_version
	ML/test_stamp
	cd ML && $(MAKE) # make engine (testing the data stamp)
huet's avatar
huet committed
406 407 408 409 410 411 412
	$(MAKE) web_services # then all Web services

# When master Makefile SETUP/MMakefile has been changed, do manually:
new:
	./configure
	$(MAKE) all

413
# After updating installation parameters above, the python script configure
414
# regenerates Makefile from SETUP/MMakefile and executes "make configuration"
415
configuration:
huet's avatar
huet committed
416 417 418 419 420 421 422 423
	(cat $(ML_COPYRIGHT) ; \
echo "(* Do not edit by hand - generated by configuration script - see main Makefile *)"; \
echo 'value platform = "$(PLATFORM)"'; \
echo 'and default_transliteration = "$(TRANSLIT)"'; \
echo 'and default_lexicon = "$(LEXICON)"'; \
echo 'and default_display_font = "$(DISPLAY)"'; \
echo 'and skt_install_dir = "$(SKTINSTALLDIR)"'; \
echo 'and skt_resources_dir = "$(SKTRESOURCES)"'; \
424
echo 'and skt_corpus_dir = "$(SKTCORPUS)"'; \
huet's avatar
huet committed
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
echo 'and public_skt_dir = "$(SERVERPUBLICDIR)"'; \
echo 'and skt_dir_url = "$(SKTDIRURL)"'; \
echo 'and server_host = "$(SERVERHOST)"'; \
echo 'and remote_server_host = "$(REMOTESERVERHOST)"'; \
echo 'and cgi_dir_url = "$(CGIBINURL)"'; \
echo 'and cgi_index = "$(CGIINDEX)"'; \
echo 'and cgi_indexd = "$(CGIINDEXD)"'; \
echo 'and cgi_lemmatizer = "$(CGILEMMA)"'; \
echo 'and cgi_reader = "$(CGIREADER)"'; \
echo 'and cgi_parser = "$(CGIPARSER)"'; \
echo 'and cgi_tagger = "$(CGITAGGER)"'; \
echo 'and cgi_decl = "$(CGIDECL)"'; \
echo 'and cgi_conj = "$(CGICONJ)"'; \
echo 'and cgi_sandhier = "$(CGISANDHI)"'; \
echo 'and cgi_graph = "$(CGIGRAPH)"'; \
echo 'and cgi_user_aid = "$(CGIUSER)"'; \
441
echo 'and cgi_corpus_manager = "$(CGIMANAGER)"'; \
Idir Lankri's avatar
Idir Lankri committed
442
echo 'and cgi_save_corpus = "$(CGISAVECORPUS)"'; \
443
echo 'and cgi_mkdir_corpus = "$(CGIMKDIRCORPUS)"'; \
444
echo 'and mouse_action = "$(MOUSEACTION)";') > ML/paths.ml
huet's avatar
huet committed
445 446 447 448 449 450 451 452 453 454 455 456
	$(MAKE) version

version:
	(cat $(ML_COPYRIGHT); \
echo "(* Generated by make version - see main Makefile *)"; \
echo "value version=\"$(VERSION)\" and version_date=\"$(DATE)\";") > ML/version.ml

full: ZEN
	cd ML && $(MAKE) clean && $(MAKE) depend && $(MAKE) all
	$(MAKE) all
	$(MAKE) supplements

457
supplements:
huet's avatar
huet committed
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475
	cd $(DATA) && $(MAKE) statistics
	cd $(DATA) && $(MAKE) pdf
	cd $(XMLDATA) && $(MAKE) xml
	cd ML && $(MAKE) doc # requires installing ocamlweb

index.html: mk_index_page
	ML/mk_index_page

reader.html: mk_reader_page
	ML/mk_reader_page -en
	ML/mk_reader_page -fr

grammar.html: mk_grammar_page
	ML/mk_grammar_page

sandhi.html: mk_sandhi_page
	ML/mk_sandhi_page

476 477 478
corpus.html: mk_corpus_page
	ML/mk_corpus_page

huet's avatar
huet committed
479 480 481 482 483
style.css: css
	ML/css

Makefile: SETUP/MMakefile
	./configure
484

huet's avatar
huet committed
485
## Following entry points make partial update/installation on the local server
486
## they need su privilege for writing in the server area
huet's avatar
huet committed
487 488 489 490

# beware - make web_services on server architecture after DICO before releasecgi
# necessary if mk_*_page.ml has been updated
web_services: # Will write localized site pages in DICO and export cgis
491
	cd ML && $(MAKE) cgis site_pages
Gérard Huet's avatar
Gérard Huet committed
492
	cp -p SITE/xml.html DICO
huet's avatar
huet committed
493

494
release: $(DICO) web_services releasecgi releaseMW releasedata releasedoc \
Gérard Huet's avatar
Gérard Huet committed
495 496
releasebook
# releasexml - no XML release on server - lookup Heritage_Resources
497
# releasepdf disabled at present as bulky and un-finished
huet's avatar
huet committed
498 499 500 501 502
	echo "Version $(VERSION) of Sanskrit site released on $(SERVERHOST)"


# if one does not rebuild morphologic resources with make scratch, this will
# just release the new software on the old data - convenient for debug/test.
503 504
releasecgi:
	mkdir -p $(CGIDIR)
huet's avatar
huet committed
505 506 507 508 509
	$(MAKE) grammar
	$(MAKE) indexers
	$(MAKE) stemmer
	$(MAKE) analyser
	$(MAKE) sandhi
510 511
	$(MAKE) corpus_manager
	$(MAKE) save_corpus
512
	$(MAKE) mkdir_corpus
huet's avatar
huet committed
513 514 515 516

abrevs:
	cp $(BOOK)/abrevs.pdf SITE # for documenting the Website with abbreviations

517
# This releases on the server the new lexical data base and Web resources
huet's avatar
huet committed
518
# must be done after releaseMW for links adjustments
519
releasedata: abrevs
huet's avatar
huet committed
520 521
	cp $(WEBSOURCES) $(SERVERPUBLICDIR)
	cp $(SITEPAGES) $(SERVERPUBLICDIR) # site main pages made by configure
522
#	cp $(GOLDENDICT) $(SERVERPUBLICDIR) # Goldendict version now separated
523 524 525 526 527
	if [ "$(LEXICON)" = "SH" ]; then			\
		cp $(SITEPAGE_FR) $(SERVERPUBLICDIR)index.html;	\
	else							\
		cp $(SITEPAGE_EN) $(SERVERPUBLICDIR)index.html;	\
	fi # default language from lexicon parameter
huet's avatar
huet committed
528
	cp -R $(DICO) $(SERVERPUBLICDIR) # hypertext Heritage dictionary
529
	if [ $(SKTCORPUS) ]; then			\
530 531 532 533
		mkdir -p $(SERVERCORPUS);		\
		cp -R $(SKTCORPUS)* $(SERVERCORPUS);	\
		chown -R $(APACHE_USER):$(APACHE_GROUP)	\
			$(SERVERCORPUS);		\
534
	fi			# Sanskrit corpus
huet's avatar
huet committed
535 536 537 538 539 540 541 542 543 544 545 546 547
# so that cgis invocations in DICO pages are relocated consistently with config:
	cd $(SERVERPUBLICDIR) && for i in `ls DICO/*.html`; do (\
sed '1,$$s|!CGIDECL|$(CGIBINURL)$(CGIDECL)|g' < $$i >temp; \
sed '1,$$s|!CGICONJ|$(CGIBINURL)$(CGICONJ)|g' < temp >$$i; \
rm temp ); done
# more relocation for MW, waiting for better solution
	cd $(SERVERPUBLICDIR) && for i in `ls MW/*.html`; do (\
sed '1,$$s|!CGIDECL|$(CGIBINURL)$(CGIDECL)|g' < $$i >temp; \
sed '1,$$s|!CGICONJ|$(CGIBINURL)$(CGICONJ)|g' < temp >$$i; \
rm temp ); done
	cp $(AUTOMATA) $(SERVERPUBLICDIR)DATA # Sanskrit Engine data
	cp $(DATAMW) $(SERVERPUBLICDIR)DATA # MW links
	cp $(SCRIPTS) $(SERVERPUBLICDIR)DICO # Javascript in DICO dir
548
#	cp $(DOC_IMAGES) $(SERVERPUBLICDIR)IMAGES
huet's avatar
huet committed
549 550 551

BOOKPRINTS=$(BOOK)/Heritage.pdf $(BOOK)/abrevs.pdf

552
releasebook:
553 554 555
	cp $(BOOKPRINTS) $(SERVERPUBLICDIR)

releasexml: # Sanskrit morphology in xml copied from Resources to Server
556
# This should be deprecated soon, and XML banks released separately 
557 558 559 560 561 562
	mkdir -p $(SERVERPUBLICDIR)$(DATA)/XML
	cp $(XML_MORPHOLOGY) $(SERVERPUBLICDIR)$(DATA)/XML

releasepdf: pdfmorphology # very big - useless
	cp $(PDF_MORPHOLOGY) $(SERVERPUBLICDIR)$(DATA)

563
releaseMW:
huet's avatar
huet committed
564 565
	cp -Rp $(MW) $(SERVERPUBLICDIR) # MW pages linked to decl/conjug cgis

566
releasedoc:
huet's avatar
huet committed
567 568 569 570
	cp $(PORTALPAGES) $(SERVERPUBLICDIR) # portal pages made by configure
	cp $(PORTALPAGE_FR) $(SERVERPUBLICDIR)portal.html # compatibility default
	cp $(FAQPAGES) $(SERVERPUBLICDIR) # faq pages made by configure
	cp $(FAQPAGE_FR) $(SERVERPUBLICDIR)faq.html # compatibility default fr
571
	cp $(MANUAL) $(SERVERPUBLICDIR) # user's manual
huet's avatar
huet committed
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586
#	cp $(ROBOTS) $(SERVERPUBLICDIR) # robots permissions
	cp $(GOLD) $(SERVERPUBLICDIR) # Heritage's Hall of Fame
	cp $(DOC_ML) $(SERVERPUBLICDIR)DOC
	cp -p DOC/transliterations.pdf $(SERVERPUBLICDIR)DOC

grammar: ML/declension ML/conjugation
	cp ML/declension $(CGIDIR)$(CGIDECL)
	cp ML/conjugation $(CGIDIR)$(CGICONJ)

stemmer: ML/lemmatizer
	cp ML/lemmatizer $(CGIDIR)$(CGILEMMA)

sandhi: ML/sandhier
	cp ML/sandhier $(CGIDIR)$(CGISANDHI)

587 588 589 590 591 592 593 594
analyser: ML/reader ML/parser ML/interface ML/user_aid
#	cp ML/reader1cgi $(CGIDIR)$(CGIREADER)
	cp ML/reader $(CGIDIR)$(CGIREADER)
	cp ML/parser $(CGIDIR)$(CGIPARSER)
	cp ML/interface $(CGIDIR)$(CGIGRAPH)
	cp ML/user_aid $(CGIDIR)$(CGIUSER)
	cp ML/mk_reader_page $(CGIDIR)skt_heritage # $(CGIINTERFACE)
#	cp ML/tagger $(CGIDIR)$(CGITAGGER)
huet's avatar
huet committed
595 596 597 598 599

indexers: ML/indexer ML/indexerd
	cp ML/indexer $(CGIDIR)$(CGIINDEX)
	cp ML/indexerd $(CGIDIR)$(CGIINDEXD)

600 601
.PHONY: corpus_manager
corpus_manager: ML/corpus_manager
602 603
	cp $< $(CGIDIR)$(CGIMANAGER)

604 605
.PHONY: save_corpus
save_corpus: ML/save_corpus
Idir Lankri's avatar
Idir Lankri committed
606
	cp $< $(CGIDIR)$(CGISAVECORPUS)
Idir Lankri's avatar
Idir Lankri committed
607

608 609 610 611
.PHONY: mkdir_corpus
mkdir_corpus: ML/mkdir_corpus
	cp $< $(CGIDIR)$(CGIMKDIRCORPUS)

612 613
#### Version Management and Distribution are now managed by Git ####

huet's avatar
huet committed
614
##############################
615
####  Version Management  #### Obsolete
huet's avatar
huet committed
616 617
##############################

618
# For release of Heritage_Platform, make distrib_platform
huet's avatar
huet committed
619 620 621 622

# next operations to perform on http server platform for site update
platform_unload: SktPlatform.$(VERSION).tar.gz
	gunzip SktPlatform.$(VERSION).tar.gz
623
	tar xvf SktPlatform.$(VERSION).tar
huet's avatar
huet committed
624

625
software_doc: # needs to have ocamlweb installed
huet's avatar
huet committed
626 627 628
	cd ML && $(MAKE) doc

########################
629
####  Distribution  #### Obsolete
huet's avatar
huet committed
630 631 632 633
########################

# customise LICENSEs above before distributing
# Directory DISTR should not exist for next 4 scripts
634 635
# Note cp -p used instead of tar for incrementality
distr_engine:  # distribution of packages CORE GRAM abd WEB under SOFT_LICENSE
huet's avatar
huet committed
636
	rm -rf DISTR
637
	cd $(STAT); cat stats.txt >> distribs # recording of statistics
huet's avatar
huet committed
638 639 640
	mkdir DISTR                # Distribution directory
	mkdir DISTR/ML             # Source code library for all packages
	mkdir DISTR/SETUP          # SETUP directory
Gérard Huet's avatar
Gérard Huet committed
641
	mkdir DISTR/JAVASCRIPT     # JAVASCRIPT scripts directory
huet's avatar
huet committed
642 643 644 645
	cp -p $(UTIL) DISTR/ML     # Skt script utilities
	cp -p $(DISTR_CORE) DISTR/ML     # Skt Core Engine ML source code
	cp -p $(GRAM) DISTR/ML     # Skt Grammatical Engine ML source code
	cp -p $(WEB) DISTR/ML      # Skt Site Manager ML source code
646
	cp -p $(AUT) DISTR/ML      # Skt Automaton production source code
Gérard Huet's avatar
Gérard Huet committed
647
	cp -p $(SCRIPTS) DISTR/JAVASCRIPT # Scripts
648
	cp -Rp $(SYSTEM_SETUP) DISTR/SETUP  # SETUP
huet's avatar
huet committed
649
	cp -p $(SYSTEM_configure) DISTR # configure at top level
650
#	cp -Rp $(SYSTEM_supplements) DISTR/SETUP  # supplements
huet's avatar
huet committed
651 652
	cp -p $(INFOS) DISTR # installation instructions, scripts
	cp -p $(SOFT_LICENSE) DISTR/ML/LICENSE # customised software license
653
	mkdir DISTR/SITE           # For Skt Platform portal
huet's avatar
huet committed
654 655 656 657 658 659 660 661 662 663 664 665
	cp -p $(WEBSOURCES) DISTR/SITE       # Skt site entry page
#	cp -p $(ZENSITESOURCE) DISTR/SITE/ZEN  # Zen site entry page
	cp -p $(SITESOURCE) DISTR/SITE
#	cp -p $(GOLDENDICT) DISTR/SITE # enormous - separately distributed
	mkdir DISTR/IMAGES         # For Web site images
	cp -Rp $(IMAGES) DISTR/IMAGES # Web site images
	cp -Rp MW DISTR            # Hypertext Monier Williams with grammar links
#	mkdir DISTR/FONTS          # Fonts mirroring
#	cp -p $(FONTS) DISTR/FONTS # Fonts

distr_automata: # distribution of data derived from Heritage Dictionary
	$(MAKE) distr_engine
666
	mkdir -p DISTR/$(DATA)            # Linguistic data and derived automata
huet's avatar
huet committed
667
	mkdir -p DISTR/$(DATA)/XML        # Linguistic data in XML - empty now
668
	cp -p $(DATA)/XML/*.gz $(DATA)/XML/index.html DISTR/$(DATA)/XML
huet's avatar
huet committed
669 670
	cp -p $(DATA_LICENSE) DISTR/$(DATA_LICENSE) # customised data license
	cp -p $(XMLDATA)/SL_morph.dtd $(XMLDATA)/WX_morph.dtd DISTR/$(DATA)/XML
671
	cp -p $(AUTOMATA) DISTR/$(DATA)   # Data for Skt_Platform cgi executables
huet's avatar
huet committed
672 673 674 675 676 677
	cp -p $(DATAMW) DISTR/$(DATA) # MW alignment
#	touch DISTR/automata   # for make automata to succeed vacuously

distrib: # distribution of ZEN, and of derived Heritage under HTML & PDF formats
	$(MAKE) distr_automata
	cp -p SETUP/zen.tar DISTR/SETUP # Zen toolkit distribution included
678
# DICO is assumed to be customized for the distribution site
huet's avatar
huet committed
679 680 681 682
	cp -Rp $(DICO) DISTR     # Hypertext Heritage Dictionary for browsing
	mkdir DISTR/BOOK
	cp -p $(BOOKPRINTS) DISTR/BOOK # Heritage Skt Dictionary for printing
	mkdir DISTR/DOC
683 684
	cd ML; $(MAKE) doc
	cp -p DOC/Heritage_platform.pdf DISTR/DOC
685 686
	cp -p DOC/transliterations.pdf DISTR/DOC
	cp -p $(MANUAL) DISTR/SITE # user's manual
huet's avatar
huet committed
687 688
#	cp -p $(ROBOTS) DISTR/SITE # robots permissions
	mkdir DISTR/$(STAT)
689 690 691
#	cp -p $(STAT)/regression_template DISTR/$(STAT) # for regression analysis suite
#	touch DISTR/dictionary # for make dictionary to succeed vacuously
#	touch DISTR/xmlmorphology # for make xmlmorphology to succeed vacuously
huet's avatar
huet committed
692 693 694 695 696 697

# creates an archive SktPlatform.$(VERSION) with the full distribution (55Mb)
distrib_full: distrib# assumes distrib has been run, and thus directory DISTR exists
	test -e DISTR || (echo "DISTR inexistant"; exit 1)
	test -e SktPlatform.$(VERSION) && echo "Distribution dir exists" \
&& exit 1 || echo "OK"
698
	cd DISTR && mkdir $(DATA)/ML
huet's avatar
huet committed
699 700 701 702
	cp -p DOC/doc.pdf DISTR/DOC       # Skt Platform pdf documentation
	cp -p $(DOCS) DISTR/DOC           # Various documentation and articles
	cp -p $(DIC) DISTR                # Sanskrit Heritage Dictionary source
	cp -p $(LEX) DISTR/ML             # Skt Engine Compiling ML source code
703
	cp -p $(AUT) DISTR/ML             # Skt Automaton
huet's avatar
huet committed
704 705 706 707 708 709 710 711 712 713
	cp -p $(AUT1) DISTR/ML            # Skt Automaton experimental
	cp -p $(TREE) DISTR/ML            # Skt Treebank and Syntax manager
	cp -p $(DEBUG) DISTR/ML           # Debugging tools
	cp -p $(BOOKSOURCE) DISTR/BOOK    # Book introduction
	cp -Rp $(DOCSOURCE) DISTR/DOC     # Software documentation source
	cp -p $(SITESOURCE) $(WEBSOURCES) DISTR/SITE # Web pages
#	cp  $(PDF_MORPHOLOGY) DISTR/$(DATA) # Skt PDF Morphology very big
	cp -Rp $(DATASOURCE) DISTR/$(DATA) # Morphology introduction
	cp -Rp CORPUS DISTR # Corpus - under development
	cp -Rp $(STAT) DISTR              # Statistical data, logs, notes
714
#	touch DISTR/dictionary # for make dictionary to succeed vacuously
huet's avatar
huet committed
715 716
	mv DISTR SktPlatform.$(VERSION)   # SktPlatform.$(VERSION) fresh

717
# deprecated: now we may use Git for distribution
huet's avatar
huet committed
718
distrib_platform: distrib_full # create distribution tar file of full SktPlatform
719 720
	tar czvf SktPlatform.$(VERSION).tar.gz SktPlatform.$(VERSION)
	rm -rf SktPlatform.$(VERSION)
huet's avatar
huet committed
721

722
depot: # depot ANL - only SktPlatform, no linguistic data
huet's avatar
huet committed
723 724 725 726 727 728 729
	mkdir DISTR                # Distribution directory
	mkdir DISTR/ML             # Source code library for all packages
	mkdir DISTR/SETUP          # SETUP dir
	cp $(UTIL) DISTR/ML        # Skt script utilities
	cp $(CORE) DISTR/ML        # Skt Core Engine ML source code
	cp $(GRAM) DISTR/ML        # Skt Grammatical Engine ML source code
	cp $(WEB) DISTR/ML         # Skt Site Manager ML source code
730
	cp -Rp $(SYSTEM_SETUP) DISTR/SETUP  # SETUP
huet's avatar
huet committed
731 732 733
	cp -p $(SYSTEM_configure) DISTR # configure at top level
	cp $(INFOS) DISTR          # installation instructions, scripts
	cp $(SOFT_LICENSE) DISTR/ML/LICENSE # customised software license
734
	mkdir DISTR/DOC
huet's avatar
huet committed
735 736 737 738
	cp -p DOC/doc.pdf DISTR/DOC       # Skt Engine pdf documentation
	cp -p $(DOCS) DISTR/DOC           # Various documentation and articles
	cp -p $(LEX) DISTR/ML             # Skt Engine Compiling ML source code
	cp -p $(TREE) DISTR/ML            # Skt Treebank and Syntax manager
739
	mv DISTR SktPlatform_$(VERSION)     # Skt_Platform distribution
huet's avatar
huet committed
740 741

install: #after distribution to host site: "./configure; make; sudo make install"
742
	SETUP/issudo.sh
743
	test -f $(SERVERPUBLICDIR)DATA/cache.txt && echo "cold install" || $(MAKE) cold
huet's avatar
huet committed
744 745 746 747 748 749
	test -f $(SERVERPUBLICDIR)$(VAR)/regression.txt && echo "regression install" || $(MAKE) install_regression
	$(MAKE) release

# for first installation, do "sudo make cold" before "make install"
cold: # for first install
	mkdir -p $(SERVERPUBLICDIR)IMAGES
750
	mkdir -p $(SERVERPUBLICDIR)DATA
huet's avatar
huet committed
751
	mkdir -p $(SERVERPUBLICDIR)DOC
752 753 754
	cd $(SERVERPUBLICDIR)DATA; touch $(CACHES); chmod a+w $(CACHES)
	cp -R $(IMAGES) $(SERVERPUBLICDIR)IMAGES
	cp -p $(SCRIPTS) $(SERVERPUBLICDIR)
huet's avatar
huet committed
755 756 757 758 759 760
	$(MAKE) empty_caches
#	$(MAKE) install_counter # only for master site migration

install_regression: # for initialisation of regression suite - su privilege
	mkdir -p $(SERVERPUBLICDIR)$(VAR)
	chmod a+rw $(SERVERPUBLICDIR)$(VAR)
761
#TODO	cp -p $(STAT)/regression_template $(SERVERPUBLICDIR)$(VAR)/regression.txt
762
#TODO	chmod a+rw $(SERVERPUBLICDIR)$(VAR)/regression.txt
huet's avatar
huet committed
763 764 765 766 767 768 769 770 771 772 773 774 775

empty_caches: ML/reset_caches # caution: will reset the caches
	ML/reset_caches

# reserved for master site
install_counter: counter
	cp -f SETUP/wwwcount2.5/bin/Count.cgi $(CGIDIR)
	mkdir -p $(SERVERPUBLICDIR)Counter/conf/
	cp -f SETUP/wwwcount2.5/count.cfg $(SERVERPUBLICDIR)Counter/conf
	rm -rf SETUP/wwwcount2.5

# Update of Amrita site page - reserved to webmaster
amrita_sitepage:
776
	cd /Library/WebServer/Documents/index.html.fr && cp -p SITE/amrita_server.index.html.fr index.html.fr
huet's avatar
huet committed
777 778 779 780 781 782

counter:
	cd SETUP && tar xzvf wwwcount2.5.tar.gz
	cd SETUP && ./counter.py
	cd SETUP/wwwcount2.5 && ./configure
	cd SETUP/wwwcount2.5 && make all
783 784 785 786 787 788 789 790 791

.PHONY: uninstall
uninstall:
	SETUP/issudo.sh
	rm -rf $(SERVERPUBLICDIR)* $(CGIDIR)*

.PHONY: reinstall
reinstall: uninstall
	$(MAKE) install
792 793 794 795 796

export SERVERCORPUS
.PHONY: export-corpus
export-corpus:
	$(MAKE) -C $(SKTRESOURCES) commit-corpus