Bug#69487: the example for using nostrip in DEB_BUILD_OPTIONS is incorrect
Package: debian-policy
Version: 3.2.0.0
Hi,
Section `4.1 Binaries' says:
CFLAGS = -O2 -Wall
INSTALL = install
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL += -s
endif
endif
The second ifneq needs to be ifeq.
Furthermore, I think this form would be a bit more readable:
ifneq "$(findstring debug,$(DEB_BUILD_OPTIONS))" ""
CFLAGS += -g
endif
ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
INSTALL += -s
endif
Or even:
ifeq "$(findstring debug,$(DEB_BUILD_OPTIONS))" "debug"
CFLAGS += -g
endif
ifneq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" "nostrip"
INSTALL += -s
endif
Or a combination :) Pick whichever people find nicest, as long as the logic
is correct.
--
Digital Electronic Being Intended for Assassination and Nullification
Reply to: