From bd922f26cde6f3b398ba60ab2ea222cc2b1e349b Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Thu, 23 Aug 2018 13:01:00 -0500 Subject: [PATCH] Make fm-common build a bit more portable Specifically get the psql include path from pg_config as libpq-fe.h is in different places on RHEL-based and Debian-based systems. Also add -f to symlink command in install because we can't assume DEST_DIR is empty. This is in support of Austin's DevStack wirk in stx-config started in https://review.openstack.org/#/c/586443/, in my case because all of my DevStack VMs run Ubuntu xenial. Needed-by: https://review.openstack.org/595865 Change-Id: I8db0579225487e6b31fe8a5ed88a29820bda7d69 Signed-off-by: Dean Troyer --- fm-common/sources/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fm-common/sources/Makefile b/fm-common/sources/Makefile index dc495254..8348e90f 100755 --- a/fm-common/sources/Makefile +++ b/fm-common/sources/Makefile @@ -5,7 +5,7 @@ CLI_SRCS = fm_cli.cpp OBJS = $(SRCS:.cpp=.o) CLI_OBJS = fm_cli.o LDLIBS = -lstdc++ -lrt -luuid -lpq -lpthread -lpython2.7 -INCLUDES = -I./ +INCLUDES = -I./ -I$(shell pg_config --includedir) CCFLAGS = -g -O2 -Wall -Werror -fPIC LIBFMCOMMON_SO := libfmcommon.so @@ -35,6 +35,5 @@ install_non_bb: install -m 644 fmThread.h $(DEST_DIR)$(INC_DIR) install -m 644 fmAlarm.h $(DEST_DIR)$(INC_DIR) install -m 755 $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(DEST_DIR)$(LIB_DIR) - ln -s $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(DEST_DIR)$(LIB_DIR)/$(LIBFMCOMMON_SO).$(MAJOR) - ln -s $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(DEST_DIR)$(LIB_DIR)/$(LIBFMCOMMON_SO) - + ln -sf $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(DEST_DIR)$(LIB_DIR)/$(LIBFMCOMMON_SO).$(MAJOR) + ln -sf $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(DEST_DIR)$(LIB_DIR)/$(LIBFMCOMMON_SO)