mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Track dependencies when creating symlinks to LLVM libraries next
to the ocaml bindings. This is required on Windows where 'ln -sf' actually creates a copy. Thanks to Alain Frisch for noticing this. llvm-svn: 44547
This commit is contained in:
parent
75a3208bb0
commit
90d6c0aea2
@ -70,11 +70,13 @@ OutputCMA := $(LibraryCMA:$(ObjDir)/%.cma=$(OcamlDir)/%.cma)
|
||||
OutputCMXA := $(LibraryCMXA:$(ObjDir)/%.cmxa=$(OcamlDir)/%.cmxa)
|
||||
OutputsCMI := $(ObjectsCMI:$(ObjDir)/%.cmi=$(OcamlDir)/%.cmi)
|
||||
OutputsCMX := $(ObjectsCMX:$(ObjDir)/%.cmx=$(OcamlDir)/%.cmx)
|
||||
OutputLibs := $(UsedLibNames:%=$(OcamlDir)/%)
|
||||
|
||||
# Installation targets
|
||||
DestA := $(PROJ_libocamldir)/lib$(LIBRARYNAME).a
|
||||
DestCMA := $(PROJ_libocamldir)/$(LIBRARYNAME).cma
|
||||
DestCMXA := $(PROJ_libocamldir)/$(LIBRARYNAME).cmxa
|
||||
DestLibs := $(UsedLibNames:%=$(PROJ_libocamldir)/%)
|
||||
|
||||
|
||||
##===- Dependencies -------------------------------------------------------===##
|
||||
@ -123,6 +125,30 @@ uninstall-a::
|
||||
-$(Verb) $(RM) -f $(DestA)
|
||||
|
||||
|
||||
##===- Deposit dependent libraries adjacent to Ocaml libs -----------------===##
|
||||
|
||||
all-local:: build-deplibs
|
||||
clean-local:: clean-deplibs
|
||||
install-local:: install-deplibs
|
||||
uninstall-local:: uninstall-deplibs
|
||||
|
||||
build-deplibs: $(OutputLibs)
|
||||
|
||||
$(OcamlDir)/%.a: $(LibDir)/%.a
|
||||
$(Verb) ln -sf $< $@
|
||||
|
||||
clean-deplibs:
|
||||
$(Verb) rm -f $(OutputLibs)
|
||||
|
||||
install-deplibs:
|
||||
$(Verb) for i in $(DestLibs:$(PROJ_libocamldir)/%=%); do \
|
||||
ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \
|
||||
done
|
||||
|
||||
uninstall-deplibs:
|
||||
$(Verb) rm -f $(DestLibs)
|
||||
|
||||
|
||||
##===- Build ocaml interfaces (.mli's -> .cmi's) --------------------------===##
|
||||
|
||||
all-local:: build-cmis
|
||||
@ -178,9 +204,6 @@ $(OutputCMA): $(LibraryCMA) $(OcamlDir)/.dir
|
||||
$(LibraryCMA): $(ObjectsCMO) $(OcamlDir)/.dir
|
||||
$(Echo) "Archiving $(notdir $@) for $(BuildMode) build"
|
||||
$(Verb) $(Archive.CMA) $@ $(ObjectsCMO)
|
||||
$(Verb) for i in $(UsedLibNames); do \
|
||||
ln -sf "$(LibDir)/$$i" "$(OcamlDir)/$$i"; \
|
||||
done
|
||||
|
||||
$(ObjDir)/%.cmo: $(ObjDir)/%.ml
|
||||
$(Echo) "Compiling $(notdir $<) for $(BuildMode) build"
|
||||
@ -193,16 +216,10 @@ install-cma:: $(OutputCMA)
|
||||
$(Echo) "Installing $(BuildMode) $(DestCMA)"
|
||||
$(Verb) $(MKDIR) $(PROJ_libocamldir)
|
||||
$(Verb) $(DataInstall) $(OutputCMA) "$(DestCMA)"
|
||||
$(Verb) for i in $(UsedLibNames); do \
|
||||
ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \
|
||||
done
|
||||
|
||||
uninstall-cma::
|
||||
$(Echo) "Uninstalling $(DestCMA)"
|
||||
-$(Verb) $(RM) -f $(DestCMA)
|
||||
$(Verb) for i in $(UsedLibNames); do \
|
||||
$(RM) -f "$(PROJ_libocamldir)/$$i"; \
|
||||
done
|
||||
|
||||
|
||||
##===- Build optimized ocaml archive (.ml's -> .cmx's -> .cmxa, .a) -------===##
|
||||
|
Loading…
x
Reference in New Issue
Block a user