[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Autoreconf stops with "non-POSIX variable name"
From: |
Russ Allbery |
Subject: |
Re: Autoreconf stops with "non-POSIX variable name" |
Date: |
Fri, 29 Mar 2013 14:44:08 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
oborchert <address@hidden> writes:
> I created a Makefile.in where I read the content out of a file and pass
> it to CFLAGS. Calling ./configure ... the Makefile will be generated an
> all works well.
> Makefile.in:
> ...
> MY_REVISION_FILE=my-revision.txt
> MY_REVISION=$(shell cat $(top_srcdir)/$(MY_REVISION_FILE))
> AM_CFLAGS = -I$(EXTRAS_INCLUDE_DIR) -I$(top_srcdir)
> -DMY_REVISION=$(MY_REVISION)
> ...
> The problem arises once I moved the Makefile.in code into Makefile.am to
> allow the auto generation of Makefile.in. There calling autoreconf -i
> --force stops with the following error:
> server/Makefile.am:9: cat $(top_srcdir: non-POSIX variable name
> server/Makefile.am:9: (probably a GNU make extension)
> autoreconf: automake failed with exit status: 1
> This problem hunts me now since quite some time. I searched everywhere
> but did not find anything that could help me finding a solution for
> that. In short, the only thing I need is a way to get an uninterpreted
> text such as "$(shell cat $(top_srcdir)/$(MY_REVISION_FILE))" copied
> from Makefile.am to Makefile.in
This is actually an Automake question, but the short answer is that you
probably have fatal warnings enabled and you need to add -Wno-portability
to the Automake flags (in AM_INIT_AUTOMAKE, for example).
--
Russ Allbery (address@hidden) <http://www.eyrie.org/~eagle/>