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

Re: an autoconf question



On Mon, May 03, 1999 at 10:07:45AM +0800, Mikolaj J. Habryn wrote:
> >>>>> "FT" == Francesco Tapparo <cesco@goldnet.it> writes:
> 
>     FT> So how can I expand completely (even the $prefix part) the
>     FT> variable scwm_themedir?
> 
>   AC_DEFINE_UNQUOTED gives you an extra layer of resolution, but it
> might not be enough. The only workaround that I've found for this is 

Thank you, I'll study this command.

> to supply things via the command line (ie, -DFISH="@something@" in
> Makefile.in) - if that's possible with your scheme interpreter. If
> you find a solution, I'd like to know :)

the problem is that the file with the variable to substitute must be read
later, so I must effectively sustitute the value in the file itself.

This is my solution, so far:
I renamed the file with the variable to substitute from themes.scm to 
themes.scin. Then I modified Makefile.am adding:

SUFFIXES = .scm

%.scm: %.scin
	sed -e 's%scwm_themedir%$(scwm_themedir)%' $< > $@
	
and 

DISTCLEANFILES = themes.scm

Now, when I type make, themes.scm is build from themes.scin substituting
scwm_themedir with the value of scwm_themedir. It's not a perfect solution
(problems may arise with file containing "$"), though.

> m.
> 

-- 
Francesco Tapparo                                 tapparo@mat.unimi.it
GNU fanatic                                       cesco@debian.org


Reply to: