Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 78 lines (61 sloc) 1.559 kB
d72de1d @samoht More cleanups
samoht authored
1 BIN = /usr/local/bin
750fc50 @samoht Add a first build skeleton
samoht authored
2 OCPBUILD ?= ./_obuild/unixrun ./boot/ocp-build.boot
cef3112 @cago Moved external source in src_ext/
cago authored
3 OCAMLC=ocamlc
4 SRC_EXT=src_ext
f09920f @samoht Start fixing the converter from 0.3 to 0.4
samoht authored
5 TARGETS = opam opam-mk-repo opam-repo-convert-0.3
750fc50 @samoht Add a first build skeleton
samoht authored
6
7 .PHONY: all
8
061a376 @samoht [build] fix build to use the latest version of ocaml-re
samoht authored
9 all: ./_obuild/unixrun
10 $(MAKE) clone
11 $(MAKE) compile
750fc50 @samoht Add a first build skeleton
samoht authored
12
13 scan: ./_obuild/unixrun
14 $(OCPBUILD) -scan
15 sanitize: ./_obuild/unixrun
16 $(OCPBUILD) -sanitize
17 byte: ./_obuild/unixrun
18 $(OCPBUILD) -byte
19 opt: ./_obuild/unixrun
20 $(OCPBUILD) -asm
21 ./_obuild/unixrun:
22 mkdir -p ./_obuild
cef3112 @cago Moved external source in src_ext/
cago authored
23 $(OCAMLC) -o ./_obuild/unixrun -make-runtime unix.cma str.cma
9948172 @samoht add str.cma to unixrun (useful to bootstrap ocp-get, as dose and cudf…
samoht authored
24
ac99a15 @samoht More WIP ...
samoht authored
25 bootstrap: _obuild/unixrun _obuild/opam/opam.byte
26 rm -f boot/opam.boot
27 ocp-bytehack -static _obuild/opam/opam.byte -o boot/opam.boot
750fc50 @samoht Add a first build skeleton
samoht authored
28
fd96a37 @samoht [build] symplify Makefile
samoht authored
29 compile: ./_obuild/unixrun
750fc50 @samoht Add a first build skeleton
samoht authored
30 $(OCPBUILD) -init -scan -sanitize $(TARGET)
31
cef3112 @cago Moved external source in src_ext/
cago authored
32 clone:
33 $(MAKE) -C $(SRC_EXT)
750fc50 @samoht Add a first build skeleton
samoht authored
34
35 clean:
b1c2162 @samoht Fix Makefile
samoht authored
36 rm -rf _obuild
2c9a85c @samoht More file spliting.
samoht authored
37 rm -rf src/*.annot bat/*.annot
ac99a15 @samoht More WIP ...
samoht authored
38 rm -f opam
b1c2162 @samoht Fix Makefile
samoht authored
39 rm -f ocp-build.*
cef3112 @cago Moved external source in src_ext/
cago authored
40 $(MAKE) -C $(SRC_EXT) clean
750fc50 @samoht Add a first build skeleton
samoht authored
41
cef3112 @cago Moved external source in src_ext/
cago authored
42 distclean: clean
b1c2162 @samoht Fix Makefile
samoht authored
43 rm -f *.tar.gz *.tar.bz2
cef3112 @cago Moved external source in src_ext/
cago authored
44 rm -rf _obuild _build
45 $(MAKE) -C $(SRC_EXT) distclean
7f510c5 @samoht Few makefile tweaks
samoht authored
46
ec59f94 @samoht [tests] make tests should test all the backends
samoht authored
47 .PHONY: tests
48
7f510c5 @samoht Few makefile tweaks
samoht authored
49 tests:
ec59f94 @samoht [tests] make tests should test all the backends
samoht authored
50 $(MAKE) -C tests all
51
52 tests-rsync:
53 $(MAKE) -C tests rsync
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored
54
638dc66 @samoht [build] add make tests-git target
samoht authored
55 tests-git:
56 $(MAKE) -C tests git
d72de1d @samoht More cleanups
samoht authored
57
58 %-install:
59 cp _obuild/$*/$*.asm $(BIN)/$*
60
61 .PHONY: install
f09920f @samoht Start fixing the converter from 0.3 to 0.4
samoht authored
62 install:
63 rm $(BIN)/opam*
64 $(MAKE) $(TARGETS:%=%-install)
e04535c @samoht Add API documentation
samoht authored
65
66 doc: compile
e7eb612 @samoht Move all the doc-related stuff into the same folder
samoht authored
67 mkdir -p doc/html/
e04535c @samoht Add API documentation
samoht authored
68 ocamldoc \
69 -I _obuild/opam-lib -I _obuild/cudf -I _obuild/dose \
70 -I _obuild/bat -I _obuild/unix -I _obuild/extlib \
71 -I _obuild/arg -I _obuild/graph \
0b3eeea @samoht Add a rule in Makefile to remove trailing blank lines in ml/mli
samoht authored
72 src/*.mli -html -d doc/html/
73
74 trailing:
75 find src -name "*.ml*" -exec \
76 sed -i xxx -e :a -e "/^\n*$$/{$$d;N;ba" -e '}' {} \;
e7ed16f @samoht Update Makefile
samoht authored
77 find src -name "*xxx" -exec rm {} \;
Something went wrong with that request. Please try again.