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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Aug 7, 2010, at 10:31 AM, Mike Frysinger <vapier@xxxxxxxxxx> 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, they don't
>> accept bash syntax "${prefix}", they do need the value of
>> "${prefix}/share". How can I do that?
> 
> typically people dont expand things in such files

Or you can add a rule to Makefile.am (or Makefile if you're not using Automake) that performs the substitution with a shell snippet that calls sed - that way ${prefix} is expanded by the shell before passing it to sed.

Have a look at how GNU M4 creates its bootstrap script for an example.

Cheers,
-- 
Gary V. Vaughan (gary@xxxxxxx)
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux