Bruno Haible <br...@clisp.org> writes: > Hi José, > >> In GNU poke we use the gendocs gnulib module. We also customize our >> doc/gendocs_template, which is committed in our VCS. >> >> This leads to the situation where each time we run `bootstrap', it >> copies the unmodified gendocs_template over to our tree, overwritting >> the customized version. >> >> What would be the best way to fix this? Is there a way to tell >> bootstrap that a particular file is customized/modified so please do not >> overwrite it? > > Two solutions come to mind: > > A) In bootstrap.conf, in the bootstrap_epilogue() function, add a statement > that reverts the changes, assuming the developer is working from a git > checkout: > git diff doc/gendocs_template | patch -p1 -R > > B) Prevent the changes in the first place, by using a modified module > description of the 'gendocs' module. See the "Extending Gnulib" chapter > [1] for the general mechanism. > > Concretely, probably what you need is: > - Define gl_local_dir in bootstrap.conf: > gl_local_dir='gnulib-local' > - Add a file gnulib-local/modules/gendocs.diff > which is a diff between the original gnulib/modules/gendocs > and the one which you want (namely, which has the file > 'doc/gendocs_template' removed). > - Commit this file in git.
C) Patch the gendocs_template file during ./bootstrap with a local *.diff file, for example: https://gitlab.com/gsasl/gsasl/-/blob/master/gl/doc/gendocs_template.diff?ref_type=heads By putting the *.diff in the same path as the gnulib source_base you don't need any changes to bootstrap.conf, for reference: https://gitlab.com/gsasl/gsasl/-/blob/master/bootstrap.conf?ref_type=heads This doesn't work for removing files installed by ./bootstrap, but for that I suggest a simple 'rm' in bootstrap.conf instead of a custom local module definition. /Simon
signature.asc
Description: PGP signature