Note that this also points out a failure to meet policy manual 10.1, "Binaries":
"By default, when a package is being built, any binaries created should include debugging information, as well as being compiled with optimization." What's going wrong is that the build rule only passes CFLAGS in to the "jam0" bootstrap build; the Makefile then runs jam0 ($EXEFILE) with no arguments to build the "real" jam. The use of -sCCFLAGS=-g in the install rule is entirely pointless, jam has already been built at that point (I suggest actually deleting that from the install rule instead of leaving my comment :-) The relatively clean way seemed to be to add a JAMFLAGS option to let us pass in the -sCCFLAGS. You should probably add a -sDEBUG=1 -sOPTIM=-O2 as well, but since this bug isn't about that I didn't want to add the clutter. Index: debian/rules =================================================================== --- debian/rules (revision 63959) +++ debian/rules (working copy) @@ -23,10 +23,10 @@ dh_testdir # bootstrap - ${MAKE} + ${MAKE} CFLAGS='-g -D_FILE_OFFSET_BITS=64' JAMFLAGS='-sCCFLAGS=-D_FILE_OFFSET_BITS=64' # update generated files rm jamgram.c jamgram.h - ${MAKE} + ${MAKE} CFLAGS='-g -D_FILE_OFFSET_BITS=64' JAMFLAGS='-sCCFLAGS=-D_FILE_OFFSET_BITS=64' touch build-stamp @@ -47,6 +47,7 @@ dh_clean -k dh_installdirs +# note that CCFLAGS and OPTIM are pointless here, the build already happened above ./jam0 -sBINDIR=${topdir}/debian/${jam}/usr/bin \ -sCCFLAGS=-g -sOPTIM=-O2 \ install Index: Makefile =================================================================== --- Makefile (revision 63959) +++ Makefile (working copy) @@ -2,6 +2,7 @@ CC = cc CFLAGS = +JAMFLAGS = EXENAME = ./jam0 TARGET = -o $(EXENAME) @@ -59,7 +60,7 @@ rules.c scan.c search.c timestamp.c variable.c all: $(EXENAME) - $(EXENAME) + $(EXENAME) $(JAMFLAGS) $(EXENAME): $(CC) $(TARGET) $(CFLAGS) $(SOURCES) $(LINKLIBS) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]