automake
[Top][All Lists]
Advanced

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

Re: AM_CPPFLAGS not applied for CHECK programs?


From: Bob Friesenhahn
Subject: Re: AM_CPPFLAGS not applied for CHECK programs?
Date: Sun, 28 Aug 2005 16:42:29 -0500 (CDT)

As a follow-up to this posting, I see that when Automake generates a specific rule for a target built in a subdirectory, it forgets to include $(AM_CPPFLAGS). This is a serious error. For example:

coders/coders_art_la-art.lo: coders/art.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(coders_art_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coders/coders_art_la-art.lo -MD -MP -MF "coders/$(DEPDIR)/coders_art_la -art.Tpo" -c -o coders/coders_art_la-art.lo `test -f 'coders/art.c' || echo '$(srcdir)/'`coders/art.c; \ @am__fastdepCC_TRUE@ then mv -f "coders/$(DEPDIR)/coders_art_la-art.Tpo" "coders/$(DEPDIR)/coders_art_la-art.Plo"; else rm -f "coders/$(DEPDIR)/coders_art_la-art.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='coders/art.c' object='coders/coders_art_la-art.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(coders_art_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coders/coders_art_la-art.lo `test -f 'coders/art.c' || echo '$(srcdir)/'
`coders/art.c

Bob

On Sun, 28 Aug 2005, Bob Friesenhahn wrote:

I am using automake 1.9.6. Today I was shocked to learn that programs listed in check_PROGRAMS are not built using the same CPPFLAGS options as normal programs.

Normal code is built using

 $(AM_CPPFLAGS) $(CPPFLAGS)

but it appears that check programs are only being built using

 $(CPPFLAGS)

so the wrong header files may be used. If it makes any difference, I am using a non-recursive build, and the check programs are in a subdirectory.

In my Makefile.am I have been careful to define AM_CPPFLAGS so that it prepares the proper include path to use header files from the build and source directories. Without the extra AM_CPPFLAGS the build is incorrect or fails.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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