Split 'make install' into separate 'make install-opt' and 'make install-byte' (Sylvai...
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 4 Jul 2008 14:28:44 +0000 (15:28 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 4 Jul 2008 14:28:44 +0000 (15:28 +0100)
Makefile.in
examples/Makefile.in
libvirt/Makefile.in
mlvirsh/Makefile.in

index c8b5210..179b315 100644 (file)
@@ -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
index 6fd8093..9bed8ec 100644 (file)
@@ -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
index bca1cdf..4a86313 100644 (file)
@@ -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
index 23d6e1e..5c294c7 100644 (file)
@@ -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