configure.ac, docs: use the correct gimpdir in the manual pages

It's now either $XDG_CONFIG_HOME/$gimpdir/2.9 or directly $gimpdir,
depending on whether $gimpdir is a relative or absolute path. Build
the resulting string in configure and put it into the manpage_gimprc
variable so it can be used in the manpage sources.
This commit is contained in:
Michael Natterer
2014-09-15 23:50:26 +02:00
parent d4dba427ac
commit aec8faf56e
5 changed files with 65 additions and 54 deletions

View File

@ -175,7 +175,7 @@ static const gchar man_page_header[] =
".B gimprc\n" ".B gimprc\n"
"file is a configuration file read by GIMP when it starts up. There\n" "file is a configuration file read by GIMP when it starts up. There\n"
"are two of these: one system-wide one stored in\n" "are two of these: one system-wide one stored in\n"
"@gimpsysconfdir@/gimprc and a per-user \\fB$HOME\\fP/@gimpdir@/gimprc\n" "@gimpsysconfdir@/gimprc and a per-user @manpage_gimpdir@/gimprc\n"
"which may override system settings.\n" "which may override system settings.\n"
"\n" "\n"
"Comments are introduced by a hash sign (#), and continue until the end\n" "Comments are introduced by a hash sign (#), and continue until the end\n"
@ -217,7 +217,7 @@ static const gchar *man_page_path =
".TP\n" ".TP\n"
".I gimp_dir\n" ".I gimp_dir\n"
"The personal gimp directory which is set to the value of the environment\n" "The personal gimp directory which is set to the value of the environment\n"
"variable GIMP2_DIRECTORY or to ~/@gimpdir@.\n" "variable GIMP2_DIRECTORY or to @manpage_gimpdir@.\n"
".TP\n" ".TP\n"
".I gimp_data_dir\n" ".I gimp_data_dir\n"
"Base for paths to shareable data, which is set to the value of the\n" "Base for paths to shareable data, which is set to the value of the\n"
@ -241,7 +241,7 @@ static const gchar man_page_footer[] =
".I @gimpsysconfdir@/gimprc\n" ".I @gimpsysconfdir@/gimprc\n"
"System-wide configuration file\n" "System-wide configuration file\n"
".TP\n" ".TP\n"
".I \\fB$HOME\\fP/@gimpdir@/gimprc\n" ".I @manpage_gimpdir@/gimprc\n"
"Per-user configuration file\n" "Per-user configuration file\n"
"\n" "\n"
".SH \"SEE ALSO\"\n" ".SH \"SEE ALSO\"\n"

View File

