A GNU automake problem
- From: "Daniel Haude" <dunno stoptrick com>
- To: gtk-app-devel-list gnome org
- Subject: A GNU automake problem
- Date: Fri, 09 Jun 2006 08:54:57 +0200
Hello folks,
this question is a bit off-topic in this group; however, it is related to
a GTK-based application I'm writing, so bear with me.
I'm trying to get automake to set a compiler flag when compiling a
specific binary. My Makefile.am looks (in part) like this:
------------
CFLAGS = -W -Wall -ansi -pedantic -g
[...]
bin_PROGRAMS = ctops-gui gen_gui_data
gen_gui_data_SOURCES = \
gen_gui_data.c \
[...]
ctops_gui_SOURCES = \
main.c \
[...]
gui_data.c gui_data.h : gen_gui_data
./gen_gui_data
gen_gui_data_CFLAGS = -DCODE_GENERATOR
[...]
------------
Well, this just doesn't work. The -DCODE_GENERATOR option isn't set
when compiling the sources for gen_gui_data. I looked at the resulting
Makefile, and sure enough at some point it contains the line
gen_gui_data_CFLAGS = -DCODE_GENERATOR
but the gen_gui_data_CFLAGS variable isn't used at any point.
Says the Autotools doc:
--------------
Automake allows you to set compilation flags on a per-program (or
per-library) basis.
[...]
These per-target compilation flags are [...] _CFLAGS,
[...]
-------------
So why doesn't it work? I tried it in both versions 1.4-p6 and 1.9.5.
--
dunno stoptrick com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]