As it says, the problem is you're using a GNUism in your Makefile.am
, when it's only meant to contain portable Makefile code.
Either rewrite your code so it's portable (you should use AM_CPPFLAGS
because you're passing flags to the preprocessor, not the compiler):
AM_CPPFLAGS = -I$(EXTRAS_INCLUDE_DIR) -I$(top_srcdir) -DMY_REVISION=`cat $(top_srcdir)/$(MY_REVISION_FILE)`
If you don't want to invoke cat
on every compile, you could find the value in configure.ac
and either AC_SUBST
it into Makefile
or AC_DEFINE
it so it goes into config.h
.
Or if you want to be non-portable (ಠ_ಠ), you can take -Werror
out of your AM_INIT_AUTOMAKE
or AUTOMAKE_OPTIONS
, or add -Wno-portability
.