[m-rev.] diff: fix a problem on OS X when building using --use-mmc-make
Julien Fischer
jfischer at opturion.com
Fri Jan 8 23:57:43 AEDT 2016
Fix a problem on OS X when building using --use-mmc-make.
The install names for Mercury shared libraries in the system were not being set
when building using --use-mmc-make. The existing code in the Mmakefiles that
does this only works for mmake, not mmc --make.
browser/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
ssdb/Mmakefile:
When using --use-mmc-make set up the options to set the dylib install
names in such a way that mmc --make can see them.
Don't hardcode the library names in the definitions that set the
library install names.
Julien.
diff --git a/browser/Mmakefile b/browser/Mmakefile
index c03ec82..ff8d063 100644
--- a/browser/Mmakefile
+++ b/browser/Mmakefile
@@ -88,8 +88,13 @@ MCFLAGS += --flags MDB_FLAGS $(CONFIG_OVERRIDE)
# linker, so we disable the mmc option which causes the -install_name option
# to be passed in the .dep files.
+ifeq ($(MMAKE_USE_MMC_MAKE),yes)
+MCFLAGS += --ld-libflags \
+ "-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(BROWSER_LIB_NAME).dylib"
+else
LD_LIBFLAGS-libmer_browser.dylib = -install_name \
- $(FINAL_INSTALL_MERC_LIB_DIR)/libmer_browser.dylib
+ $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(BROWSER_LIB_NAME).dylib
+endif
#-----------------------------------------------------------------------------#
diff --git a/library/Mmakefile b/library/Mmakefile
index 9812984..2c51d95 100644
--- a/library/Mmakefile
+++ b/library/Mmakefile
@@ -147,8 +147,13 @@ LN = ln
# linker, so we disable the mmc option which causes the -install_name option
# to be passed in the .dep files.
+ifeq ($(MMAKE_USE_MMC_MAKE),yes)
+MCFLAGS += --ld-libflags \
+ "-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(STD_LIB_NAME).dylib"
+else
LD_LIBFLAGS-libmer_std.dylib = -install_name \
- $(FINAL_INSTALL_MERC_LIB_DIR)/libmer_std.dylib
+ $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(STD_LIB_NAME).dylib
+endif
#-----------------------------------------------------------------------------#
diff --git a/mdbcomp/Mmakefile b/mdbcomp/Mmakefile
index c83f778..d272f5e 100644
--- a/mdbcomp/Mmakefile
+++ b/mdbcomp/Mmakefile
@@ -77,8 +77,13 @@ endif
# linker, so we disable the mmc option which causes the -install_name option
# to be passed in the .dep files.
+ifeq ($(MMAKE_USE_MMC_MAKE),yes)
+MCFLAGS += --ld-libflags \
+ "-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(MDBCOMP_LIB_NAME).dylib"
+else
LD_LIBFLAGS-libmer_mdbcomp.dylib = -install_name \
- $(FINAL_INSTALL_MERC_LIB_DIR)/libmer_mdbcomp.dylib
+ $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(MDBCOMP_LIB_NAME).dylib
+endif
#-----------------------------------------------------------------------------#
diff --git a/ssdb/Mmakefile b/ssdb/Mmakefile
index be89685..ea51cbc 100644
--- a/ssdb/Mmakefile
+++ b/ssdb/Mmakefile
@@ -88,8 +88,13 @@ MCFLAGS += --flags SSDB_FLAGS $(CONFIG_OVERRIDE)
# linker, so we disable the mmc option which causes the -install_name option
# to be passed in the .dep files.
+ifeq ($(MMAKE_USE_MMC_MAKE),yes)
+MCFLAGS += --ld-libflags \
+ "-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(SSDB_LIB_NAME).dylib"
+else
LD_LIBFLAGS-libmer_ssdb.dylib = -install_name \
- $(FINAL_INSTALL_MERC_LIB_DIR)/libmer_ssdb.dylib
+ $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(SSDB_LIB_NAME).dylib
+endif
#-----------------------------------------------------------------------------#
More information about the reviews
mailing list