Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 113 lines (89 sloc) 2.384 kb
334250b @samoht [build] simplified autoconf scripts
samoht authored
1 include Makefile.config
c226d2c @samoht [build] few tweaks to the autoconf scripts
samoht authored
2
334250b @samoht [build] simplified autoconf scripts
samoht authored
3 LOCAL_OCPBUILD=./ocp-build/ocp-build
2e9698e @samoht [build] fix install when no native code is available
samoht authored
4 OCPBUILD ?= $(LOCAL_OCPBUILD)
334250b @samoht [build] simplified autoconf scripts
samoht authored
5 SRC_EXT=src_ext
cc0cd67 @samoht Remove opam-repo-convert
samoht authored
6 TARGETS = opam opam-mk-repo
750fc50 @samoht Add a first build skeleton
samoht authored
7
8 .PHONY: all
9
7f7724c @samoht Add a basic META.in file
samoht authored
10 all: $(LOCAL_OCPBUILD) META
061a376 @samoht [build] fix build to use the latest version of ocaml-re
samoht authored
11 $(MAKE) clone
12 $(MAKE) compile
750fc50 @samoht Add a first build skeleton
samoht authored
13
8d1116a ocp-build: update with most recent version
Fabrice Le Fessant authored
14 scan: $(LOCAL_OCPBUILD)
750fc50 @samoht Add a first build skeleton
samoht authored
15 $(OCPBUILD) -scan
8d1116a ocp-build: update with most recent version
Fabrice Le Fessant authored
16 sanitize: $(LOCAL_OCPBUILD)
750fc50 @samoht Add a first build skeleton
samoht authored
17 $(OCPBUILD) -sanitize
8d1116a ocp-build: update with most recent version
Fabrice Le Fessant authored
18 byte: $(LOCAL_OCPBUILD)
750fc50 @samoht Add a first build skeleton
samoht authored
19 $(OCPBUILD) -byte
8d1116a ocp-build: update with most recent version
Fabrice Le Fessant authored
20 opt: $(LOCAL_OCPBUILD)
750fc50 @samoht Add a first build skeleton
samoht authored
21 $(OCPBUILD) -asm
9948172 @samoht add str.cma to unixrun (useful to bootstrap ocp-get, as dose and cudf ar...
samoht authored
22
8d1116a ocp-build: update with most recent version
Fabrice Le Fessant authored
23 $(LOCAL_OCPBUILD): ocp-build/ocp-build.boot ocp-build/win32_c.c
24 $(MAKE) -C ocp-build
750fc50 @samoht Add a first build skeleton
samoht authored
25
8fcaae2 @samoht [build] add a 'prepare' target to use packages installed on the system i...
samoht authored
26 OCAMLFIND_DIR=$(shell ocamlfind printconf destdir)
27 prepare: depends.ocp.in
28 sed "s|%{lib}%|$(OCAMLFIND_DIR)|g" depends.ocp.in > depends.ocp
29
8d1116a ocp-build: update with most recent version
Fabrice Le Fessant authored
30 compile: $(LOCAL_OCPBUILD)
750fc50 @samoht Add a first build skeleton
samoht authored
31 $(OCPBUILD) -init -scan -sanitize $(TARGET)
32
8d1116a ocp-build: update with most recent version
Fabrice Le Fessant authored
33 clone:
cef3112 @cago Moved external source in src_ext/
cago authored
34 $(MAKE) -C $(SRC_EXT)
750fc50 @samoht Add a first build skeleton
samoht authored
35
36 clean:
b1c2162 @samoht Fix Makefile
samoht authored
37 rm -rf _obuild
5c162f0 @tuong clean generated files
tuong authored
38 rm -f *.annot src/*.annot
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
794cbf8 ocp-build: remove useless directory boot
Fabrice Le Fessant authored
41 $(MAKE) -C ocp-build clean
750fc50 @samoht Add a first build skeleton
samoht authored
42
cef3112 @cago Moved external source in src_ext/
cago authored
43 distclean: clean
ecb59f9 @samoht Fix distclean target
samoht authored
44 rm -f META Makefile.config src/opamVersion.ml config.log config.status
cef3112 @cago Moved external source in src_ext/
cago authored
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 path...
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:
2e9698e @samoht [build] fix install when no native code is available
samoht authored
59 if [ -e _obuild/$*/$*.asm ]; then \
60 cp _obuild/$*/$*.asm $(prefix)/bin/$*; \
61 else \
62 cp _obuild/$*/$*.byte $(prefix)/bin/$*; \
63 fi
334250b @samoht [build] simplified autoconf scripts
samoht authored
64
7f7724c @samoht Add a basic META.in file
samoht authored
65 META: META.in
334250b @samoht [build] simplified autoconf scripts
samoht authored
66 sed 's/@VERSION@/$(version)/g' < $< > $@
7f7724c @samoht Add a basic META.in file
samoht authored
67
b3f54cb @samoht [build] add a libinstall target
samoht authored
68 .PHONY: uninstall install
f09920f @samoht Start fixing the converter from 0.3 to 0.4
samoht authored
69 install:
c226d2c @samoht [build] few tweaks to the autoconf scripts
samoht authored
70 mkdir -p $(prefix)/bin
f09920f @samoht Start fixing the converter from 0.3 to 0.4
samoht authored
71 $(MAKE) $(TARGETS:%=%-install)
c226d2c @samoht [build] few tweaks to the autoconf scripts
samoht authored
72 mkdir -p $(mandir)/man1 && cp doc/man/* $(mandir)/man1
fc51e07 Added man-src, man, and a rule for Makefile
Vincent Bernardoff authored
73
74 uninstall:
c226d2c @samoht [build] few tweaks to the autoconf scripts
samoht authored
75 rm -f $(prefix)/bin/opam*
76 rm -f $(mandir)/man1/opam*
e04535c @samoht Add API documentation
samoht authored
77
b3f54cb @samoht [build] add a libinstall target
samoht authored
78 LIB = opam-lib
aa67aa9 @samoht Big refactoring work.
samoht authored
79 CMI = $(shell ls src/*.mli)
b3f54cb @samoht [build] add a libinstall target
samoht authored
80 _FILES= $(LIB:%=%.a) $(LIB:%=%.cma) $(LIB:%=%.cmxa)\
81 $(CMI:%=%.cmi)
82 FILES = $(_FILES:%=_obuild/opam-lib/%)
022a533 @samoht [build] libinstall depends on META
samoht authored
83
84 .PHONY: libuninstall libinstall
85 libinstall: META
b3f54cb @samoht [build] add a libinstall target
samoht authored
86 ocamlfind install opam META $(FILES)
87 libuninstall:
88 ocamlfind remove opam
89
e04535c @samoht Add API documentation
samoht authored
90 doc: compile
e7eb612 @samoht Move all the doc-related stuff into the same folder
samoht authored
91 mkdir -p doc/html/
e04535c @samoht Add API documentation
samoht authored
92 ocamldoc \
93 -I _obuild/opam-lib -I _obuild/cudf -I _obuild/dose \
aa67aa9 @samoht Big refactoring work.
samoht authored
94 -I _obuild/re -I _obuild/unix -I _obuild/extlib \
e04535c @samoht Add API documentation
samoht authored
95 -I _obuild/arg -I _obuild/graph \
0b3eeea @samoht Add a rule in Makefile to remove trailing blank lines in ml/mli
samoht authored
96 src/*.mli -html -d doc/html/
fc51e07 Added man-src, man, and a rule for Makefile
Vincent Bernardoff authored
97 $(MAKE) -C doc/man-src
a9db9b5 @samoht [doc] add a rule to generate the tutorials
samoht authored
98 $(MAKE) -C doc/tutorials
0b3eeea @samoht Add a rule in Makefile to remove trailing blank lines in ml/mli
samoht authored
99
100 trailing:
101 find src -name "*.ml*" -exec \
102 sed -i xxx -e :a -e "/^\n*$$/{$$d;N;ba" -e '}' {} \;
e7ed16f @samoht Update Makefile
samoht authored
103 find src -name "*xxx" -exec rm {} \;
812e1c9 @samoht [build] use the versions of ocaml-re and ocaml-arg
samoht authored
104
105 archive:
106 echo $(ARCHIVES)
107 $(MAKE) distclean
108 $(MAKE) clone
109 tar cz $(wildcard src_ext/*.tar.gz) > opam-extfiles.1.tar.gz
334250b @samoht [build] simplified autoconf scripts
samoht authored
110
111 configure: configure.ac m4/*.m4
112 aclocal -I m4
113 autoconf
Something went wrong with that request. Please try again.