[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#69487: the example for using nostrip in DEB_BUILD_OPTIONS is incorrect



On 20-Aug-00, 15:24 (CDT), Ben Collins <bcollins@debian.org> wrote: 
> The nostrip check needs to be inside the debug check. Because of you are
> not compiling with debugging turned on, there's no reason to not strip the
> binaries. So (note, the blank should go first):
> 
> ifneq "" "$(findstring debug,$(DEB_BUILD_OPTIONS))"
>   CFLAGS += -g
>   ifeq "" "$(findstring nostrip,$(DEB_BUILD_OPTIONS))"
>     INSTALL += -s
>   endif
> endif

While I agree with the philosophy, this code snippet is wrong, as
it will add the "-s" iff DEB_BUILD_OPTIONS includes "debug" but not
"nostrip".

Hmm, so is the example in the policy manual...if DEB_BUILD_OPTIONS is
unset, INSTALL is 'install', not 'install -s'.

Here's a correct version:

CFLAGS = -O2 -Wall
INSTALL = install

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  INSTALL += -s
endif

(note the second conditional is 'ifeq', not 'ifneq'.)

Steve




Reply to: