Re: getting included texinfo files interface
On Fri, Jan 26, 2024 at 11:49:31PM +0100, Patrice Dumas wrote: > Yes, I have something preliminary that I attached. Here it is. -- Pat diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh index b0433c798f..68c010a42c 100755 --- a/build-aux/gendocs.sh +++ b/build-aux/gendocs.sh @@ -417,8 +417,16 @@ printf "\nMaking .tar.gz for sources...\n" d=`dirname $srcfile` ( cd "$d" - srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true - tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles + base=`basename "$srcfile"` + include_files= + cmd="$SETLANG $MAKEINFO $commonarg -c SHOW_INCLUDE_FILE_PATHS=1 \"$base\"" + eval "$cmd" > includes_list.tmp + while read include_file ; do +include_files="$include_files $include_file" + done < includes_list.tmp + rm includes_list.tmp + other_srcfiles=`ls -d *.eps $source_extra 2>/dev/null` || true + tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $base $include_files $other_srcfiles ls -l "$abs_outdir/$PACKAGE.texi.tar.gz" ) texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
Re: getting included texinfo files interface
On Fri, Jan 26, 2024 at 09:08:16PM +, Gavin Smith wrote: > On Fri, Jan 26, 2024 at 03:57:24PM +0100, Patrice Dumas wrote: > > Hello, > > > > With an objective to improve gendoc.sh texinfo sources tarball > > generation code, I implemented, in the developpement version in git > > the possibility with texi2any to output the @include files included > > from a manual, without doing anything else. A bit like the -M option of > > cpp. For now this feature is set through the customization option > > SHOW_INCLUDE_FILE_PATHS. > > Is this so that gendoc.sh (a gnulib script, I believe), Yes. > can get the list > of files so it can include them in a Texinfo source tarball? Yes. > How do > projects currently get the right files included, or do they not manage > to do this? They do not manage right now. > Have you made changes to this script to process the list > of included files? Yes, I have something preliminary that I attached. > > Is that interface to the feature ok? Would there be another way to > > specify included files that is common across diverse applications? > > Should we try to do something like -M? > > I don't like the idea of outputting Makefile rules but a list of included > files makes sense. I feel that a command-line argument (--trace-includes?) > would be better as the interface for this. Ok. (There will be a customization variable too, in that case). -- Pat
Re: getting included texinfo files interface
On Fri, Jan 26, 2024 at 03:57:24PM +0100, Patrice Dumas wrote: > Hello, > > With an objective to improve gendoc.sh texinfo sources tarball > generation code, I implemented, in the developpement version in git > the possibility with texi2any to output the @include files included > from a manual, without doing anything else. A bit like the -M option of > cpp. For now this feature is set through the customization option > SHOW_INCLUDE_FILE_PATHS. Is this so that gendoc.sh (a gnulib script, I believe), can get the list of files so it can include them in a Texinfo source tarball? How do projects currently get the right files included, or do they not manage to do this? Have you made changes to this script to process the list of included files? > For example, if mymanual.texi contains in itself or in an included > file > > @include toto/aa.texi > @include version > > Then calling texi2any like: > > texi2any -c SHOW_INCLUDE_FILE_PATHS=1 mymanual.texi > > outputs on stdout as sole effect: > > toto/aa.texi > version > > > Is that interface to the feature ok? Would there be another way to > specify included files that is common across diverse applications? > Should we try to do something like -M? I don't like the idea of outputting Makefile rules but a list of included files makes sense. I feel that a command-line argument (--trace-includes?) would be better as the interface for this.
getting included texinfo files interface
Hello, With an objective to improve gendoc.sh texinfo sources tarball generation code, I implemented, in the developpement version in git the possibility with texi2any to output the @include files included from a manual, without doing anything else. A bit like the -M option of cpp. For now this feature is set through the customization option SHOW_INCLUDE_FILE_PATHS. For example, if mymanual.texi contains in itself or in an included file @include toto/aa.texi @include version Then calling texi2any like: texi2any -c SHOW_INCLUDE_FILE_PATHS=1 mymanual.texi outputs on stdout as sole effect: toto/aa.texi version Is that interface to the feature ok? Would there be another way to specify included files that is common across diverse applications? Should we try to do something like -M? -- Pat