~ubuntu-branches/ubuntu/trusty/coccinelle/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/system-ocamlsexp.diff/parsing_c/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Євгеній Мещеряков
  • Date: 2010-07-25 01:10:07 UTC
  • mfrom: (7.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100725011007-jgd9ctxi1x03fthg
Tags: 0.2.3.deb-1
* New upstream release
* Removed patches:
  - system-{pycaml,menhir,ocamlsexp}.diff - upstream build system can handle
    this
  - documentation-paths.diff - the manpage is generated using correct paths
  - documentation-build.diff - build documentation, authors clarified that
    it does not contain Front/Back Covers and Invariant Sections
* New patches:
  - syslibs-depend.diff - fix depend targets when system libraries are used
* Override clean directories in debian/rules: upstream makefile tries to
  clean directories removed in Debian package
* Build and install pdf docs
  - build-depend on texlive-latex-base, texlive-latex-recommended,
    texlive-latex-extra, texlive-fonts-recommended, texlive-fonts-extra
* Do not compress .pdf .cocci and .c files
* Add information about manual license (GFDL-1.3+) into debian/copyright
* Standards-Version 3.9.0 — no changes required
* Install the bash completion file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
-include ../Makefile.config
3
 
 
4
 
##############################################################################
5
 
# Variables
6
 
##############################################################################
7
 
TARGET=parsing_c
8
 
 
9
 
-include ../Makefile.config
10
 
 
11
 
ifeq ($(FEATURE_TARZAN), 1)
12
 
TARZANSRC=sexp_ast_c.ml
13
 
TARZANINCLUDE=-I ../ocamlsexp
14
 
endif
15
 
 
16
 
 
17
 
 
18
 
# - type_cocci.ml ast_cocci.ml  # + unparse_hrule
19
 
SRC= flag_parsing_c.ml parsing_stat.ml \
20
 
 token_c.ml ast_c.ml control_flow_c.ml \
21
 
 $(TARZANSRC) \
22
 
 visitor_c.ml lib_parsing_c.ml \
23
 
 control_flow_c_build.ml \
24
 
 pretty_print_c.ml \
25
 
 semantic_c.ml lexer_parser.ml parser_c.ml lexer_c.ml \
26
 
 token_helpers.ml token_views_c.ml \
27
 
 cpp_token_c.ml  \
28
 
 parsing_hacks.ml \
29
 
 cpp_analysis_c.ml \
30
 
 unparse_cocci.ml unparse_c.ml unparse_hrule.ml  \
31
 
 parsing_recovery_c.ml parsing_consistency_c.ml \
32
 
 parse_c.ml type_c.ml \
33
 
 cpp_ast_c.ml \
34
 
 type_annoter_c.ml comment_annotater_c.ml \
35
 
 compare_c.ml \
36
 
 test_parsing_c.ml
37
 
 
38
 
 
39
 
 
40
 
# ast_cocci.ml and unparse_cocci.ml should be deleted in the futur
41
 
# to make parsing_c really independent of coccinelle.
42
 
# control_flow_c have also coccinelle dependencies.
43
 
# old: parsing_c now depends on cocci_parser because in addition to decorate
44
 
# the token in Ast_c with some parse info, we now also make some place to
45
 
# welcome some mcodekind of Ast_cocci.
46
 
LIBS=../commons/commons.cma ../globals/globals.cma \
47
 
     ../parsing_cocci/cocci_parser.cma
48
 
 
49
 
INCLUDES= -I ../commons -I ../commons/ocamlextra -I ../commons/ocollection \
50
 
 $(TARZANINCLUDE) \
51
 
  -I ../globals -I  ../parsing_cocci
52
 
 
53
 
#LIBS=../commons/commons.cma
54
 
#INCLUDES= -I ../commons
55
 
SYSLIBS= str.cma unix.cma num.cma
56
 
 
57
 
##############################################################################
58
 
# Generic variables
59
 
##############################################################################
60
 
 
61
 
#for warning:  -w A
62
 
#for profiling:  -p -inline 0   with OCAMLOPT
63
 
OCAMLCFLAGS ?= -g -dtypes
64
 
 
65
 
OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
66
 
OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
67
 
OCAMLLEX=ocamllex$(OPTBIN) #-ml
68
 
OCAMLYACC=ocamlyacc -v
69
 
OCAMLDEP=ocamldep$(OPTBIN) $(INCLUDES)
70
 
OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
71
 
 
72
 
 
73
 
OBJS = $(SRC:.ml=.cmo)
74
 
OPTOBJS = $(SRC:.ml=.cmx)
75
 
 
76
 
 
77
 
##############################################################################
78
 
# Top rules
79
 
##############################################################################
80
 
all: $(TARGET).cma
81
 
all.opt: $(TARGET).cmxa
82
 
 
83
 
$(TARGET).cma: $(OBJS)
84
 
        $(OCAMLC) -a -o $(TARGET).cma $(OBJS)
85
 
 
86
 
$(TARGET).cmxa: $(OPTOBJS) $(LIBS:.cma=.cmxa)
87
 
        $(OCAMLOPT) -a -o $(TARGET).cmxa $(OPTOBJS)
88
 
 
89
 
$(TARGET).top: $(OBJS) $(LIBS)
90
 
        $(OCAMLMKTOP) -o $(TARGET).top $(SYSLIBS) $(LIBS) $(OBJS)
91
 
 
92
 
clean::
93
 
        rm -f $(TARGET).top
94
 
 
95
 
lexer_c.ml: lexer_c.mll
96
 
        $(OCAMLLEX) $<
97
 
clean::
98
 
        rm -f lexer_c.ml
99
 
beforedepend:: lexer_c.ml
100
 
 
101
 
 
102
 
parser_c.ml parser_c.mli: parser_c.mly
103
 
        $(OCAMLYACC) $<
104
 
clean::
105
 
        rm -f parser_c.ml parser_c.mli parser_c.output
106
 
beforedepend:: parser_c.ml parser_c.mli
107
 
 
108
 
 
109
 
##############################################################################
110
 
# Pad's rules
111
 
##############################################################################
112
 
# visitor_c.ml lib_parsing_c.ml \
113
 
# type_annoter_c.ml  \
114
 
# statistics_c.ml  \
115
 
# pretty_print_c.ml unparse_c.ml \
116
 
# test_parsing_c.ml
117
 
#toreput: compare_c.ml ast_to_flow.ml
118
 
 
119
 
COREPARSING= flag_parsing_c.ml parsing_stat.ml \
120
 
 ast_cocci.ml \
121
 
 ast_c.ml control_flow_c.ml \
122
 
 semantic_c.ml lexer_parser.ml parser_c.mly lexer_c.mll \
123
 
 token_helpers.ml parsing_hacks.ml parse_c.ml \
124
 
 
125
 
locparsing:
126
 
        wc -l $(COREPARSING)
127
 
 
128
 
locindiv:
129
 
        wc -l lexer_c.mll
130
 
        wc -l parser_c.mly
131
 
        wc -l parsing_hacks.ml
132
 
        wc -l ast_c.ml
133
 
        wc -l parse_c.ml
134
 
 
135
 
##############################################################################
136
 
# Literate Programming rules
137
 
##############################################################################
138
 
 
139
 
 
140
 
##############################################################################
141
 
# Generic rules
142
 
##############################################################################
143
 
 
144
 
.SUFFIXES: .ml .mli .cmo .cmi .cmx
145
 
 
146
 
.ml.cmo:
147
 
        $(OCAMLC) -c $<
148
 
.mli.cmi:
149
 
        $(OCAMLC) -c $<
150
 
.ml.cmx:
151
 
        $(OCAMLOPT) -c $<
152
 
 
153
 
.ml.mldepend:
154
 
        $(OCAMLC) -i $<
155
 
 
156
 
clean::
157
 
        rm -f *.cm[ioxa] *.o *.a *.cmxa *.annot
158
 
        rm -f *~ .*~ gmon.out #*#
159
 
 
160
 
distclean::
161
 
        rm -f .depend
162
 
 
163
 
beforedepend::
164
 
 
165
 
distclean::
166
 
        rm -f .depend
167
 
 
168
 
depend:: beforedepend
169
 
        $(OCAMLDEP) *.mli *.ml    > .depend
170
 
 
171
 
-include .depend