bug-automake
[Top][All Lists]
Advanced

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

DEFAULT_INCLUDES not always defined in all Makefiles


From: Ralph Schleicher
Subject: DEFAULT_INCLUDES not always defined in all Makefiles
Date: 28 Aug 2004 22:57:54 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

automake (GNU automake) 1.9

Hi,

if AC_CONFIG_HEADER is defined in configure.ac, Automake only defines
the variable DEFAULT_INCLUDES in a Makefile iff it detects by itself
that it has to compile a source file.  This behaviour is suboptimal
for me.

I use a libtool wrapper script called mextool for building Matlab
MEX-files (modules in libtool jargon).  A typical Makefile.am looks
like this:

------------------------------------------------------------------------
MEXFILES = foo.$(MEXEXT) bar.$(MEXEXT) baz.$(MEXEXT)
EXTRA_DIST = foo.c bar.c baz.c

include $(top_srcdir)/mextool.am
------------------------------------------------------------------------

The file mextool.am has the following (relevant) contents:

------------------------------------------------------------------------
.c.$(MEXEXT):
        $(MEXTOOL) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
        $(AM_MEXFLAGS) $(MEXFLAGS) $< $(AM_MEXLDADD) $(MEXLDADD)

.PHONY: all-mextool
all-local: all-mextool
all-mextool: $(MEXFILES)
        @:
------------------------------------------------------------------------

Running make gives the following output:

/bin/sh ../mextool -DHAVE_CONFIG_H   \
 -O ../../foo/foo.c
../../foo/foo.c:17:20: config.h: No such file or directory

It would be nice if Automake provides a way to define *all* its
variables in *all* Makefiles.  Thanks,

-- 
Ralph

4299 days of Linux experience.




reply via email to

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