1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
-include Makefile.config
all: opam-lib opam opam-admin opam-installer
@
ALWAYS:
@
opam-lib opam opam-admin opam-installer all: ALWAYS
#backwards-compat
compile with-ocamlbuild: all
@
install-with-ocamlbuild: install
@
libinstall-with-ocamlbuild: libinstall
@
byte:
$(MAKE) all USE_BYTE=true
src/%:
$(MAKE) -C src $*
%:
$(MAKE) -C src $@
lib-ext:
$(MAKE) -C src_ext lib-ext
download-ext:
$(MAKE) -C src_ext archives
clean-ext:
$(MAKE) -C src_ext distclean
clean:
$(MAKE) -C src $@
$(MAKE) -C doc $@
OPAMINSTALLER_FLAGS = --prefix $(DESTDIR)$(prefix)
OPAMINSTALLER_FLAGS += --mandir $(DESTDIR)$(mandir)
# With ocamlfind, prefer to install to the standard directory rather
# than $(prefix) if there are no overrides
ifndef DESTDIR
ifneq ($(OCAMLFIND),no)
LIBINSTALL_DIR ?= $(shell $(OCAMLFIND) printconf destdir)
endif
endif
ifneq ($(LIBINSTALL_DIR),)
OPAMINSTALLER_FLAGS += --libdir $(LIBINSTALL_DIR)
endif
libinstall:
$(if $(wildcard src_ext/lib/*),$(error Installing the opam libraries is incompatible with embedding the dependencies. Run 'make clean-ext' and try again))
src/opam-installer $(OPAMINSTALLER_FLAGS) opam-lib.install
install:
src/opam-installer $(OPAMINSTALLER_FLAGS) opam.install
libuninstall:
src/opam-installer -u $(OPAMINSTALLER_FLAGS) opam-lib.install
uninstall:
src/opam-installer -u $(OPAMINSTALLER_FLAGS) opam.install
.PHONY: tests tests-local tests-git
tests: opam opam-admin opam-check
$(MAKE) -C tests all
# tests-local, tests-git
tests-%: opam opam-admin opam-check
$(MAKE) -C tests $*
.PHONY: doc
doc: all
$(MAKE) -C doc
.PHONY: man man-html
man man-html: opam opam-admin opam-installer
$(MAKE) -C doc $@
configure: configure.ac m4/*.m4
aclocal -I m4
autoconf
release-tag:
git tag -d latest || true
git tag -a latest -m "Latest release"
git tag -a $(version) -m "Release $(version)"
$(OPAM_FULL).tar.gz:
$(MAKE) -C src_ext distclean
$(MAKE) -C src_ext downloads
rm -f $(OPAM_FULL) $(OPAM_FULL).tar.gz
ln -s .
prefast: ALWAYS
@if [ -n "$(wildcard src/*/*.cmi)" ]; then $(MAKE) -C src clean; fi
$(MAKE) -C src core/opamGitVersion.ml core/opamScript.ml
@ocp-build -init
fast: prefast
@ocp-build
@ln -sf ../_obuild/opam/opam.asm src/opam
@ln -sf ../_obuild/opam-admin/opam-admin.asm src/opam-admin
@ln -sf ../_obuild/opam-installer/opam-installer.asm src/opam-installer
@ln -sf ../_obuild/opam-check/opam-check.asm src/opam-check
fastclean:
@ocp-build -clean 2>/dev/null || ocp-build clean 2>/dev/null
@rm -f $(addprefix src/, opam opam-admin opam-installer opam-check)
cold:
./shell/bootstrap-ocaml.sh
env PATH=$$PATH:`pwd`/bootstrap/ocaml/bin ./configure $(CONFIGURE_ARGS)
env PATH=$$PATH:`pwd`/bootstrap/ocaml/bin $(MAKE) lib-ext
env PATH=$$PATH:`pwd`/bootstrap/ocaml/bin $(MAKE)
|