Skip to content

Commit

Permalink
Minor fixes in Makefiles for the OCaml bindings:
Browse files Browse the repository at this point in the history
1. Interface files (.mli) are installed before compiled interface
   files (.cmi) to preserve timestamp relation.
2. install-meta should use $(OcamlDir) instead of $(ObjDir).
3. Declared some targets as .PHONY.

Patch by Christophe Raffalli.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144183 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Wojciech Matyjewicz committed Nov 9, 2011
1 parent b80ada9 commit 6f274a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions bindings/ocaml/Makefile.ocaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ clean-cmis::
# Also install the .mli's (headers) as documentation.
install-cmis: $(OutputsCMI) $(OcamlHeaders)
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \
$(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \
$(DataInstall) $(OcamlDir)/$$i "$(PROJ_libocamldir)/$$i"; \
done
$(Verb) for i in $(OcamlHeaders:$(ObjDir)/%=%); do \
$(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \
$(DataInstall) $(ObjDir)/$$i "$(PROJ_libocamldir)/$$i"; \
done
$(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \
$(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \
$(DataInstall) $(OcamlDir)/$$i "$(PROJ_libocamldir)/$$i"; \
done

uninstall-cmis::
$(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \
Expand Down
6 changes: 4 additions & 2 deletions bindings/ocaml/llvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ copy-meta: $(OcamlDir)/META.llvm
$(OcamlDir)/META.llvm: META.llvm
$(Verb) $(CP) -f $< $@

install-meta:: $(ObjDir)/META.llvm
install-meta:: $(OcamlDir)/META.llvm
$(Echo) "Install $(BuildMode) $(DestMETA)"
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) $(DataInstall) META.llvm "$(DestMETA)"
$(Verb) $(DataInstall) $< "$(DestMETA)"

uninstall-meta::
$(Echo) "Uninstalling $(DestMETA)"
-$(Verb) $(RM) -f "$(DestMETA)"

.PHONY: copy-meta install-meta uninstall-meta

0 comments on commit 6f274a5

Please sign in to comment.