Skip to content

Commit fca8030

Browse files
committed
Importing from MyLife's private repository.
0 parents  commit fca8030

35 files changed

+4600
-0
lines changed

Changes.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
History of atd releases
2+
3+
2010-12-06 1.0.0: added support for shared types
4+
2010-09-13 0.9.2: added INSTALL file
5+
2010-09-09 0.9.1: documentation fixes only
6+
2010-08-22 0.9.0: initial release

INSTALL

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Installation instructions for atd
2+
3+
4+
Requirements:
5+
6+
- Objective Caml (>= 3.11 is fine, earlier versions are probably fine too)
7+
- GNU make
8+
- Findlib (`ocamlfind' command)
9+
- menhir http://pauillac.inria.fr/~fpottier/menhir/
10+
- easy-format http://martin.jambon.free.fr/easy-format.html
11+
12+
13+
GODI makes the installation process straightforward,
14+
although other package managers can be equally convenient.
15+
16+
17+
Manual installation is done using:
18+
19+
make # or `make all' for the bytecode-only version
20+
21+
make install # or `make BINDIR=/foo/bin install' for installing executables
22+
# in a place other than the guessed default.
23+
24+
25+
Uninstallation:
26+
27+
make uninstall
28+
29+
30+
31+
Bugs and feedback should be sent to Martin Jambon <[email protected]>
32+

LICENSE

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2010 MyLife
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions
6+
are met:
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
2. Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
3. The name of the author may not be used to endorse or promote products
13+
derived from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

META.in

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
description = "Adjustable Type Definitions"
2+
requires = "easy-format"
3+
archive(byte) = "atd.cma"
4+
archive(native) = "atd.cmxa"

Makefile

+165
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# $Id: Makefile 52901 2010-12-10 18:47:39Z martin $
2+
3+
VERSION = 1.0.0
4+
5+
SOURCES = \
6+
atd_version.ml \
7+
atd_ast.mli atd_ast.ml \
8+
atd_annot.mli atd_annot.ml \
9+
atd_parser.mli atd_parser.mly \
10+
atd_lexer.mll \
11+
atd_print.mli atd_print.ml \
12+
atd_predef.ml \
13+
atd_check.ml \
14+
atd_expand.mli atd_expand.ml \
15+
atd_inherit.mli atd_inherit.ml \
16+
atd_tsort.mli atd_tsort.ml \
17+
atd_util.mli atd_util.ml \
18+
atd_reflect.mli atd_reflect.ml \
19+
atd_indent.mli atd_indent.ml
20+
21+
MLY = $(filter %.mly, $(SOURCES))
22+
MLL = $(filter %.mll, $(SOURCES))
23+
24+
MLSOURCES = $(patsubst %.mll,%.ml, $(patsubst %.mly,%.ml, $(SOURCES)))
25+
MLI = $(filter %.mli, $(MLSOURCES))
26+
ML = $(filter %.ml, $(MLSOURCES))
27+
CMI = $(patsubst %.ml,%.cmi, $(ML))
28+
CMO = $(patsubst %.ml,%.cmo, $(ML))
29+
CMX = $(patsubst %.ml,%.cmx, $(ML))
30+
O = $(patsubst %.ml,%.o, $(ML))
31+
32+
OCAMLFLAGS = -dtypes -g
33+
OCAMLPACKS = easy-format unix
34+
35+
DOCFILES = \
36+
atd_ast \
37+
atd_annot \
38+
atd_print \
39+
atd_expand \
40+
atd_inherit \
41+
atd_util \
42+
atd_reflect \
43+
atd_indent
44+
45+
DOCSOURCES = $(addsuffix .mli, $(DOCFILES))
46+
47+
ifndef PREFIX
48+
PREFIX = $(shell dirname $$(dirname $$(which ocamlfind)))
49+
export PREFIX
50+
endif
51+
52+
ifndef BINDIR
53+
BINDIR = $(PREFIX)/bin
54+
export BINDIR
55+
endif
56+
57+
.PHONY: default all opt install uninstall
58+
59+
default: all opt
60+
61+
all: META atd.cma
62+
63+
opt: META atd.cmxa atdcat
64+
65+
install: META
66+
test ! -f atdcat || cp atdcat $(BINDIR)/
67+
test ! -f atdcat.exe || cp atdcat.exe $(BINDIR)/
68+
ocamlfind install atd META \
69+
`find $(MLI) $(CMI) $(CMO) $(CMX) $(O) atd.cma atd.a atd.cmxa`
70+
71+
uninstall:
72+
test ! -f $(BINDIR)/atdcat || rm $(BINDIR)/atdcat
73+
test ! -f $(BINDIR)/atdcat.exe || rm $(BINDIR)/atdcat.exe
74+
ocamlfind remove atd
75+
76+
atd_version.ml: Makefile
77+
echo 'let version = "$(VERSION)"' > atd_version.ml
78+
79+
META: META.in Makefile
80+
echo 'version = "$(VERSION)"' > META
81+
cat META.in >> META
82+
83+
%.cmi: %.mli
84+
ocamlfind ocamlc $(OCAMLFLAGS) -c -package "$(OCAMLPACKS)" $<
85+
86+
%.cmi: %.ml
87+
ocamlfind ocamlc $(OCAMLFLAGS) -c -package "$(OCAMLPACKS)" $<
88+
89+
%.cmo: %.ml
90+
ocamlfind ocamlc $(OCAMLFLAGS) -c -package "$(OCAMLPACKS)" $<
91+
92+
%.cmx: %.ml
93+
ocamlfind ocamlopt $(OCAMLFLAGS) -c -package "$(OCAMLPACKS)" $<
94+
95+
atd_parser.mli: atd_parser.mly
96+
menhir $<
97+
98+
atd_parser.ml: atd_parser.mly
99+
menhir $<
100+
101+
atd_lexer.ml: atd_lexer.mll
102+
ocamllex $<
103+
104+
dep: $(SOURCES) Makefile
105+
ocamlfind ocamldep -package "$(OCAMLPACKS)" $(MLI) $(ML) > dep
106+
107+
ifneq ($(MAKECMDGOALS),clean)
108+
-include dep
109+
endif
110+
111+
atd.cma: dep $(CMI) $(CMO)
112+
ocamlfind ocamlc $(OCAMLFLAGS) -o atd.cma -a $(CMO)
113+
114+
atd.cmxa: dep $(CMI) $(CMX)
115+
ocamlfind ocamlopt $(OCAMLFLAGS) -o atd.cmxa -a $(CMX)
116+
117+
atdcat: dep $(CMI) $(CMX) atdcat.ml
118+
ocamlfind ocamlopt $(OCAMLFLAGS) -o atdcat \
119+
-package "$(OCAMLPACKS)" -linkpkg \
120+
$(CMX) atdcat.ml
121+
122+
.PHONY: doc
123+
doc: odoc/index.html atdcat
124+
cd manual; $(MAKE)
125+
126+
odoc/index.html: $(CMI)
127+
mkdir -p odoc
128+
ocamlfind ocamldoc -d odoc -html \
129+
-t 'ATD library documentation' \
130+
-package "$(OCAMLPACKS)" $(DOCSOURCES)
131+
132+
.PHONY: test
133+
test: atdcat test.atd test2.atd
134+
./atdcat test.atd > test.out
135+
./atdcat test.out > test.out.out
136+
cmp test.out test.out.out
137+
./atdcat -x test2.atd > test2.out
138+
139+
.PHONY: clean
140+
clean:
141+
rm -f dep
142+
rm -f $(CMI) $(CMO) $(CMX) $(O)
143+
rm -f $(patsubst %.mly,%.mli, $(MLY))
144+
rm -f $(patsubst %.mly,%.ml, $(MLY))
145+
rm -f $(patsubst %.mll,%.ml, $(MLL))
146+
rm -f atdcat.cm[ioxa] atdcat.o atdcat.cma atdcat.cmxa
147+
rm -rf odoc
148+
cd manual; $(MAKE) clean
149+
150+
.PHONY: release
151+
release:
152+
svn up
153+
$(MAKE) doc
154+
test -z "$$(svn status -q)" || exit 1
155+
rm -rf release/atd-$(VERSION)
156+
mkdir -p release/atd-$(VERSION)
157+
mkdir -p release/atd-$(VERSION)/odoc
158+
mkdir -p release/atd-$(VERSION)/manual
159+
find `svn ls | grep -v manual` | cpio -pvd release/atd-$(VERSION)
160+
cd manual; find `svn ls` | cpio -pvd ../release/atd-$(VERSION)/manual
161+
cp manual/atd-manual.pdf release/atd-$(VERSION)/manual
162+
cp manual/atd-manual.txt release/atd-$(VERSION)/manual
163+
cp manual/atd-manual.html release/atd-$(VERSION)/manual
164+
find odoc/* | cpio -pvd release/atd-$(VERSION)
165+
cd release && tar czf atd-$(VERSION).tar.gz atd-$(VERSION)

0 commit comments

Comments
 (0)