[Build-common-hackers] Implementing debian/*.in file generation
Robert Millan
zeratul2@wanadoo.es
Fri, 14 Nov 2003 15:03:33 +0100
Hi!
I'd like to discuss how to implement the functionality in CDBS to generate
debian/* files dynamicaly from debian/*.in templates.
My suggestion for the interface is:
In debian/rules, you define a variable, e.g: DEB_GEN. Then CDBS runs sed for
each of the "foo.in" files in order to generate "foo", and
$(DEB_GEN) is passed as argument to sed.
For example:
DEB_GEN := s/@foo@/bar/g s/@bar@/foo/g
Then CDBS invokes:
for i in debian/*.in ; do cat $i | sed s/@foo@/bar/g | sed s/@bar@/foo/g \
> `basename $i .in` ; done
I'm not sure, however, in which part of CDBS internal files would this code
have to be put. If you give me some clue on this, I might be able to send a
patch that implements it.
Thanks,
--
Robert Millan
"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."
-- J.R.R.T, Ainulindale (Silmarillion)