On Thu, Sep 03, 2026 at 04:17:16PM +0200, Bruno Haible wrote:
> dist-hook: dist-many-files
> 
> dist-many-files:
>       $(MKDIR_P) $(distdir)/
>       for file in `cat $(srcdir)/many-files.txt`; do \
>         if test -f $$file; then d=.; else d=$(srcdir); fi; \
>         cp -p $$d/$$file $(distdir)/$$file || exit 1; \
>       done
> 
> Bruno

Something like that is done in:
https://cgit.git.savannah.gnu.org/cgit/texinfo.git/commit/?id=5f71ebf52737eef14fc1c7ad02390a38a3bbeb92

There was an additional step, the directories needed to be created.  For
that I generated a list of directories along with the list of files.
This increases somewhat the need for code in Makefile.am to be robust to
deletion of a file.  Maybe something simpler could be done, I don't
know.

Also the use of cat did not work with file names with spaces, I used
while read to read the file names from the text files.

-- 
Pat

  • &quo... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas
  • &quo... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas
      • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
        • ... Patrice Dumas
          • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
            • ... Patrice Dumas
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... Patrice Dumas
            • ... Patrice Dumas
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system

Reply via email to