+2024-01-29 Patrice Dumas <pertusus@free.fr>
+
+ gendocs: get only targetted manual source and includes, when possible
+ * build-aux/gendocs.sh: if makeinfo, based on version, has the
+ --trace-includes option, gather only the targetted manual srcfile and
+ the included files obtained with makeinfo --trace-includes. In that
+ case output include files to tar stdin and use -T-. Bruno Haible for
+ the version comparison and use of tar.
+
2024-01-29 Bruno Haible <bruno@clisp.org>
Port FALLTHROUGH to Mac OS X 10.9.
# file names to be put into the .tar.gz for sources.
# Omit patterns that do not expand to file names.
pats=
- for pat in '*.texinfo' '*.texi' '*.txi' '*.eps'; do
- for file in $pat; do
- test "$file" = "$pat" && test ! -e "$file" || pats="$pats $pat"
- break
+
+ if case `$MAKEINFO --version | sed -e 's/^[^0-9]*//' -e 1q` in \
+ [1-6]* | 7.[01]*) false;; \
+ *) true;; \
+ esac \
+ ; then
+
+ for pat in '*.eps'; do
+ for file in $pat; do
+ test "$file" = "$pat" && test ! -e "$file" || pats="$pats $pat"
+ break
+ done
+ done
+
+ # if $MAKEINFO is recent enough, use --trace-includes on the
+ # $srcfile to get the included files of the targetted manual only
+ base=`basename "$srcfile"`
+
+ cmd="$SETLANG $MAKEINFO $commonarg --trace-includes \"$base\""
+ eval "$cmd" \
+ | tar -czhf "$abs_outdir/$PACKAGE.texi.tar.gz" \
+ --verbatim-files-from -T- -- "$base" $pats \
+ ${source_extra+"$source_extra"} \
+ && ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
+ else
+ for pat in '*.texinfo' '*.texi' '*.txi' '*.eps'; do
+ for file in $pat; do
+ test "$file" = "$pat" && test ! -e "$file" || pats="$pats $pat"
+ break
+ done
done
- done
- tar -czhf "$abs_outdir/$PACKAGE.texi.tar.gz" \
- -- $pats ${source_extra+"$source_extra"} &&
- ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
+ tar -czhf "$abs_outdir/$PACKAGE.texi.tar.gz" \
+ -- $pats ${source_extra+"$source_extra"} \
+ && ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
+ fi
) || exit
texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`