aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorhattenberger2013-02-28 23:12:50 +0000
committerhattenberger2013-02-28 23:12:50 +0000
commit09ecabd57e3c16cf46058eecd19488751e61844c (patch)
tree0465dc47d9cf0c09514b28dfb76b512d5f9b561d /Makefile
parent3199b8cc673809d03ca5a0485b984ee17fe52ce3 (diff)
downloadivy-ocaml-09ecabd57e3c16cf46058eecd19488751e61844c.zip
ivy-ocaml-09ecabd57e3c16cf46058eecd19488751e61844c.tar.gz
ivy-ocaml-09ecabd57e3c16cf46058eecd19488751e61844c.tar.bz2
ivy-ocaml-09ecabd57e3c16cf46058eecd19488751e61844c.tar.xz
add intall options for OSX support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4e4438d..5be60dc 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,14 @@ DESTDIR ?=
#OCAMLFINDFLAGS += -destdir $(DESTDIR)
#endif
+# Set to "n" to disable backwards compatibility symlink creation
+COMPAT_SYMLINK_CREATE ?= y
+
+# Symlink source path modifier between $(DESTDIR)/`ocamlc -where`
+# and [glib]ivy/PKGFILES
+# For linux, nothing; for darwin "site-lib/" with trailing slash
+COMPAT_SYMLINK_SRCMOD ?=
+
DEBUG = n
@@ -91,11 +99,14 @@ install : $(LIBS)
mv META.glibivy META
ocamlfind install $(OCAMLFINDFLAGS) glibivy META $(GLIBIVY_INST_FILES)
mv META META.glibivy
-# make some symlinks for backwards compatibility
+ifeq ($(COMPAT_SYMLINK_CREATE), y)
+ # make some symlinks for backwards compatibility
+ @echo "Creating symlinks for backwards compatibility..."
$(foreach file,$(IVYLIBS) $(IVYSTATIC) $(IVYCMI) $(IVYMLI), \
- cd $(DESTDIR)/`ocamlc -where`; ln -s ivy/$(file) $(file);)
+ cd $(DESTDIR)/`ocamlc -where`; ln -s $(COMPAT_SYMLINK_SRCMOD)ivy/$(file) $(file);)
$(foreach file,$(GLIBIVYLIBS) $(GLIBIVYSTATIC) $(GLIBIVYCMI), \
- cd $(DESTDIR)/`ocamlc -where`; ln -s glibivy/$(file) $(file);)
+ cd $(DESTDIR)/`ocamlc -where`; ln -s $(COMPAT_SYMLINK_SRCMOD)glibivy/$(file) $(file);)
+endif
uninstall :
ocamlfind remove ivy