Re: How to correctly generate 'foobar.h' from 'foobar.h.in'

2010-08-08 Thread Tao Wang
On Sat, Aug 7, 2010 at 1:49 PM, Gary V. Vaughan g...@gnu.org wrote: On Aug 7, 2010, at 10:31 AM, Mike Frysinger vap...@gentoo.org wrote: On Friday, August 06, 2010 20:19:41 Tao Wang wrote: Thank you. It works for my C/C++ files. However, how it works on text file and script file? They

Re: How to correctly generate 'foobar.h' from 'foobar.h.in'

2010-08-06 Thread Tao Wang
Thank you. It works for my C/C++ files. However, how it works on text file and script file? They don't have compiler to pass the define from parameters. For most scripts, they don't accept bash syntax ${prefix}, they do need the value of ${prefix}/share. How can I do that? On Thu, Aug 5, 2010 at

Re: How to correctly generate 'foobar.h' from 'foobar.h.in'

2010-08-06 Thread Mike Frysinger
On Friday, August 06, 2010 20:19:41 Tao Wang wrote: please dont top post Thank you. It works for my C/C++ files. However, how it works on text file and script file? They don't have compiler to pass the define from parameters. For most scripts, they don't accept bash syntax ${prefix}, they do

Re: How to correctly generate 'foobar.h' from 'foobar.h.in'

2010-08-06 Thread Gary V. Vaughan
On Aug 7, 2010, at 10:31 AM, Mike Frysinger vap...@gentoo.org wrote: On Friday, August 06, 2010 20:19:41 Tao Wang wrote: Thank you. It works for my C/C++ files. However, how it works on text file and script file? They don't have compiler to pass the define from parameters. For most scripts,

Re: How to correctly generate 'foobar.h' from 'foobar.h.in'

2010-08-04 Thread Mike Frysinger
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

Re: How to correctly generate 'foobar.h' from 'foobar.h.in'

2010-08-04 Thread Ralf Wildenhues
Hello, * Mike Frysinger wrote on Wed, Aug 04, 2010 at 09:19:30AM CEST: On Wednesday, August 04, 2010 01:36:34 Tao Wang wrote: First, the generated content is: = #define PATH_PREFIX/home/tao/unstable/stardict #define PATH_DATADIR${prefix}/share = ${prefix}

How to correctly generate 'foobar.h' from 'foobar.h.in'

2010-08-03 Thread Tao Wang
Hi, I'm new to autotools, I want to generate 'foobar.h' from 'configure'. 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