Build `bindir.c', not `bindir.h'.
Another attractive idea is to define
bindir as a variable or
function exported from `bindir.o', and build `bindir.c'
instead of `bindir.h'.
noinst_PROGRAMS = foo
foo_SOURCES = foo.c bindir.h
nodist_foo_SOURCES = bindir.c
CLEANFILES = bindir.c
echo 'const char bindir = "$(bindir)";' >$
`bindir.h' contains just the variable's declaration and doesn't
need to be built, so it won't cause any trouble. `bindir.o' is
always dependent on `bindir.c', so `bindir.c' will get built