Re: Add support for EXTRA_DIST_LINKS

madmurphy <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <CAExyPMdCNNTufUhegS_4WjhyO--nKFPLw5FQTn-esA9V5eNwhA@mail.gmail.com>
Hi Karl, thank you for your message and the code review. I agree, and I
think I have got an idea. How about removing EXTRA_DIST_LINKS and adding a
Makefile variable named DIST_FLAGS *to be set on the fly*? So, for example,
imagine I have a package where my_link.txt is a symlink to the ChangeLog
file. If I launch

make dist

all links will be dereferenced as usually. But if I launch instead

make DIST_FLAGS='symlinks' dist

all links will be kept.

The DIST_FLAGS variable can be extended in the future to enable other
space-separated flags, but for now we are only introducing the symlinks
keyword (please feel free to propose other names, I am just outlining a
mechanism).

How does this sound?

Additionally we can also keep the EXTRA_DIST_LINKS, *which will still
dereference symlinks unless used in conjunction with DIST_FLAGS='symlinks'*.
This will have the advantage that symlinks will be *recreated* in case they
had got previously dereferenced, but will always be dereferenced if
DIST_FLAGS='symlinks' is not specified (100% control).

P.S. No, my name is not Jim, I prefer to go only with my nickname when I
talk about programming ;)

--madmurphy
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.