automake
[Top][All Lists]
Advanced

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

replacement of variable placeholders in files


From: Dizzy
Subject: replacement of variable placeholders in files
Date: Wed, 22 Aug 2007 12:53:11 +0300
User-agent: KMail/1.9.7

Hi

I have an input file named project.conf.in in which I have some variable 
placeholders of the form ${VARIABLE}. I am trying to use sed to replace them 
with some actual contents so I have added a make rule in Makefile.am such as:

project.conf:project.conf.in $(top_builddir)/config.status
$(SED) -e 'address@hidden/@'"${localstatedir}/@g" 
$(top_srcdir)/conf/project.conf.in > $@

Notice that I first have a string with single quotes so I tell bash to not 
deal with ${LOCALSTATEDIR} then I have a string with double quotes so bash 
can replace the ${localstatedir} variable contents and no space between which 
seems to work well if I run that command in shell.

However I think that configure replaces the ${LOCALSTATEDIR} from the 
generated Makefile.in with "" (because there is no such variable so it puts 
an empty string) and ignores my single quotes.

Any idea how to implement such a make rule that should replace variable 
placeholders with contents of actual variables?

Thanks!

-- 
Mihai RUSU                                      Email: address@hidden
                        "Linux is obsolete" -- AST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]