[sane-devel] autoconf/configure and debug

Olaf Meeuwissen olaf.meeuwissen at avasys.jp
Tue Jun 14 23:07:31 UTC 2011


stef <stef.dev at free.fr> writes:

> 	in order to debug more efficiently, I have to re-edit Makefiles to remove 
> the two -O2 options in CFLAGS and change the -g to the -ggdb option. Is there 
> an easy way to get CFLAGS=-ggdb .... when configuring SANE ?

In addition to specifying CFLAGS at configure time, you can also give an
override at compile time, like so

  make CFLAGS="-ggdb -O0"

Of course, this will only affect those files that get recompiled but
with `make clean` (or selective removal of *.la and *.lo files) that
should be easy to control.

I use this approach quite a bit to avoid a time consuming configure step
and only override stuff for those files I want to focus on.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962



More information about the sane-devel mailing list