[Build-common-hackers] Bug#205743: cdbs: shouldn't clobber CFLAGS in makefile
Andres Salomon
Andres Salomon <dilinger@voxel.net>, 205743@bugs.debian.org
Sat, 16 Aug 2003 16:32:14 -0400
Package: cdbs
Version: 0.4.5.2
Severity: normal
I'm attempting to convert keepalived to cdbs; however, it would appear that
the autotools.mk rules expect automake to be used. Keepalived uses only
autoconf; in one of its Makefile.in's, it contains the following:
CC = @CC@
INCLUDES = -I../include -I../../lib
CFLAGS = @CFLAGS@ $(INCLUDES) \
-Wall -Wunused -Wstrict-prototypes
DEFS = -D@KERN@ -D@IPVS_SUPPORT@ -D@VRRP_SUPPORT@ @DFLAGS@
COMPILE = $(CC) $(CFLAGS) $(DEFS)
.c.o:
$(COMPILE) -c $<
When using a rules file similar to:
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
DEB_CONFIGURE_EXTRA_FLAGS := --with-kernel-dir=$(CURDIR)/debian
the CFLAGS in the makefile gets clobbered. It's set correctly during
configuration; the resulting Makefile contains:
CFLAGS = -g -Wall -O2 -I/home/dilinger/keepalived-1.0.3/debian/include $(INCLUDES) \
-Wall -Wunused -Wstrict-prototypes
Unfortunately, DEB_MAKE_INVOKE appears to expect automake to have put
upstream CFLAGS into CFLAGS_<pkg>, and clobbers CFLAGS. If I rename
the CFLAGS variable in Makefile.in to CFLAGS_keepalived, it allows keepalived
to compile, but this really shouldn't be necessary.
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux wax 2.4.21 #1 Wed Jul 9 14:15:24 EDT 2003 i686
Locale: LANG=C, LC_CTYPE=C
-- no debconf information