Re: [PATCH XFSPROGS 2/3] Build without enabling DEBUG by default

Christoph Hellwig
2011-07-22T18:38:34Z

On Fri, Jul 22, 2011 at 02:30:48PM -0400, Ted Ts'o wrote:
> I added some debugging statements in libxfs/Makefile, and found this
> (see below).

You can get most of this by simply using make V=1, not just in xfsprogs,
but in most projects using silent make output (including those using
automake)

> It looks like the problem is that GNU make 3.81 is doing an immediate
> expansion of this line in builddefs:

I'm having GNU make 3.81 on most of my test systems as well, so that
alone can't be the whole issue.

> CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
>

> LTCOMPILE is /bin/sh ../libtool --quiet --tag=CC --mode=compile gcc -I/kbuild/xfstests/bld/include -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall

A typical V=1 compile line looks like:

/bin/bash ../libtool --quiet --tag=CC --mode=compile gcc -I. -g -O2 -DNDEBUG -DVERSION=\"3.1.5\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -c xfs_dir2_sf.c

for me. The biggest thing is that you have another directory in your
include path. How did you add that one? Did you add anything else
special to the ./configure or make command lines?