[OCaml] Commit missing parts of r210395
[oota-llvm.git] / bindings / ocaml / llvm / Makefile
index 3a06fb6a9abb6ad5292df917b77adeaa7eb54b94..850f564a0c2239b7935d05d5c2f8036086ea1d04 100644 (file)
@@ -1,4 +1,4 @@
-##===- bindings/ocaml/bitwriter/Makefile -------------------*- Makefile -*-===##
+##===- bindings/ocaml/llvm/Makefile ------------------------*- Makefile -*-===##
 # 
 #                     The LLVM Compiler Infrastructure
 #
 
 LEVEL := ../../..
 LIBRARYNAME := llvm
-DONT_BUILD_RELINKED := 1
 UsedComponents := core
-UsedOcamLibs := llvm
+UsedOcamlLibs := llvm
 
 include ../Makefile.ocaml
+
+all-local:: copy-meta
+install-local:: install-meta
+uninstall-local:: uninstall-meta
+
+DestMETA := $(PROJ_libocamldir)/META.llvm
+
+# Easy way of generating META in the objdir
+copy-meta: $(OcamlDir)/META.llvm
+
+$(OcamlDir)/META.llvm: META.llvm
+       $(Verb) $(CP) -f $< $@
+
+install-meta:: $(OcamlDir)/META.llvm
+       $(Echo) "Install $(BuildMode) $(DestMETA)"
+       $(Verb) $(MKDIR) $(PROJ_libocamldir)
+       $(Verb) $(DataInstall) $< "$(DestMETA)"
+
+uninstall-meta::
+       $(Echo) "Uninstalling $(DestMETA)"
+       -$(Verb) $(RM) -f "$(DestMETA)"
+
+.PHONY: copy-meta install-meta uninstall-meta