@ -2004,7 +2004,7 @@ AC_ARG_ENABLE(gimp-console, [ --enable-gimp-console build a console-only bina
AM_CONDITIONAL(ENABLE_GIMP_CONSOLE, test "x$enable_gimp_console" != xno) AM_CONDITIONAL(ENABLE_GIMP_CONSOLE, test "x$enable_gimp_console" != xno)
# Possibly change default gimpdir from .gimp-major.minor # Possibly change default gimpdir from $XDG_CONFIG_HOME/GIMP/gimp_user_version
gimpdir=GIMP gimpdir=GIMP
AC_ARG_WITH(gimpdir, [ --with-gimpdir=DIR change default gimpdir from $XDG_CONFIG_HOME/GIMP/gimp_user_version to $XDG_CONFIG_HOME/DIR/gimp_user_version, or to DIR if DIR is an absolute path], AC_ARG_WITH(gimpdir, [ --with-gimpdir=DIR change default gimpdir from $XDG_CONFIG_HOME/GIMP/gimp_user_version to $XDG_CONFIG_HOME/DIR/gimp_user_version, or to DIR if DIR is an absolute path],
if eval "test x$with_gimpdir != x"; then if eval "test x$with_gimpdir != x"; then
@ -2013,11 +2013,23 @@ if eval "test x$with_gimpdir != x"; then
fi fi
fi) fi)
# Build the gimpdir to be used in manpages here, because the manpage
# source is unreadable enough already
case "$gimpdir" in
/*)
manpage_gimpdir="$gimpdir"
;;
*)
manpage_gimpdir="\\fB\$XDG_CONFIG_HOME\\fP/$gimpdir/gimp_user_version"
;;
esac
gimpdatadir="$datadir/$PACKAGE/gimp_data_version" gimpdatadir="$datadir/$PACKAGE/gimp_data_version"
gimpplugindir="$libdir/$PACKAGE/gimp_plugin_version" gimpplugindir="$libdir/$PACKAGE/gimp_plugin_version"
gimpsysconfdir="$sysconfdir/$PACKAGE/gimp_sysconf_version" gimpsysconfdir="$sysconfdir/$PACKAGE/gimp_sysconf_version"
AC_SUBST(gimpdir) AC_SUBST(gimpdir)
AC_SUBST(manpage_gimpdir)
AC_SUBST(gimpdatadir) AC_SUBST(gimpdatadir)
AC_SUBST(gimpplugindir) AC_SUBST(gimpplugindir)
AC_SUBST(gimpsysconfdir) AC_SUBST(gimpsysconfdir)

View File

@ -152,9 +152,9 @@ GIMP respects a number of environment variables.
to get the default host and display number. to get the default host and display number.
.TP 8 .TP 8
.B GIMP2_DIRECTORY .B GIMP2_DIRECTORY
to get the name of the personal GIMP directory. If unset @gimpdir@ is to get the name of the personal GIMP directory. If unset @manpage_gimpdir@ is
used. If this is an absolute path, it is used as is. If it is a used. If this is an absolute path, it is used as is. If it is a
relative path, it is taken to be a subdirectory of the home directory. relative path, it is taken to be a subdirectory of \fB$XDG_CONFIG_HOME\fP.
.TP 8 .TP 8
.B GIMP2_DATADIR .B GIMP2_DATADIR
to get the base location for data files such as brushes and patterns. to get the base location for data files such as brushes and patterns.
@ -185,35 +185,35 @@ configuration files are stored in @gimpsysconfdir@, where ${prefix}
is typically /usr. is typically /usr.
Most GIMP configuration is read in from the user's init file, Most GIMP configuration is read in from the user's init file,
\fB$HOME\fP/@gimpdir@/gimprc. The system wide equivalent is in @manpage_gimpdir@/gimprc. The system wide equivalent is in
@sysconfdir@/gimprc. The system wide file is parsed @sysconfdir@/gimprc. The system wide file is parsed first and the user
first and the user gimprc can override the system settings. gimprc can override the system settings. @sysconfdir@/gimprc_user is
@sysconfdir@/gimprc_user is the default gimprc the default gimprc placed in users' home directories the first time
placed in users' home directories the first time GIMP is run. GIMP is run.
\fB$HOME\fP/@gimpdir@/devicerc - holds settings for input devices @manpage_gimpdir@/devicerc - holds settings for input devices together
together with the tool, colors, brush, pattern and gradient with the tool, colors, brush, pattern and gradient associated to that
associated to that device. device.
\fB$HOME\fP/@gimpdir@/gtkrc - users set of GIMP-specific GTK+ config @manpage_gimpdir@/gtkrc - users set of GIMP-specific GTK+ config
settings. Options such as widget color and fonts sizes can be set settings. Options such as widget color and fonts sizes can be set
here. here.
@gimpsysconfdir@/gtkrc - system wide default set of GIMP-specific GTK+ @gimpsysconfdir@/gtkrc - system wide default set of GIMP-specific GTK+
config settings. config settings.
\fB$HOME\fP/@gimpdir@/menurc - user's set of keybindings. @manpage_gimpdir@/menurc - user's set of keybindings.
\fB$HOME\fP/@gimpdir@/parasiterc - Stores all persistent GIMP @manpage_gimpdir@/parasiterc - Stores all persistent GIMP
parasites. This file will be rewritten every time you quit GIMP. parasites. This file will be rewritten every time you quit GIMP.
\fB$HOME\fP/@gimpdir@/sessionrc - This file takes session-specific @manpage_gimpdir@/sessionrc - This file takes session-specific info
info (that is info, you want to keep between two GIMP sessions). You (that is info, you want to keep between two GIMP sessions). You are
are not supposed to edit it manually, but of course you can do. This not supposed to edit it manually, but of course you can do. This file
file will be entirely rewritten every time you quit GIMP. If this will be entirely rewritten every time you quit GIMP. If this file
file isn't found, defaults are used. isn't found, defaults are used.
\fB$HOME\fP/@gimpdir@/templaterc - Image templates are kept in this @manpage_gimpdir@/templaterc - Image templates are kept in this
file. New images can conveniently created from these templates. If file. New images can conveniently created from these templates. If
this file isn't found, defaults are used. this file isn't found, defaults are used.
@ -223,65 +223,64 @@ points and typographic picas and is placed in users home directories
the first time GIMP is ran. If this file isn't found, defaults are the first time GIMP is ran. If this file isn't found, defaults are
used. used.
\fB$HOME\fP/@gimpdir@/unitrc - This file contains your user unit @manpage_gimpdir@/unitrc - This file contains your user unit
database. You can modify this list with the unit editor. You are not database. You can modify this list with the unit editor. You are not
supposed to edit it manually, but of course you can do. This file supposed to edit it manually, but of course you can do. This file
will be entirely rewritten every time you quit GIMP. will be entirely rewritten every time you quit GIMP.
\fB$HOME\fP/@gimpdir@/plug-ins - location of user installed plug-ins. @manpage_gimpdir@/plug-ins - location of user installed plug-ins.
\fB$HOME\fP/@gimpdir@/pluginrc - plug-in initialization values are @manpage_gimpdir@/pluginrc - plug-in initialization values are stored
stored here. This file is parsed on startup and regenerated if need here. This file is parsed on startup and regenerated if need be.
be.
\fB$HOME\fP/@gimpdir@/modules - location of user installed modules. @manpage_gimpdir@/modules - location of user installed modules.
\fB$HOME\fP/@gimpdir@/tmp - default location that GIMP uses as @manpage_gimpdir@/tmp - default location that GIMP uses as temporary
temporary space. space.
@gimpdatadir@/brushes - system wide brush files. @gimpdatadir@/brushes - system wide brush files.
\fB$HOME\fP/@gimpdir@/brushes - user created and installed brush @manpage_gimpdir@/brushes - user created and installed brush
files. These files are in the .gbr, .gih or .vbr file formats. files. These files are in the .gbr, .gih or .vbr file formats.
\fB$HOME\fP/@gimpdir@/curves - Curve profiles and presets as saved from @manpage_gimpdir@/curves - Curve profiles and presets as saved from
the Curves tool. the Curves tool.
\fB$HOME\fP/@gimpdir@/gimpressionist - Presets and user created brushes @manpage_gimpdir@/gimpressionist - Presets and user created brushes
and papers are stored here. and papers are stored here.
\fB$HOME\fP/@gimpdir@/levels - Level profiles and presets as saved from @manpage_gimpdir@/levels - Level profiles and presets as saved from
the Levels tool. the Levels tool.
@gimpdatadir@/palettes - the system wide palette files. @gimpdatadir@/palettes - the system wide palette files.
\fB$HOME\fP/@gimpdir@/palettes - user created and modified palette @manpage_gimpdir@/palettes - user created and modified palette
files. This files are in the .gpl format. files. This files are in the .gpl format.
@gimpdatadir@/patterns - basic set of patterns for use in GIMP. @gimpdatadir@/patterns - basic set of patterns for use in GIMP.
\fB$HOME\fP/@gimpdir@/patterns - user created and installed gimp @manpage_gimpdir@/patterns - user created and installed gimp pattern
pattern files. This files are in the .pat format. files. This files are in the .pat format.
@gimpdatadir@/gradients - standard system wide set of gradient files. @gimpdatadir@/gradients - standard system wide set of gradient files.
\fB$HOME\fP/@gimpdir@/gradients - user created and installed gradient @manpage_gimpdir@/gradients - user created and installed gradient
files. files.
@gimpdatadir@/scripts - system wide directory of scripts @gimpdatadir@/scripts - system wide directory of scripts
used in Script-Fu and other scripting extensions. used in Script-Fu and other scripting extensions.
\fB$HOME\fP/@gimpdir@/scripts - user created and installed scripts. @manpage_gimpdir@/scripts - user created and installed scripts.
@gimpdatadir@/gflares - system wide directory used by the gflare @gimpdatadir@/gflares - system wide directory used by the gflare
plug-in. plug-in.
\fB$HOME\fP/@gimpdir@/gflares - user created and installed gflare @manpage_gimpdir@/gflares - user created and installed gflare
files. files.
@gimpdatadir@/gfig - system wide directory used by the gfig plug-in. @gimpdatadir@/gfig - system wide directory used by the gfig plug-in.
\fB$HOME\fP/@gimpdir@/gfig - user created and installed gfig files. @manpage_gimpdir@/gfig - user created and installed gfig files.
@gimpdatadir@/images/gimp\-splash.png - the default image used for the @gimpdatadir@/images/gimp\-splash.png - the default image used for the
GIMP splash screen. GIMP splash screen.
@ -301,9 +300,9 @@ chosen as follows:
.IP 1. .IP 1.
GIMP tries to load a random splash screen from the directory GIMP tries to load a random splash screen from the directory
\fB$HOME\fP/@gimpdir@/splashes. @manpage_gimpdir@/splashes.
.IP 2. .IP 2.
It then falls back to using \fB$HOME\fP/@gimpdir@/gimp\-splash.png. It then falls back to using @manpage_gimpdir@/gimp\-splash.png.
.IP 3. .IP 3.
If the user didn't install any custom splash images, a random image is If the user didn't install any custom splash images, a random image is
picked from @gimpdatadir@/splashes. picked from @gimpdatadir@/splashes.

View File

@ -8,7 +8,7 @@ The
.B gimprc .B gimprc
file is a configuration file read by GIMP when it starts up. There file is a configuration file read by GIMP when it starts up. There
are two of these: one system-wide one stored in are two of these: one system-wide one stored in
@gimpsysconfdir@/gimprc and a per-user \fB$HOME\fP/@gimpdir@/gimprc @gimpsysconfdir@/gimprc and a per-user @manpage_gimpdir@/gimprc
which may override system settings. which may override system settings.
Comments are introduced by a hash sign (#), and continue until the end Comments are introduced by a hash sign (#), and continue until the end
@ -944,7 +944,7 @@ There are a few variables that are pre-defined:
.TP .TP
.I gimp_dir .I gimp_dir
The personal gimp directory which is set to the value of the environment The personal gimp directory which is set to the value of the environment
variable GIMP2_DIRECTORY or to ~/@gimpdir@. variable GIMP2_DIRECTORY or to @manpage_gimpdir@.
.TP .TP
.I gimp_data_dir .I gimp_data_dir
Base for paths to shareable data, which is set to the value of the Base for paths to shareable data, which is set to the value of the
@ -966,7 +966,7 @@ variable GIMP2_SYSCONFDIR or to the compiled-in default value
.I @gimpsysconfdir@/gimprc .I @gimpsysconfdir@/gimprc
System-wide configuration file System-wide configuration file
.TP .TP
.I \fB$HOME\fP/@gimpdir@/gimprc .I @manpage_gimpdir@/gimprc
Per-user configuration file Per-user configuration file
.SH "SEE ALSO" .SH "SEE ALSO"

View File

@ -119,12 +119,12 @@ Compile,link, and strip \fIplug-in.c\fP into a \fIGIMP\fP plug-in.
.TP 8 .TP 8
.B \-\-install \fIplug-in.c\fP .B \-\-install \fIplug-in.c\fP
Compile, link, and install \fIplug-in.c\fP into the user's personal Compile, link, and install \fIplug-in.c\fP into the user's personal
\fIGIMP\fP plug-in directory (\fB$HOME\fP/@gimpdir@/plug-ins) \fIGIMP\fP plug-in directory (@manpage_gimpdir@/plug-ins)
.TP 8 .TP 8
.B \-\-install\-strip \fIplug-in.c\fP .B \-\-install\-strip \fIplug-in.c\fP
Compile, link,strip, and install \fIplug-in.c\fP into the user's Compile, link,strip, and install \fIplug-in.c\fP into the user's
personal \fIGIMP\fP personal \fIGIMP\fP
plug-in directory (\fB$HOME\fP/@gimpdir@/plug-ins) plug-in directory (@manpage_gimpdir@/plug-ins)
.TP 8 .TP 8
.B \-\-install\-admin \fIplug-in.c\fP .B \-\-install\-admin \fIplug-in.c\fP
Compile, link, and install \fIplug-in.c\fP into the system-wide \fIGIMP\fP Compile, link, and install \fIplug-in.c\fP into the system-wide \fIGIMP\fP
@ -132,7 +132,7 @@ plug-in directory (@gimpplugindir@/plug-ins)
.TP 8 .TP 8
.B \-\-install\-bin \fIplug-in\fP .B \-\-install\-bin \fIplug-in\fP
Install \fIplug-in\fP into the user's personal \fIGIMP\fP Install \fIplug-in\fP into the user's personal \fIGIMP\fP
plug-in directory (\fB$HOME\fP/@gimpdir@/plug-ins) plug-in directory (@manpage_gimpdir@/plug-ins)
.TP 8 .TP 8
.B \-\-install\-admin\-bin \fIplug-in\fP .B \-\-install\-admin\-bin \fIplug-in\fP
Install \fIplug-in\fP into the system-wide \fIGIMP\fP Install \fIplug-in\fP into the system-wide \fIGIMP\fP
@ -140,7 +140,7 @@ plug-in directory (@gimpplugindir@/plug-ins)
.TP 8 .TP 8
.B \-\-install\-bin\-strip \fIplug-in\fP .B \-\-install\-bin\-strip \fIplug-in\fP
Install stripped \fIplug-in\fP into the user's personal \fIGIMP\fP Install stripped \fIplug-in\fP into the user's personal \fIGIMP\fP
plug-in directory (\fB$HOME\fP/@gimpdir@/plug-ins) plug-in directory (@manpage_gimpdir@/plug-ins)
.TP 8 .TP 8
.B \-\-install\-admin\-bin\-strip \fIplug-in\fP .B \-\-install\-admin\-bin\-strip \fIplug-in\fP
Install stripped \fIplug-in\fP into the system-wide \fIGIMP\fP Install stripped \fIplug-in\fP into the system-wide \fIGIMP\fP
@ -148,7 +148,7 @@ plug-in directory (@gimpplugindir@/plug-ins)
.TP 8 .TP 8
.B \-\-install\-script \fIscript.scm\fP .B \-\-install\-script \fIscript.scm\fP
Install \fIscript.scm\fP into the user's personal \fIGIMP\fP Install \fIscript.scm\fP into the user's personal \fIGIMP\fP
script directory (\fB$HOME\fP/@gimpdir@/scripts) script directory (@manpage_gimpdir@/scripts)
.TP 8 .TP 8
.B \-\-install\-admin\-script \fIscript.scm\fP .B \-\-install\-admin\-script \fIscript.scm\fP
Install \fIscript.scm\fP into the system-wide \fIGIMP\fP Install \fIscript.scm\fP into the system-wide \fIGIMP\fP
@ -156,7 +156,7 @@ script directory (@gimpdatadir@/scripts)
.TP 8 .TP 8
.B \-\-uninstall\-bin \fIplug-in\fP .B \-\-uninstall\-bin \fIplug-in\fP
Uninstall \fIplug-in\fP from the user's personal \fIGIMP\fP Uninstall \fIplug-in\fP from the user's personal \fIGIMP\fP
plug-in directory (\fB$HOME\fP/@gimpdir@/plug-ins) plug-in directory (@manpage_gimpdir@/plug-ins)
.TP 8 .TP 8
.B \-\-uninstall\-admin\-bin \fIplug-in\fP .B \-\-uninstall\-admin\-bin \fIplug-in\fP
Uninstall \fIplug-in\fP from the system-wide \fIGIMP\fP Uninstall \fIplug-in\fP from the system-wide \fIGIMP\fP
@ -164,7 +164,7 @@ plug-in directory (@gimpplugindir@/plug-ins)
.TP 8 .TP 8
.B \-\-uninstall\-script \fIscript.scm\fP .B \-\-uninstall\-script \fIscript.scm\fP
Uninstall \fIscript.scm\fP from the user's personal \fIGIMP\fP Uninstall \fIscript.scm\fP from the user's personal \fIGIMP\fP
script directory (\fB$HOME\fP/@gimpdir@/scripts) script directory (@manpage_gimpdir@/scripts)
.TP 8 .TP 8
.B \-\-uninstall\-admin\-script \fIscript.scm\fP .B \-\-uninstall\-admin\-script \fIscript.scm\fP
Uninstall \fIscript.scm\fP from the system-wide \fIGIMP\fP Uninstall \fIscript.scm\fP from the system-wide \fIGIMP\fP