automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake with defines


From: Marko Mlinar
Subject: Re: automake with defines
Date: Fri, 21 Dec 2001 08:33:25 +0100

> >>> "Marko" == Marko Mlinar <address@hidden> writes:
> [...]
>  Marko> The problem is, each test should be compiled with different
defines
> [...]
>  Marko> Basically I would need something like prog_CFLAGS.
>
> I think something like this should work:
>
> TESTS = foo bar ...
> EXTRA_PROGRAMS = foo bar ...
> foo_SOURCES = foobar.c foo.h
> foo_CFLAGS = -DNAME=foo
> bar_SOURCES = foobar.c bar.h
> bar_CFLAGS = -DNAME=bar

I've done the following:
a.c:
#ifdef XXX
#warning xxx defined
#endif
main(){}

Makefile.am:
bin_PROGRAMS=a
a_SOURCES=a.c
a_CFLAGS=-DXXX

configure.in
AC_INIT(a.c)
dnl AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(a, 1.3)
AC_REVISION([aa] AC_ACVERSION)

dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_CC
AC_ARG_PROGRAM
AC_OUTPUT(Makefile)

automake --version:
automake (GNU automake) 1.4

And it does not work. I've searched the Makefile, and it contains only one
occurence of "a_CFLAGS".
Am I doing something wrong? I have a feeling that _CFLAGS is not supported
with my version.

Marko





reply via email to

[Prev in Thread] Current Thread [Next in Thread]