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 <vinc...@vinc17.net> - 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)