From e9a09381d1b441733fcb5b6a4ad630b53d1c1f14 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Split 'make install' into separate 'make install-opt' and 'make install-byte' (Sylvain Le Gall, via Debian) --- Makefile.in | 4 ++-- examples/Makefile.in | 2 +- libvirt/Makefile.in | 13 ++++++++++--- mlvirsh/Makefile.in | 8 +++++++- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index c8b5210..179b315 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,7 +27,7 @@ OCAMLDOCFLAGS := -html -sort SUBDIRS = libvirt mlvirsh examples -all opt depend install: +all opt depend install-opt install-byte: for d in $(SUBDIRS); do \ $(MAKE) -C $$d $@; \ if [ $$? -ne 0 ]; then exit 1; fi; \ @@ -143,4 +143,4 @@ winupload: force: .PHONY: all opt depend install clean distclean configure dist check-manifest \ - release release_stage_2 release_stage_3 force \ No newline at end of file + release release_stage_2 release_stage_3 force diff --git a/examples/Makefile.in b/examples/Makefile.in index 6fd8093..9bed8ec 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -54,6 +54,6 @@ node_info.opt: node_info.cmx $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \ ../libvirt/mllibvirt.cmxa -o $@ $< -install: +install-opt install-byte: include ../Make.rules diff --git a/libvirt/Makefile.in b/libvirt/Makefile.in index bca1cdf..4a86313 100644 --- a/libvirt/Makefile.in +++ b/libvirt/Makefile.in @@ -124,8 +124,15 @@ libvirt.cmi: libvirt.mli libvirt_version.cmo: libvirt_version.cmi libvirt_version.cmi: libvirt_version.mli -install: - ocamlfind install libvirt \ - ../META *.so *.a *.cmx *.cma *.cmxa *.cmi *.mli + +install-byte: + mkdir -p $(OCAMLDESTDIR) + ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore libvirt \ + ../META *.so *.a *.cma *.cmi *.mli + +install-opt: + mkdir -p $(OCAMLDESTDIR) + ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore libvirt \ + ../META *.so *.a *.cma *.cmx *.cmxa *.cmi *.mli include ../Make.rules diff --git a/mlvirsh/Makefile.in b/mlvirsh/Makefile.in index 23d6e1e..5c294c7 100644 --- a/mlvirsh/Makefile.in +++ b/mlvirsh/Makefile.in @@ -84,10 +84,16 @@ mlvirsh.opt: $(XOBJS) ../libvirt/mllibvirt.cmxa -o $@ $^ endif -install: +install-opt: if [ -x mlvirsh.opt ]; then \ mkdir -p $(DESTDIR)$(bindir); \ $(INSTALL) -m 0755 mlvirsh.opt $(DESTDIR)$(bindir)/mlvirsh; \ fi +install-byte: + if [ -x mlvirsh ]; then \ + mkdir -p $(DESTDIR)$(bindir); \ + $(INSTALL) -m 0755 mlvirsh $(DESTDIR)$(bindir)/mlvirsh; \ + fi + include ../Make.rules -- 1.8.3.1