r76838 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76837‎ | r76838 | r76839 >
Date:21:20, 16 November 2010
Author:hashar
Status:ok
Tags:
Comment:
reorganise targets, use variables for common objects, add comments.
Modified paths:
  • /trunk/phase3/math/Makefile (modified) (history)

Diff [purge]

Index: trunk/phase3/math/Makefile
@@ -1,3 +1,5 @@
 2+.PHONY: clean all
 3+
24 OBJ=render_info.cmo tex.cmo texutil.cmo parser.cmo lexer.cmo texvc.cmo \
35 render_info.cmx tex.cmx texutil.cmx parser.cmx lexer.cmx texvc.cmx \
46 lexer.cmi parser.cmi render_info.cmi tex.cmi texutil.cmi texvc.cmi \
@@ -10,15 +12,41 @@
1113 html.o mathml.cmi mathml.cmo mathml.cmx mathml.o
1214 CGIPATH=-I /usr/lib/ocaml/cgi -I /usr/lib/ocaml/netstring -I /usr/lib/ocaml/pcre
1315
 16+COMMON_NATIVE_OBJ =util.cmx parser.cmx html.cmx mathml.cmx texutil.cmx lexer.cmx
 17+COMMON_BYTECODE_OBJ=util.cmo parser.cmo html.cmo mathml.cmo texutil.cmo lexer.cmo
 18+
1419 all: texvc texvc_test texvc_tex
15 -texvc.bc: util.cmo parser.cmo html.cmo mathml.cmo texutil.cmo render.cmo lexer.cmo texvc.cmo
16 - ocamlc -o $@ unix.cma $^
17 -texvc: util.cmx parser.cmx html.cmx mathml.cmx texutil.cmx render.cmx lexer.cmx texvc.cmx
 20+cgi: texvc_cgi.cmo texvc_cgi
 21+clean:
 22+ rm -f $(OBJ)
 23+
 24+# Native versions
 25+texvc: $(COMMON_NATIVE_OBJ) render.cmx texvc.cmx
1826 ocamlopt -o $@ unix.cmxa $^
19 -texvc_test: util.cmx parser.cmx html.cmx mathml.cmx texutil.cmx lexer.cmx texvc_test.cmx
 27+texvc_test: $(COMMON_NATIVE_OBJ) lexer.cmx texvc_test.cmx
2028 ocamlopt -o $@ $^
21 -texvc_tex: util.cmx parser.cmx html.cmx mathml.cmx texutil.cmx lexer.cmx texvc_tex.cmx
 29+texvc_tex: $(COMMON_NATIVE_OBJ) texvc_tex.cmx
2230 ocamlopt -o $@ $^
 31+
 32+# Bytecode version
 33+texvc.bc: $(COMMON_BYTECODE_OBJ) render.cmo texvc.cmo
 34+ ocamlc -o $@ unix.cma $^
 35+
 36+# CGI related targets:
 37+texvc_cgi.cmo: texvc_cgi.ml
 38+ ocamlc -c $(CGIPATH) $<
 39+texvc_cgi: util.cmo parser.cmo texutil.cmo render.cmo lexer.cmo texvc_cgi.cmo
 40+ ocamlc -o $@ unix.cma $(CGIPATH) pcre.cma netstring.cma cgi.cma $^
 41+ chmod g-w $@
 42+
 43+#
 44+# Pattern rules
 45+#
 46+
 47+# .ml source .mli interface
 48+# .cmi compiled interface
 49+# .cmo object .cma library object
 50+# .cmx object file .cmxa library object file
2351 %.ml: %.mll
2452 ocamllex $<
2553 %.mli %.ml: %.mly
@@ -29,14 +57,9 @@
3058 ocamlopt -c $<
3159 %.cmi: %.mli
3260 ocamlc -c $<
33 -texvc_cgi.cmo: texvc_cgi.ml
34 - ocamlc -c $(CGIPATH) $<
35 -texvc_cgi: util.cmo parser.cmo texutil.cmo render.cmo lexer.cmo texvc_cgi.cmo
36 - ocamlc -o $@ unix.cma $(CGIPATH) pcre.cma netstring.cma cgi.cma $^
37 - chmod g-w $@
38 -clean:
39 - rm -f $(OBJ)
4061
 62+# Various dependencies
 63+
4164 html.cmo: render_info.cmi tex.cmi util.cmo html.cmi
4265 html.cmx: render_info.cmi tex.cmi util.cmx html.cmi
4366 html.cmi: tex.cmi

Status & tagging log