I apologize, I had forgotten to write rm -rf "$${LNKPART}", for removing possible existing links. Please find the new patch attached.
--madmurphy Il giorno lun 31 mag 2021 alle ore 00:34 madmurphy <madmurphy...@gmail.com> ha scritto: > Hi there, > > I have created a patch for Automake to support a new Makefile variable > named EXTRA_DIST_LINKS. The purpose of the variable is that of creating > symlinks for the distributed archive. > > The syntax is very simple: a space-separated list of tokens of the form > DEST:SOURCE – it is identical to that of AC_CONFIG_LINKS(dest:source ...) > in the configure.ac file. > > For instance, adding the following lines to Makefile.am > > EXTRA_DIST_LINKS = \ > my_link.txt:README \ > my_subdir/another_link.txt:NEWS > > will create two links: my_link.txt (pointing to the README file in the > same directory) and my_subdir/another_link.txt (pointing to the NEWS file > one level above). > > I had to hack also the tar.m4 file, to avoid dereferencing symlinks > during the creation of compressed archives. That should not be a problem, > since symlinks are anyway dereferenced one step before by make distdir, > so with this patch the only way to distribute a symlink is that of listing > it explicitly in EXTRA_DIST_LINKS. For the shell code I used this as > base: https://stackoverflow.com/a/12498485 (but I have made a few > changes). > > Please find the patch attached. > > --madmurphy >
<<attachment: extra_dist_links_v2.patch.zip>>