X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=blobdiff_plain;f=doc%2Frelocatable-maint.texi;h=f972b2fb4870a2796e322c0cabf8a4712a6b8b21;hp=8780b8442f19b5b8a834e554bf1a46a41773c8cf;hb=c0920188a9d9d5405cb9639d7ae07d9cae2161bf;hpb=cdc2dbb72385f1de251033b40155619216d89101 diff --git a/doc/relocatable-maint.texi b/doc/relocatable-maint.texi index 8780b8442..f972b2fb4 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