Hi, currently, the resulting binary is stripped unless $DEBUG was specified. But debug builds use less optimization etc. In some situations (e.g. building rpm packages) a non-debug build with symbols is needed because the resulting binary is stripped automatically but the stripped symbols are available in a separate package. Therefor in normal use cases (99%), the user does not suffer from special debug options but if more debugging information is needed, he can install the additional symbol data with having to compile the whole binary (which may not be possible on production systems).
The attached patch tries to implement a mechanism where the binary is not stripped if $OMIT_STRIPPING is set to "1". This setting overrides the $DEBUG setting when it comes to stripping. Please note that this patch is not well-tested and should be only seen as a formal proposal. fs
--- Makefile 2007-07-21 03:22:50.000000000 +0200
+++ Makefile.mod 2007-09-23 14:59:35.000000000 +0200
@@ -240,6 +240,16 @@
BINDIR=release
endif
+ifeq ($(OMIT_STRIPPING),1)
+ DO_STRIP=0
+else
+ ifeq ($(DEBUG),1)
+ DO_STRIP=0
+ else
+ DO_STRIP=1
+ endif
+endif
+
DEFINES=-DPYLUCENE_VER="\"$(VERSION)\"" -DLUCENE_VER="\"$(LUCENE_VER)\""
JCCFLAGS=--encoding=UTF-8
@@ -798,7 +808,7 @@
else
ld -dynamic -bundle -o $@ $(LDFLAGS) $(JAVA_OBJS) $(CPP_OBJS) /usr/$(LIBDIR_NAME)/bundle1.o -L$(GCJ_LIBDIR) -framework System -bundle_loader $(PREFIX_FRAMEWORKS)/Python.framework/Versions/$(PYTHON_VER)/bin/python$(_SUFFIX) -F$(PREFIX_FRAMEWORKS) -framework Python -lgcj -lgcc_s$(LIBGCC_S_VER) -liconv -lstdc++ $(STUBS) -multiply_defined suppress
endif
-ifneq ($(DEBUG),1)
+ifeq ($(DO_STRIP),1)
$(STRIP) $@
endif
else
@@ -810,7 +820,7 @@
else
$(CXX) -shared -o $@ $(LDFLAGS) $(JAVA_OBJS) $(CPP_OBJS) -L$(GCJ_LIBDIR) -lgcj
endif
-ifneq ($(DEBUG),1)
+ifeq ($(DO_STRIP),1)
$(STRIP) $@
endif
else
@@ -823,7 +833,7 @@
ifeq ($(OS),Cygwin)
$(PYLUCENE_LIB): $(JAVA_OBJS) $(CPP_OBJS)
$(CXX) -shared -o $@ $(LDFLAGS) $(JAVA_OBJS) $(CPP_OBJS) `cygpath -aw $(PREFIX_PYTHON)/python$(subst .,,$(PYTHON_VER))$(_SUFFIX).dll` -L`cygpath -aw $(GCJ_LIBDIR)` -lgcj -liconv -lwin32k -lws2_32
-ifneq ($(DEBUG),1)
+ifeq ($(DO_STRIP),1)
$(dir $(CXX))$(STRIP) $@
endif
endif
@@ -850,7 +860,7 @@
for lib in $(LIB_INSTALL); do \
install $(GCJ_LIBDIR)/$$lib $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME); \
done
-ifneq ($(DEBUG),1)
+ifeq ($(DO_STRIP),1)
for lib in $(LIB_INSTALL); do \
$(STRIP) $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/$$lib; \
done
@@ -917,7 +927,7 @@
for lib in $(LIB_INSTALL); do \
install $(GCJ_LIBDIR)/$$lib $(DISTRIB)/gcj; \
done
-ifneq ($(DEBUG),1)
+ifeq ($(DO_STRIP),1)
for lib in $(LIB_INSTALL); do \
$(STRIP) $(DISTRIB)/gcj/$$lib; \
done
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ pylucene-dev mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
