Add support for EXTRA_DIST_LINKS

madmurphy <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <CAExyPMdfnPBc6aw+tWA1QgZGtgrsGJyYuB4tBE9hHP2O6d07tw@mail.gmail.com>
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
extra_dist_links.zip (application/zip, 1.5 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.