-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. Allow you to build with just make pywrap or make PYTHON=/usr/bin/python3 pywrap -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5WqNMACgkQrlYvE4MpobPbdgCeN6l5jdZx4+S88V6+1JTMTF+h kNYAoLKtXZw6h9zJJEFw0pmVl1AUV9Qz =2Oab -----END PGP SIGNATURE-----
>From 47fee8030fe83a27d0de6be3eb214f421d03ce21 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Mon, 22 Aug 2011 09:46:59 -0400 Subject: [PATCH 06/77] libsemanage: python wrapper makefile changes Allow Change libsemanage Makefile to be able to build by default and to build if you change the version of Python Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- libsemanage/src/Makefile | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index d21e972..d9120c0 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -10,7 +10,8 @@ LIBDIR ?= $(PREFIX)/lib SHLIBDIR ?= $(PREFIX)/lib INCLUDEDIR ?= $(PREFIX)/include PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])') -PYINC ?= $(shell pkg-config --cflags `basename $(PYTHON)`) +PYINC ?= $(shell pkg-config --cflags $(PYPREFIX)) +PYTHONLIBDIR ?= $(shell pkg-config --libs $(PYPREFIX)) PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")') RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM') @@ -76,7 +77,7 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) $(CC) $(filter-out -Werror, $(CFLAGS)) -I$(RUBYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGSO): $(SWIGLOBJ) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@,-z,defs + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) $(PYTHONLIBDIR) -Wl,-soname,$@,-z,defs $(SWIGRUBYSO): $(SWIGRUBYLOBJ) $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@ -- 1.7.6