Release coccinelle-0.2.3rc4
[bpt/coccinelle.git] / ocamlsexp / modif-orig.txt
CommitLineData
b1b2de81
C
1I use in a different way sexplib. I don't like camlp4 but I like the
2metaprogramming facility it offers. So I've found a in-the-middle
3solution where I use camlp4 to generate code (via a small script
4I have written, not included here for the moment), save the generated code
5in a file (e.g commons/sexp_common.ml), which allows then to
6completely remove the dependency to camlp4. This means among
7other things that the file pa_sexp_conv.ml is not here, as
8I include here only the runtime library for sexp, not the
9camlp4 stuff. As I also didn't like their compilation process,
10with the need for findlib, -pack options, etc, I have rewritten a Makefile.
11
12-- pad
13
14Here are the modifications I've made to the sexplib lib/ directory.
15
16diff -u -p -b -B -r -x .semantic.cache -x .depend -x CVS -x .hg -x .svn -x .git -x _darcs -x *.cm[iao] -x *.[oa] -x *.class /home/pad/reference/dev-ocaml/orig/ocamljane-orig/sexplib310-3.7.4/lib/ /home/pad/c-coccinelle/ocamlsexp
17Only in /home/pad/reference/dev-ocaml/orig/ocamljane-orig/sexplib310-3.7.4/lib/: META
18diff -u -p -b -B -r -x .semantic.cache -x .depend -x CVS -x .hg -x .svn -x .git -x _darcs -x '*.cm[iao]' -x '*.[oa]' -x '*.class' /home/pad/reference/dev-ocaml/orig/ocamljane-orig/sexplib310-3.7.4/lib/Makefile /home/pad/c-coccinelle/ocamlsexp/Makefile
19--- /home/pad/reference/dev-ocaml/orig/ocamljane-orig/sexplib310-3.7.4/lib/Makefile 2009-03-09 19:52:09.000000000 -0500
20+++ /home/pad/c-coccinelle/ocamlsexp/Makefile 2009-04-15 22:04:59.000000000 -0500
21@@ -1,36 +1,166 @@
22-OCAMLMAKEFILE = ../OCamlMakefile
23+##############################################################################
24+# Variables
25+##############################################################################
26
27-SOURCES = \
28+SRC= \
29 type.ml \
30- parser.mly \
31- lexer.mll \
32+ parser.ml \
33+ lexer.ml \
34 pre_sexp.ml \
35 sexp_intf.ml \
36- sexp.mli sexp.ml \
37- path.mli path.ml \
38- conv.mli conv.ml \
39+ sexp.ml \
40+ path.ml \
41+ conv.ml \
42 conv_error.ml
43-LIB_PACK_NAME = sexplib
44-INCDIRS = +camlp4
45-OCAMLFLAGS = -for-pack Sexplib
46-PACKS = type-conv
47-RESULT = sexplib
48-
49-TRASH = pa_sexp_conv.cmi pa_sexp_conv.cmo pa_sexp_conv.annot
50-
51-all: \
52- pack-byte-code pack-native-code \
53- sexplib.cma sexplib.cmxa \
54- pa_sexp_conv.cmi pa_sexp_conv.cmo
55-
56-LIBINSTALL_FILES = \
57- sexp.mli path.mli conv.mli \
58- sexplib.cmi sexplib.cma sexplib.cmxa sexplib.a \
59- pa_sexp_conv.cmi pa_sexp_conv.cmo
60+#SOURCES = \
61+# parser.mly \
62+# lexer.mll \
63+# sexp.mli path.mli conv.mli
64
65-install: libinstall
66-uninstall: libuninstall
67
68-clean:: clean-doc
69+TARGET=sexplib1
70+TARGETPACK=sexplib
71+#LIB_PACK_NAME = sexplib
72
73--include $(OCAMLMAKEFILE)
74+##############################################################################
75+# Generic variables
76+##############################################################################
77+
78+INCLUDES=
79+#-I +camlp4
80+SYSLIBS= str.cma unix.cma bigarray.cma num.cma
81+#INCDIRS = +camlp4
82+#pad: take care for bigarray otherwise get some caml_ba_get_1 error msg
83+
84+##############################################################################
85+#OCAMLFLAGS = -for-pack Sexplib
86+
87+#PACKS = type-conv
88+#RESULT = sexplib
89+
90+#TRASH = pa_sexp_conv.cmi pa_sexp_conv.cmo pa_sexp_conv.annot
91+
92+#all: \
93+# pack-byte-code pack-native-code \
94+# sexplib.cma sexplib.cmxa \
95+# pa_sexp_conv.cmi pa_sexp_conv.cmo
96+#
97+#LIBINSTALL_FILES = \
98+# sexp.mli path.mli conv.mli \
99+# sexplib.cmi sexplib.cma sexplib.cmxa sexplib.a \
100+# pa_sexp_conv.cmi pa_sexp_conv.cmo
101+#
102+#install: libinstall
103+#uninstall: libuninstall
104+#
105+#clean:: clean-doc
106+#
107+#-include $(OCAMLMAKEFILE)
108+
109+##############################################################################
110+
111+##############################################################################
112+# Generic variables
113+##############################################################################
114+
115+#dont use -custom, it makes the bytecode unportable.
116+OCAMLCFLAGS= -g -dtypes # -w A
117+#-for-pack Sexplib
118+
119+# This flag is also used in subdirectories so don't change its name here.
120+OPTFLAGS=
121+
122+
123+OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES) $(SYSINCLUDES) -thread
124+OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES) $(SYSINCLUDES) -thread
125+OCAMLLEX=ocamllex #-ml # -ml for debugging lexer, but slightly slower
126+OCAMLYACC=ocamlyacc -v
127+OCAMLDEP=ocamldep $(INCLUDES)
128+OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES) -thread
129+
130+#-ccopt -static
131+STATIC=
132+
133+
134+##############################################################################
135+# Top rules
136+##############################################################################
137+
138+OBJS = $(SRC:.ml=.cmo)
139+OPTOBJS = $(SRC:.ml=.cmx)
140+
141+all: $(TARGET).cma $(TARGETPACK).cmo
142+all.opt: $(TARGET).cmxa
143+
144+$(TARGET).cma: $(OBJS)
145+ $(OCAMLC) -a -o $(TARGET).cma $(OBJS)
146+
147+$(TARGET).cmxa: $(OPTOBJS) $(LIBS:.cma=.cmxa)
148+ $(OCAMLOPT) -a -o $(TARGET).cmxa $(OPTOBJS)
149+
150+$(TARGET).top: $(OBJS) $(LIBS)
151+ $(OCAMLMKTOP) -o $(TARGET).top $(SYSLIBS) $(LIBS) $(OBJS)
152+
153+clean::
154+ rm -f $(TARGET).top
155+
156+
157+
158+$(TARGETPACK).cmo: $(OBJS)
159+ $(OCAMLC) -pack -o $(TARGETPACK).cmo $(OBJS)
160+
161+# special handling, fun that they use cpp whereas they claim camplp4 can do everything
162+pre_sexp.cmo: pre_sexp.ml
163+ $(OCAMLC) -pp cpp -c $<
164+
165+pre_sexp.cmx: pre_sexp.ml
166+ $(OCAMLOPT) -pp cpp -c $<
167+
168+
169+
170+lexer.ml: lexer.mll
171+ $(OCAMLLEX) $<
172+clean::
173+ rm -f lexer.ml
174+beforedepend:: lexer.ml
175+
176+
177+parser.ml parser.mli: parser.mly
178+ $(OCAMLYACC) $<
179+clean::
180+ rm -f parser.ml parser.mli parser.output
181+beforedepend:: parser.ml parser.mli
182+
183+
184+
185+##############################################################################
186+# Generic rules
187+##############################################################################
188+
189+.SUFFIXES: .ml .mli .cmo .cmi .cmx
190+
191+.ml.cmo:
192+ $(OCAMLC) -c $<
193+.mli.cmi:
194+ $(OCAMLC) -c $<
195+.ml.cmx:
196+ $(OCAMLOPT) -c $<
197+
198+.ml.mldepend:
199+ $(OCAMLC) -i $<
200+
201+clean::
202+ rm -f *.cm[ioxa] *.o *.a *.cmxa *.annot
203+clean::
204+ rm -f *~ .*~ gmon.out #*#
205+
206+beforedepend::
207+
208+# need also -pp cpp here
209+depend:: beforedepend
210+ $(OCAMLDEP) -pp cpp *.mli *.ml > .depend
211+
212+distclean:
213+ rm -f .depend
214+
215+-include .depend
216Only in /home/pad/reference/dev-ocaml/orig/ocamljane-orig/sexplib310-3.7.4/lib/: OMakefile
217Only in /home/pad/c-coccinelle/ocamlsexp: copyright.txt
218Only in /home/pad/c-coccinelle/ocamlsexp: license-tywith.txt
219Only in /home/pad/c-coccinelle/ocamlsexp: license.txt
220Only in /home/pad/reference/dev-ocaml/orig/ocamljane-orig/sexplib310-3.7.4/lib/: pa_sexp_conv.ml
221Only in /home/pad/reference/dev-ocaml/orig/ocamljane-orig/sexplib310-3.7.4/lib/: pa_sexp_conv.mli
222
223Diff finished. Thu Apr 16 10:57:39 2009