On Wednesday, August 04, 2010 01:36:34 Tao Wang wrote: > I created 'src/foobar.h.in' with following content: > > ========= > #define PATH_PREFIX "@prefix@" > #define PATH_DATADIR "@datadir@" > ========= > > And put 'src/foobar.h' in AC_CONFIG_FILES() in 'configure.ac'. > > After I run 'autoreconf', the 'src/foobar.h' is generated, however, I got 2 > problem for it. > > First, the generated content is: > ========= > #define PATH_PREFIX "/home/tao/unstable/stardict" > #define PATH_DATADIR "${prefix}/share" > ========= > > "${prefix}" is definitely not working as a C/C++ header. How can I replace > the ${prefix} with the real value? this is why people put the define into CPPFLAGS and let the Makefile expand it if you're using automake, then something like: AM_CPPFLAGS = -DPATH_DATADIR='"$(datadir)"' > Second, everytime I modified the file 'src/foobar.h.in', and run 'make > all', it cannot regenerate 'src/foobar.h'. Is there anything wrong? Why > make doesn't know the dependency? are you using automake or your own makefile ? if the former, it should take care of it for you. if the latter, i think the autoconf manual gives tips about this. -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf