diff options
author | Ben Pfaff <blp@cs.stanford.edu> | 2014-01-08 22:15:21 -0800 |
---|---|---|
committer | Ben Pfaff <blp@cs.stanford.edu> | 2014-01-08 22:15:21 -0800 |
commit | e446f257e29da65d94ec2d944e08a62b5690d99b (patch) | |
tree | 0b873b965ef4a7962a3f32ff9205ee0e1f5e5957 /doc | |
parent | efc854066a28129c347be9f8226b43919c8f5a74 (diff) | |
download | gnulib-e446f257e29da65d94ec2d944e08a62b5690d99b.tar.gz |
relocatable-shell: Update suggested usage in maintainer documentation.
Instead of suggesting an inline usage of "sed", that would have to be
cut-and-pasted for every directory to be relocated, suggest a shell
function.
Make the example obviously an example, whereas previously it looked like
it might be literal text.
Thanks to Reuben Thomas <rrt@sc3d.org> for pointing out these issues. See
http://lists.gnu.org/archive/html/bug-gnulib/2014-01/msg00039.html for
further context.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/relocatable-maint.texi | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/doc/relocatable-maint.texi b/doc/relocatable-maint.texi index 8780b8442f..f972b2fb48 100644 --- a/doc/relocatable-maint.texi +++ b/doc/relocatable-maint.texi @@ -122,17 +122,26 @@ if test "@@RELOCATABLE@@" = yes; then orig_installdir="$bindir" # see Makefile.am's *_SCRIPTS variables func_find_curr_installdir # determine curr_installdir func_find_prefixes - # Relocate the directory variables that we use. - gettext_dir=` - echo "$gettext_dir/" \ + relocate () @{ + echo "$1/" \ | sed -e "s%^$@{orig_installprefix@}/%$@{curr_installprefix@}/%" \ - | sed -e 's,/$,,'` + | sed -e 's,/$,,' + @} +else + relocate () @{ + echo "$1" + @} fi + +# Get some relocated directory names. +sysconfdir=`relocate "@@sysconfdir@@"` +some_datadir=`relocate "@@datadir@@/something"` @end example You must adapt the definition of @code{orig_installdir}, depending on where the script gets installed. Also, at the end, instead of -@code{gettext_dir}, transform those variables that you need. +@code{sysconfdir} and @code{some_datadir}, transform those variables +that you need. @item In your @file{Makefile.am}, for every program @command{foo} that gets |