From 09ecabd57e3c16cf46058eecd19488751e61844c Mon Sep 17 00:00:00 2001 From: hattenberger Date: Thu, 28 Feb 2013 23:12:50 +0000 Subject: add intall options for OSX support --- Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Makefile') 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 -- cgit v1.1