/[svn]/Makefile
ViewVC logotype

Contents of /Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 269 - (hide annotations)
Tue Jul 10 17:21:03 2007 UTC (5 years, 10 months ago) by abate
File size: 4393 byte(s)
[r2003-03-22 15:22:10 by cvscast] Empty log message

Original author: cvscast
Date: 2003-03-22 15:22:11+00:00
1 abate 61 # Source directories
2 abate 22
3 abate 113 DIRS = misc parser typing types runtime driver toplevel
4 abate 72 CLEAN_DIRS = $(DIRS) tools tests
5 abate 61
6     # Objects to build
7    
8 abate 269 MISC = misc/state.cmo misc/pool.cmo misc/encodings.cmo misc/bool.cmo
9 abate 78
10 abate 81 PARSER = parser/lexer.cmo parser/location.cmo \
11     parser/wlexer.cmo \
12     parser/ast.cmo parser/parser.cmo
13 abate 1
14 abate 5 TYPING = typing/typed.cmo typing/typer.cmo
15 abate 4
16 abate 224 TYPES = \
17 abate 70 types/sortedList.cmo types/sortedMap.cmo types/boolean.cmo \
18 abate 225 types/ident.cmo \
19 abate 12 types/intervals.cmo types/chars.cmo types/atoms.cmo \
20 abate 156 types/normal.cmo \
21 abate 15 types/types.cmo \
22 abate 17 types/patterns.cmo \
23 abate 18 types/sequence.cmo \
24     types/builtin.cmo
25 abate 3
26 abate 70 RUNTIME = runtime/value.cmo \
27     runtime/load_xml.cmo runtime/run_dispatch.cmo \
28 abate 76 runtime/print_xml.cmo \
29 abate 70 runtime/eval.cmo
30 abate 45
31 abate 10 DRIVER = driver/cduce.cmo
32 abate 3
33 abate 90 OBJECTS = $(MISC) $(TYPES) $(PARSER) $(TYPING) $(RUNTIME)
34 abate 63
35 abate 90 CDUCE = $(OBJECTS) $(DRIVER) driver/run.cmo
36 abate 126 WEBIFACE = $(OBJECTS) $(DRIVER) driver/examples.cmo driver/webiface.cmo
37 abate 90 TOPLEVEL = $(OBJECTS) toplevel/toploop.cmo
38    
39 abate 20 XOBJECTS = $(OBJECTS:.cmo=.cmx)
40 abate 90 XCDUCE = $(CDUCE:.cmo=.cmx)
41 abate 20
42 abate 1
43 abate 3
44 abate 61 DEBUG = -g
45 abate 90 PACKAGES = pxp-engine,pxp-lex-iso88591,wlexing,camlp4,num,cgi
46 abate 61 OCAMLCP = ocamlc
47     OCAMLC = ocamlfind $(OCAMLCP) -package $(PACKAGES)
48 abate 228 OCAMLOPT = ocamlfind ocamlopt -package $(PACKAGES)
49 abate 245 # extra options:
50     # -inline 25
51     # -p (profiling)
52     # -noassert
53 abate 61
54     DEPEND = $(DIRS:=/*.ml) $(DIRS:=/*.mli)
55     INCLUDES = $(DIRS:%=-I %)
56    
57     SYNTAX = camlp4o pa_extend.cmo
58     SYNTAX_PARSER = -pp '$(SYNTAX)'
59     PREPRO = $(SYNTAX) pr_o.cmo
60    
61 abate 1 all.cma: $(OBJECTS)
62 abate 61 $(OCAMLC) $(DEBUG) -o $@ -linkpkg gramlib.cma -a $(OBJECTS)
63 abate 1
64 abate 20 all.cmxa: $(XOBJECTS)
65 abate 61 $(OCAMLOPT) -a -o $@ $(XOBJECTS)
66 abate 20
67    
68 abate 188 OCAMLDEFUN = /home/frisch/defun/bin/ocamldefun
69     DEFUN_FILES = $(OBJECTS:%.cmo=%)
70    
71     build_defun:
72     for i in $(DEFUN_FILES); do \
73     $(OCAMLDEFUN) $(DIRS:%=-I defun/%) -p -d defun $$i.mli $$i.ml; \
74     $(OCAMLDEFUN) $(DIRS:%=-I defun/%) -p -d defun $$i.ml; \
75     done
76    
77 abate 90 cduce: $(CDUCE)
78     $(OCAMLC) $(DEBUG) -linkpkg -o $@ gramlib.cma $(CDUCE)
79 abate 10
80 abate 116 toplevel.out: $(TOPLEVEL)
81 abate 90 $(OCAMLC) $(DEBUG) -linkpkg -o $@ gramlib.cma $(TOPLEVEL)
82 abate 63
83 abate 90 webiface: $(WEBIFACE)
84     $(OCAMLC) $(DEBUG) -linkpkg -o $@ gramlib.cma $(WEBIFACE)
85 abate 63
86 abate 90
87 abate 71 dtd2cduce: tools/dtd2cduce.cmo
88     $(OCAMLC) $(DEBUG) -linkpkg -o $@ $<
89    
90 abate 72 pull: tools/pull.cmo
91     $(OCAMLC) $(DEBUG) -linkpkg -o $@ $<
92    
93 abate 124 cduce.opt: $(XCDUCE)
94     $(OCAMLOPT) -linkpkg -o $@ gramlib.cmxa $(XCDUCE)
95 abate 20
96 abate 3 compute_depend:
97     @echo "Computing dependencies ..."
98 abate 4 ocamldep $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) > depend
99 abate 1
100 abate 81 parser/wlexer.ml: parser/wlexer.mll
101     wlex parser/wlexer.mll
102    
103 abate 3 run_top: all.cma
104 abate 58 ledit ocaml $(INCLUDES) `ocamlfind use pxp` all.cma
105 abate 1
106     clean:
107 abate 72 for i in $(CLEAN_DIRS); do \
108 abate 58 (cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *~); \
109     done
110 abate 81 rm -f parser/wlexer.ml
111 abate 58 rm -f *.cmi *.cmo *.cma *.cmx *.a *.cmxa *.o *~
112 abate 72 rm -f cduce cduce.opt ocamlprof.dump
113 abate 90 rm -f dtd2cduce pool webiface
114 abate 61 rm -Rf prepro
115 abate 262 rm -f web/*.php web/*~
116 abate 1
117 abate 61
118 abate 1 .SUFFIXES: .ml .mli .cmo .cmi .cmx
119    
120 abate 61 profile:
121     rm -Rf prepro
122     mkdir prepro
123     for i in $(DIRS); do \
124     mkdir prepro/$$i; \
125     for j in $$i/*.ml $$i/*.mli; do \
126     if [ -f "$$j" ]; then \
127     echo $$j; \
128     $(PREPRO) $$j -o prepro/$$j; \
129     fi; \
130     done; \
131     done
132 abate 139 cp parser/wlexer.mll prepro/parser/
133 abate 61 cp Makefile depend prepro/
134     (cd prepro; make cduce OCAMLCP="ocamlcp -p a" SYNTAX_PARSER=)
135    
136 abate 1 .ml.cmo:
137 abate 61 $(OCAMLC) $(DEBUG) -c $(SYNTAX_PARSER) $(INCLUDES) $<
138    
139 abate 1 .ml.cmx:
140 abate 58 $(OCAMLOPT) -c $(SYNTAX_PARSER) $(INCLUDES) $<
141 abate 1
142     .mli.cmi:
143 abate 61 $(OCAMLC) $(DEBUG) -c $(SYNTAX_PARSER) $(INCLUDES) $<
144 abate 1
145     # FORTPATH = /users/formel8/frisch/solaris/fort/fort
146 abate 61 #FORTPATH = /home/frisch/fort
147     #FORTBIN = $(FORTPATH)/fort
148     #FORTLIB = $(FORTPATH)
149 abate 1
150     test: all.cma
151 abate 61 fort all.cma $(INCLUDES) tests/test_fort.ml
152 abate 1
153 abate 3 include depend
154 abate 105
155    
156 abate 126 driver/examples.ml: cduce tests/web.cd tests/examples.xml
157     ./cduce -quiet tests/web.cd
158    
159    
160 abate 260 web/files: cduce.opt web/site.cd
161 abate 255 (cd web; ../cduce.opt -quiet site.cd)
162    
163 abate 105 # Site-specific installation
164     build_web:
165 abate 261 rsh cedre ". .env; cd IMPLEM/CDUCE; make webiface"
166 abate 105 install_web:
167 abate 268 ssh cduce@iris.ens.fr "cp ~frisch/IMPLEM/CDUCE/webiface cgi-bin/cduce2; cp ~frisch/IMPLEM/CDUCE/memento.html public_html/; chmod +s cgi-bin/cduce2"
168 abate 155 install_web_local:
169 abate 268 ssh root@localhost "cp ~beppe/IMPLEM/CDUCE/webiface /var/www/cgi-bin/cduce; cp ~beppe/IMPLEM/CDUCE/web/*.php /var/www/html/; chmod +s /var/www/cgi-bin/cduce;"
170 abate 172
171     build_website:
172 abate 260 rsh cedre ". .env; cd IMPLEM/CDUCE; make web/files"
173 abate 261 scp web/*.php web/cduce.css cduce@iris:public_html/

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5