[Top][All Lists]

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

Re: Variable substitution in source files

From: Akim Demaille
Subject: Re: Variable substitution in source files
Date: Mon, 15 Sep 2003 19:54:20 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

 > I have a number of files that need variable substitution, so I do this in 
 > a

 > foo:
 >         @rm -f foo
 >         @sed \
 >                 -e 's,@@perlmoduledir@@,$(libexecdir)/perl,' \
 >                 -e 's,@@swishbindir@@,$(bindir),' \
 >                 -e 's,@@perlbinary@@,$(PERL),' \
 >                         $(srcdir)/ > foo

 > But I'm doing that in more and more files in my project 
 > tree -- and sometimes I need to do it to a file where there isn't a 
 > Makefile in that directory.

 > I'm feeling like I'm using the same bit of sed code in too many places.
 > Is there a better way to manage this?  I'd like to have the sed code 
 > (above) defined in one place and then maybe list all the files that need 
 > to be operated on.

Use "include"?

reply via email to

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