[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Build ‘bindir.h’ from ‘configure’
It's possible to define this preprocessor macro from ‘configure’,
either in ‘config.h’ (see (autoconf)Defining Directories section `Defining Directories' in The Autoconf Manual), or by processing a
‘bindir.h.in’ file using AC_CONFIG_FILES
(see (autoconf)Configuration Actions section `Configuration Actions' in The Autoconf Manual).
At this point it should be clear that building ‘bindir.h’ from ‘configure’ work well for this example. ‘bindir.h’ will exist before you build any target, hence will not cause any dependency issue.
The Makefile can be shrunk as follows. We do not even have to mention ‘bindir.h’.
bin_PROGRAMS = foo foo_SOURCES = foo.c |
However, it's not always possible to build sources from ‘configure’, especially when these sources are generated by a tool that needs to be built first...