~ubuntu-branches/ubuntu/oneiric/ocsigen/oneiric

« back to all changes in this revision

Viewing changes to xmlp4/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Glondu
  • Date: 2009-07-02 10:02:08 UTC
  • mfrom: (1.1.9 upstream) (4.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090702100208-n158b1sqwzn0asil
Tags: 1.2.0-2
Fix build on non-native architectures

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
include ../Makefile.config
2
2
 
3
 
ifeq "$(DEBUG)" "YES"
4
 
DBG = -dtypes -g
5
 
else
6
 
DBG =
7
 
endif
8
 
 
9
 
FILES = xhtmlpretty.ml xhtmlcompact.ml
 
3
FILES = xhtmlpretty.ml xhtmlcompact.ml \
 
4
        xhtmlpretty_streams.ml xhtmlcompact_streams.ml
10
5
 
11
6
CAMLC = $(OCAMLFIND) $(CAMLCNAME) $(DBG) $(LIB) -package camlp4
12
7
CAMLOPT = $(OCAMLFIND) $(CAMLOPTNAME) $(DBG) $(LIB) -package camlp4
19
14
OBJSOPT = $(FILES:.ml=.cmx)
20
15
 
21
16
 
22
 
byte: bytedep $(OBJS)
 
17
byte: bytedep $(OBJS) xhtmlpretty.cma
23
18
xmlp4pre.byte: bytedep
24
19
xmlp4pre.opt: optdep
25
 
opt: optdep $(OBJSOPT)
 
20
opt: optdep $(OBJSOPT) xhtmlpretty.cmxa
26
21
 
27
22
bytedep:
28
 
ifeq "$(OCAMLVERSION)" "OLD"
29
 
        $(MAKE) -C oldocaml byte
30
 
else 
31
23
        $(MAKE) -C newocaml byte
32
 
endif
33
24
 
34
25
optdep:
35
 
ifeq "$(OCAMLVERSION)" "OLD"
36
 
        $(MAKE) -C oldocaml opt
37
 
else 
38
26
        $(MAKE) -C newocaml opt
39
 
endif
40
 
 
 
27
 
 
28
 
 
29
xhtmlpretty.cma: xhtmlpretty.cmo xhtmlcompact.cmo
 
30
        $(CAMLC) -a -o xhtmlpretty.cma xhtmlpretty.cmo xhtmlcompact.cmo
 
31
 
 
32
xhtmlpretty.cmxa: xhtmlpretty.cmx xhtmlcompact.cmx
 
33
        $(CAMLOPT) -a -o xhtmlpretty.cmxa xhtmlpretty.cmx xhtmlcompact.cmx
41
34
 
42
35
# Common rules
43
36
.SUFFIXES: .ml .mli .cmo .cmi .cmx
55
48
#       touch oldocaml/.depend
56
49
#       touch newocaml/.depend
57
50
        -rm -f *.cm[ioax] *.cmxa *.cmxs *.o *.a *~ *.annot
58
 
        -$(MAKE) -C oldocaml clean
59
51
        -$(MAKE) -C newocaml clean
60
52
 
61
53
depend:
62
54
#       touch oldocaml/.depend
63
55
#       touch newocaml/.depend
64
56
        $(CAMLDEP) -I ohl-xhtml $(PP) $(FILES) > .depend
65
 
ifeq "$(OCAMLVERSION)" "OLD"
66
 
        $(MAKE) -C oldocaml depend
67
 
else 
68
57
        $(MAKE) -C newocaml depend
69
 
endif
70
58
 
71
59
 
72
60
-include .depend