On Sun, Nov 13, 2005 at 07:49:23PM +0100, Stefano Zacchiroli wrote: > On Sun, Nov 13, 2005 at 06:47:39PM +0100, Sven Luther wrote: > > The canonical way is naturally debian/control for target, as the rule > > creates > > this file. This is being used all over (parted, kernel, etc), so i believe > > it > > is the sane one to chose. > > @OCamlABI@ can need to be substituted in more files than simply > debian/control. In the packages I've already ported to 3.09 for example > I had the need to substitute it many times in .dirs files and sometimes > in .files files.
Only debian/control needs to be substituted at build time, the rest can (and should ?) be handled dynamically at build time. I do so usually at start of configure time, but it doesn't always work. For example, i had to do it for a .dpatch in ocaml, and thus it had to come before the patch application. > Thus I did something like the following in all packages of mine: > > OCAMLABI := $(shell ocamlc -version) > OFILES := $(patsubst %.in,%,$(shell ls debian/*.in)) > ocamlinit: > for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; > done > > I consistenly used "ocamlinit" target in all packages of mine, if you > like it we can recommend it. Sounds good, but this should be separate from the build-dep debian/control substitution. Notice that #OcamlABI# should appear only once in the debian/control, for the build-dependencies, the rest is handled by subst vars. Friendly, Sven Luther -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

