On Fri, 2011-09-16 at 08:39 -0400, Stephen Smalley wrote: > On Thu, 2011-09-15 at 22:32 +0200, Guido Trentalancia wrote: > > > diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile > > > index 7680008..4651616 100644 > > > --- a/libselinux/src/Makefile > > > +++ b/libselinux/src/Makefile > > > @@ -7,7 +7,8 @@ PYPREFIX ?= $(notdir $(PYTHON)) > > > # Installation directories. > > > PREFIX ?= $(DESTDIR)/usr > > > LIBDIR ?= $(PREFIX)/lib > > > -SHLIBDIR ?= $(PREFIX)/lib > > > +LIBSEPOLSTATIC ?= $(LIBDIR)/libsepol.a > > > > Hopefully the above won't override the exported one from top-level... > > It won't, because we use the ?= operator above. So it will take effect > if building in the libselinux directory, as for a per-package build, not > if building from top-level. > > > > @@ -54,7 +55,7 @@ SRCS= $(filter-out $(UNUSED_SRCS) $(GENERATED) audit2why.c, $(wildcard *.c)) > > > OBJS= $(patsubst %.c,%.o,$(SRCS)) > > > LOBJS= $(patsubst %.c,%.lo,$(SRCS)) > > > CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute > > > -override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) > > > +override CFLAGS += -I../include -I$(INCLUDEDIR) $(EXTRA_INCLUDES) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) > > > > It seems to me that you are giving the precedence to the system-wide > > includes. We want the EXTRA/LOCAL ones to have precedence over the > > system-wide ones, with the fall-back only for released components (which > > won't have EXTRA/LOCAL passed to them from a top-level Makefile). > > See the description of -I in the man page for gcc. The above will have > the desired effect. > > > > @@ -102,7 +103,7 @@ $(AUDIT2WHYLOBJ): audit2why.c > > > $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $< > > > > > > $(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) > > > - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux ${LIBDIR}/libsepol.a -L$(LIBDIR) -Wl,-soname,$@ > > > + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux $(LIBSEPOLSTATIC) -L$(LIBDIR) -Wl,-soname,$@ > > > > As long as the locally-defined LIBSEPOLSTATIC did not override the > > top-level exported one for builds from the whole git bundle (see > > above)... > > It won't. Yes, excellent, let's go for that then. Guido -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with the words "unsubscribe selinux" without quotes as the message.