[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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
bindir.c: Makefile
        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 first.



This document was generated by Jeff Bailey on December, 24 2002 using texi2html