--- Begin Message ---
Subject: |
"dist Hook" documentation in manual is incorrect or unclear about write permissions |
Date: |
Sat, 18 Apr 2020 19:12:12 +0200 |
User-agent: |
Mutt/1.12.1+33 (6a74e24e) vl-117499 (2019-06-23) |
doc/automake.texi contains:
------------------------------------------------------------------------
@example
EXTRA_DIST = doc
dist-hook:
rm -rf `find $(distdir)/doc -type d -name .svn`
@end example
@c The caveats described here should be documented in 'disthook.sh'.
@noindent
Note that the @code{dist-hook} recipe shouldn't assume that the regular
files in the distribution directory are writable; this might not be the
case if one is packaging from a read-only source tree, or when a
@code{make distcheck} is being done. For similar reasons, the recipe
shouldn't assume that the subdirectories put into the distribution
directory as an effect of having them listed in @code{EXTRA_DIST} are
writable. So, if the @code{dist-hook} recipe wants to modify the
content of an existing file (or @code{EXTRA_DIST} subdirectory) in the
distribution directory, it should explicitly to make it writable first:
@example
EXTRA_DIST = README doc
dist-hook:
chmod u+w $(distdir)/README $(distdir)/doc
echo "Distribution date: `date`" >> README
rm -f $(distdir)/doc/HACKING
@end example
------------------------------------------------------------------------
So, if the subdirectories may not be writable, how can the rm in the
first example work without changing the permissions first?
--
Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#40699: "dist Hook" documentation in manual is incorrect or unclear about write permissions |
Date: |
Thu, 23 Apr 2020 18:59:10 -0600 |
+ chmod -R u+w $(distdir)/doc
...
- echo "Distribution date: `date`" >> README
+ echo "Distribution date: `date`" >> $(distdir)/README
Ok, pushed. Thanks.
--- End Message ---