| 5 |
|
|
| 6 |
# Objects to build |
# Objects to build |
| 7 |
|
|
| 8 |
MISC = misc/state.cmo misc/pool.cmo misc/encodings.cmo |
MISC = misc/state.cmo misc/pool.cmo misc/encodings.cmo misc/bool.cmo |
| 9 |
|
|
| 10 |
PARSER = parser/lexer.cmo parser/location.cmo \ |
PARSER = parser/lexer.cmo parser/location.cmo \ |
| 11 |
parser/wlexer.cmo \ |
parser/wlexer.cmo \ |
| 15 |
|
|
| 16 |
TYPES = \ |
TYPES = \ |
| 17 |
types/sortedList.cmo types/sortedMap.cmo types/boolean.cmo \ |
types/sortedList.cmo types/sortedMap.cmo types/boolean.cmo \ |
| 18 |
|
types/ident.cmo \ |
| 19 |
types/intervals.cmo types/chars.cmo types/atoms.cmo \ |
types/intervals.cmo types/chars.cmo types/atoms.cmo \ |
| 20 |
types/normal.cmo \ |
types/normal.cmo \ |
| 21 |
types/types.cmo \ |
types/types.cmo \ |
| 38 |
|
|
| 39 |
XOBJECTS = $(OBJECTS:.cmo=.cmx) |
XOBJECTS = $(OBJECTS:.cmo=.cmx) |
| 40 |
XCDUCE = $(CDUCE:.cmo=.cmx) |
XCDUCE = $(CDUCE:.cmo=.cmx) |
| 41 |
|
XWEBIFACE = $(WEBIFACE:.cmo=.cmx) |
| 42 |
|
|
| 43 |
|
|
| 44 |
DEBUG = -g |
DEBUG = -g |
| 46 |
OCAMLCP = ocamlc |
OCAMLCP = ocamlc |
| 47 |
OCAMLC = ocamlfind $(OCAMLCP) -package $(PACKAGES) |
OCAMLC = ocamlfind $(OCAMLCP) -package $(PACKAGES) |
| 48 |
OCAMLOPT = ocamlfind ocamlopt -package $(PACKAGES) |
OCAMLOPT = ocamlfind ocamlopt -package $(PACKAGES) |
| 49 |
|
# extra options: |
| 50 |
|
# -inline 25 |
| 51 |
|
# -p (profiling) |
| 52 |
|
# -noassert |
| 53 |
|
|
| 54 |
DEPEND = $(DIRS:=/*.ml) $(DIRS:=/*.mli) |
DEPEND = $(DIRS:=/*.ml) $(DIRS:=/*.mli) |
| 55 |
INCLUDES = $(DIRS:%=-I %) |
INCLUDES = $(DIRS:%=-I %) |
| 74 |
$(OCAMLDEFUN) $(DIRS:%=-I defun/%) -p -d defun $$i.ml; \ |
$(OCAMLDEFUN) $(DIRS:%=-I defun/%) -p -d defun $$i.ml; \ |
| 75 |
done |
done |
| 76 |
|
|
|
memento.html: cduce tests/memento.cd tests/memento.xml |
|
|
./cduce -quiet tests/memento.cd |
|
|
|
|
| 77 |
cduce: $(CDUCE) |
cduce: $(CDUCE) |
| 78 |
$(OCAMLC) $(DEBUG) -linkpkg -o $@ gramlib.cma $(CDUCE) |
$(OCAMLC) $(DEBUG) -linkpkg -o $@ gramlib.cma $(CDUCE) |
| 79 |
|
|
| 93 |
cduce.opt: $(XCDUCE) |
cduce.opt: $(XCDUCE) |
| 94 |
$(OCAMLOPT) -linkpkg -o $@ gramlib.cmxa $(XCDUCE) |
$(OCAMLOPT) -linkpkg -o $@ gramlib.cmxa $(XCDUCE) |
| 95 |
|
|
| 96 |
|
webiface.opt: $(XWEBIFACE) |
| 97 |
|
$(OCAMLOPT) -linkpkg -o $@ gramlib.cmxa $(XWEBIFACE) |
| 98 |
|
|
| 99 |
compute_depend: |
compute_depend: |
| 100 |
@echo "Computing dependencies ..." |
@echo "Computing dependencies ..." |
| 101 |
ocamldep $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) > depend |
ocamldep $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) > depend |
| 112 |
done |
done |
| 113 |
rm -f parser/wlexer.ml |
rm -f parser/wlexer.ml |
| 114 |
rm -f *.cmi *.cmo *.cma *.cmx *.a *.cmxa *.o *~ |
rm -f *.cmi *.cmo *.cma *.cmx *.a *.cmxa *.o *~ |
| 115 |
rm -f cduce cduce.opt ocamlprof.dump |
rm -f cduce cduce.opt webiface.opt ocamlprof.dump |
| 116 |
rm -f dtd2cduce pool webiface |
rm -f dtd2cduce pool webiface |
| 117 |
rm -Rf prepro |
rm -Rf prepro |
| 118 |
rm -f web/index.html |
rm -f web/*.php web/*~ |
| 119 |
|
|
| 120 |
|
|
| 121 |
.SUFFIXES: .ml .mli .cmo .cmi .cmx |
.SUFFIXES: .ml .mli .cmo .cmi .cmx |
| 156 |
include depend |
include depend |
| 157 |
|
|
| 158 |
|
|
| 159 |
driver/examples.ml: cduce tests/web.cd tests/examples.xml |
driver/examples.ml: cduce.opt web/examples/build.cd web/examples/examples.xml |
| 160 |
./cduce -quiet tests/web.cd |
(cd web/examples; ../../cduce.opt -quiet build.cd) |
| 161 |
|
|
| 162 |
|
|
| 163 |
web/index.html: cduce web/macros.cd web/index.xml |
web/files: cduce.opt web/site.cd |
| 164 |
(cd web; ../cduce -quiet macros.cd) |
(cd web; ../cduce.opt -quiet site.cd) |
| 165 |
|
|
| 166 |
|
|
| 167 |
|
write_header: |
| 168 |
|
headache -h header $(DEPEND) |
| 169 |
|
|
| 170 |
|
remove_header: |
| 171 |
|
headache -r $(DEPEND) |
| 172 |
|
|
| 173 |
# Site-specific installation |
# Site-specific installation |
| 174 |
build_web: |
build_web: |
| 175 |
rsh cedre ". .env; cd IMPLEM/CDUCE; make webiface memento.html" |
rsh cedre ". .env; cd IMPLEM/CDUCE; make webiface.opt" |
| 176 |
install_web: |
install_web: |
| 177 |
ssh cduce@iris "cp ~frisch/IMPLEM/CDUCE/webiface cgi-bin/cduce2; cp ~frisch/IMPLEM/CDUCE/memento.html public_html/; chmod +s cgi-bin/cduce2" |
ssh cduce@iris.ens.fr "cp ~frisch/IMPLEM/CDUCE/webiface.opt cgi-bin/cduce; chmod +s cgi-bin/cduce" |
| 178 |
install_web_local: |
install_web_local: |
| 179 |
ssh root@localhost "cp ~beppe/IMPLEM/CDUCE/webiface /var/www/cgi-bin/cduce; cp ~beppe/IMPLEM/CDUCE/memento.html /var/www/html/; chmod +s /var/www/cgi-bin/cduce; cp ~beppe/IMPLEM/CDUCE/web/index.html /var/www/html" |
ssh root@localhost "cp ~beppe/IMPLEM/CDUCE/webiface.opt /var/www/cgi-bin/cduce; cp ~beppe/IMPLEM/CDUCE/web/*.php /var/www/html/; chmod +s /var/www/cgi-bin/cduce;" |
| 180 |
|
|
| 181 |
build_website: |
build_website: |
| 182 |
rsh cedre ". .env; cd IMPLEM/CDUCE; make web/index.html" |
rsh cedre ". .env; cd IMPLEM/CDUCE; make web/files" |
| 183 |
scp web/index.html web/cduce.css cduce@iris:public_html/ |
scp web/*.php web/cduce.css cduce@iris:public_html/ |
|
|
|
| 184 |
|
|