gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 50f778a3: Installation: system and user config


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 50f778a3: Installation: system and user config files in etc/gnuastro/ subdir
Date: Sun, 4 Feb 2024 13:47:34 -0500 (EST)

branch: master
commit 50f778a3e4136b9bf55e6076fcc8c59904e74c45
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Installation: system and user config files in etc/gnuastro/ subdir
    
    Until now, Gnuastro would install the configureation files of the programs
    in 'PREFIX/etc'. But this directory is used by many programs and can get
    crowded and hard to manage.
    
    With this commit, the system configuration files are installed in
    'PREFIX/etc/gnuastro/' and the user configuration files are searched for in
    the '$HOME/.local/etc/gnuastro/' directory.
    
    This was suggested by Phil Wyett as bug #65249. In the 'NEWS' file, I am
    not marking it as a bug, but treating it more like a "task" and have listed
    it as "Changed features".
---
 Makefile.am                  |  3 ++-
 NEWS                         | 16 +++++++++++++++-
 THANKS                       |  1 +
 bin/TEMPLATE/Makefile.am     |  3 ++-
 bin/arithmetic/Makefile.am   |  5 ++---
 bin/buildprog/Makefile.am    |  3 ++-
 bin/convertt/Makefile.am     |  3 ++-
 bin/convolve/Makefile.am     |  3 ++-
 bin/cosmiccal/Makefile.am    |  3 ++-
 bin/crop/Makefile.am         |  3 ++-
 bin/fits/Makefile.am         |  3 ++-
 bin/match/Makefile.am        |  3 ++-
 bin/mkcatalog/Makefile.am    |  3 ++-
 bin/mkprof/Makefile.am       |  3 ++-
 bin/noisechisel/Makefile.am  |  3 ++-
 bin/query/Makefile.am        |  3 ++-
 bin/segment/Makefile.am      |  3 ++-
 bin/statistics/Makefile.am   |  3 ++-
 bin/table/Makefile.am        |  3 ++-
 bin/warp/Makefile.am         |  3 ++-
 configure.ac                 |  2 +-
 doc/announce-acknowledge.txt |  1 +
 doc/gnuastro.texi            | 44 +++++++++++++++++++++++---------------------
 lib/Makefile.am              |  2 +-
 lib/options.c                |  5 ++---
 25 files changed, 80 insertions(+), 47 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 53865925..7b076434 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -179,7 +179,8 @@ dist_doc_DATA = README
 
 # Installed system configuration files
 # ====================================
-dist_sysconf_DATA = bin/gnuastro.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = bin/gnuastro.conf
 
 
 
diff --git a/NEWS b/NEWS
index 09aa1051..7b413d07 100644
--- a/NEWS
+++ b/NEWS
@@ -8,8 +8,22 @@ See the end of the file for license conditions.
 ** New features
 ** Removed features
 ** Changed features
-** Bugs fixed
+*** All programs
+  - System configuration files are installed in 'PREFIX/etc/gnuastro/',
+    ('PREFIX/' is the installation directory of Gnuastro; when installing
+    from source, and if no '--prefix' is given to the './configure script,
+    it is '/usr/local'). Until now, the configuration files of Gnuastro's
+    programs were installed in 'PREFIX/etc/'. But that was a top-level
+    directory for the configuration files of all the programs within the
+    operating system. Therefore the old method would unnecessarily populate
+    that already crowded directory, and finding Gnuastro's configuration
+    files could become non-trivial. This was suggested by Phil Wyett.
+
+  - User configuration files are installed in '$HOME/.local/etc/gnuastro/'
+    instead of '$HOME/.local/etc/'. See the description of system
+    configuration files above for more.
 
+** Bugs fixed
 
 
 
diff --git a/THANKS b/THANKS
index 6fda0f6d..d36ff494 100644
--- a/THANKS
+++ b/THANKS
@@ -109,6 +109,7 @@ support in Gnuastro. The list is ordered alphabetically (by 
family name).
     Paola Dimauro                        paola.dimauro@inaf.it
     Paul Eggert                          eggert@cs.ucla.edu
     Peter Teuben                         teuben@umd.edu
+    Phil Wyett                           philip.wyett@kathenas.org
     Pierre-Alain Duc                     pierre-alain.duc@astro.unistra.fr
     Rahna Payyasseri Thanduparackal      rpayyasseri@cefca.es
     Raphael Morales                      rmorales@iaa.es
diff --git a/bin/TEMPLATE/Makefile.am b/bin/TEMPLATE/Makefile.am
index 5169cf73..befdf679 100644
--- a/bin/TEMPLATE/Makefile.am
+++ b/bin/TEMPLATE/Makefile.am
@@ -47,4 +47,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h TEMPLATE.h
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astTEMPLATE.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astTEMPLATE.conf
diff --git a/bin/arithmetic/Makefile.am b/bin/arithmetic/Makefile.am
index ba30db5c..7305b38f 100644
--- a/bin/arithmetic/Makefile.am
+++ b/bin/arithmetic/Makefile.am
@@ -35,8 +35,6 @@ astarithmetic_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la \
                       $(top_builddir)/lib/libgnuastro.la \
                       $(CONFIG_LDADD)
 
-
-
 astarithmetic_SOURCES = main.c ui.c arithmetic.c operands.c
 
 EXTRA_DIST = main.h authors-cite.h args.h ui.h arithmetic.h operands.h \
@@ -46,4 +44,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h arithmetic.h 
operands.h \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astarithmetic.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astarithmetic.conf
diff --git a/bin/buildprog/Makefile.am b/bin/buildprog/Makefile.am
index 8c88c117..3039a040 100644
--- a/bin/buildprog/Makefile.am
+++ b/bin/buildprog/Makefile.am
@@ -101,6 +101,7 @@ astbuildprog.conf: 
$(top_srcdir)/bin/buildprog/astbuildprog.conf.in
 ## the configuration file being distributed it so use a 'nodist_' prefix.
 ##
 ## NOTE: the man page is created in doc/Makefile.am
-nodist_sysconf_DATA = astbuildprog.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+nodist_pkgsysconf_DATA = astbuildprog.conf
 check_DATA = astbuildprog.conf
 CLEANFILES = astbuildprog.conf
diff --git a/bin/convertt/Makefile.am b/bin/convertt/Makefile.am
index 9a2874b8..9221fa7e 100644
--- a/bin/convertt/Makefile.am
+++ b/bin/convertt/Makefile.am
@@ -44,4 +44,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h convertt.h 
color.h \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astconvertt.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astconvertt.conf
diff --git a/bin/convolve/Makefile.am b/bin/convolve/Makefile.am
index a95b308d..8de3e43f 100644
--- a/bin/convolve/Makefile.am
+++ b/bin/convolve/Makefile.am
@@ -43,4 +43,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h convolve.h
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astconvolve.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astconvolve.conf
diff --git a/bin/cosmiccal/Makefile.am b/bin/cosmiccal/Makefile.am
index 7984ffea..35afd594 100644
--- a/bin/cosmiccal/Makefile.am
+++ b/bin/cosmiccal/Makefile.am
@@ -44,4 +44,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h cosmiccal.h \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astcosmiccal.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astcosmiccal.conf
diff --git a/bin/crop/Makefile.am b/bin/crop/Makefile.am
index f717e029..91886b15 100644
--- a/bin/crop/Makefile.am
+++ b/bin/crop/Makefile.am
@@ -44,4 +44,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h crop.h 
wcsmode.h onecrop.h \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.ma
-dist_sysconf_DATA = astcrop.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astcrop.conf
diff --git a/bin/fits/Makefile.am b/bin/fits/Makefile.am
index 2967824c..dbe41c2f 100644
--- a/bin/fits/Makefile.am
+++ b/bin/fits/Makefile.am
@@ -45,4 +45,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h extension.c 
fits.h \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astfits.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astfits.conf
diff --git a/bin/match/Makefile.am b/bin/match/Makefile.am
index 71a6d981..c9f0d38e 100644
--- a/bin/match/Makefile.am
+++ b/bin/match/Makefile.am
@@ -43,4 +43,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h match.h
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astmatch.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astmatch.conf
diff --git a/bin/mkcatalog/Makefile.am b/bin/mkcatalog/Makefile.am
index 01f587a3..c0ab613b 100644
--- a/bin/mkcatalog/Makefile.am
+++ b/bin/mkcatalog/Makefile.am
@@ -44,4 +44,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h mkcatalog.h 
columns.h  \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astmkcatalog.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astmkcatalog.conf
diff --git a/bin/mkprof/Makefile.am b/bin/mkprof/Makefile.am
index 06e9ac1e..5bf94167 100644
--- a/bin/mkprof/Makefile.am
+++ b/bin/mkprof/Makefile.am
@@ -44,4 +44,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h mkprof.h 
oneprofile.h    \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astmkprof.conf astmkprof-3d.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astmkprof.conf astmkprof-3d.conf
diff --git a/bin/noisechisel/Makefile.am b/bin/noisechisel/Makefile.am
index 8c1375c2..7f283426 100644
--- a/bin/noisechisel/Makefile.am
+++ b/bin/noisechisel/Makefile.am
@@ -45,4 +45,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h detection.h 
noisechisel.h \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astnoisechisel.conf astnoisechisel-3d.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astnoisechisel.conf astnoisechisel-3d.conf
diff --git a/bin/query/Makefile.am b/bin/query/Makefile.am
index 728a1946..412e032a 100644
--- a/bin/query/Makefile.am
+++ b/bin/query/Makefile.am
@@ -45,4 +45,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h query.h 
astron.h \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astquery.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astquery.conf
diff --git a/bin/segment/Makefile.am b/bin/segment/Makefile.am
index 0ac2621d..f051b170 100644
--- a/bin/segment/Makefile.am
+++ b/bin/segment/Makefile.am
@@ -44,4 +44,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h segment.h 
clumps.h   \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astsegment.conf astsegment-3d.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astsegment.conf astsegment-3d.conf
diff --git a/bin/statistics/Makefile.am b/bin/statistics/Makefile.am
index 09eb5c5e..bc00a7f5 100644
--- a/bin/statistics/Makefile.am
+++ b/bin/statistics/Makefile.am
@@ -43,4 +43,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h sky.h 
statistics.h contour.h
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = aststatistics.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = aststatistics.conf
diff --git a/bin/table/Makefile.am b/bin/table/Makefile.am
index c2a74548..170514af 100644
--- a/bin/table/Makefile.am
+++ b/bin/table/Makefile.am
@@ -44,4 +44,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h arithmetic.h 
table.h \
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = asttable.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = asttable.conf
diff --git a/bin/warp/Makefile.am b/bin/warp/Makefile.am
index dc40f2f6..410e2277 100644
--- a/bin/warp/Makefile.am
+++ b/bin/warp/Makefile.am
@@ -43,4 +43,5 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h warp.h
 
 ## The configuration file (distribute and install).
 ## NOTE: the man page is created in doc/Makefile.am
-dist_sysconf_DATA = astwarp.conf
+pkgsysconfdir = $(sysconfdir)/$(PACKAGE)
+dist_pkgsysconf_DATA = astwarp.conf
diff --git a/configure.ac b/configure.ac
index 8b5ebf8e..31a6aa3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -926,7 +926,7 @@ AC_SUBST(RESTRICT_REPLACEMENT, [$gal_restrict_replace])
 
 # Set the one general parameters:
 AC_DEFINE_UNQUOTED([CONF_POSTFIX], [".conf"], [Configuration file post fix.])
-AC_DEFINE_UNQUOTED([USERCONFIG_DIR], [".local/etc"], [User data dir.])
+AC_DEFINE_UNQUOTED([USERCONFIG_DIR], [".local/etc/gnuastro"], [User data dir.])
 AC_DEFINE_UNQUOTED([CONF_SHOWFMT], [" %-20s"],
                    [Configuration file name format.])
 
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 9eff7e06..68a5aed8 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -1,5 +1,6 @@
 Alphabetically ordered list to acknowledge in the next release.
 
+Phil Wyett
 
 
 
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 6e4c1a01..8c95ad9e 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -8220,20 +8220,20 @@ $ which astnoisechisel
 @end example
 
 As you see, the compiled binary programs (like NoiseChisel) are installed in 
the @file{bin/} sub-directory of the install path (@file{/usr/local} in the 
example above, may be different on your system).
-The configuration files are in the @file{etc/} sub-directory of the install 
path (here only showing NoiseChisel's configuration files):
+The configuration files are in the @file{etc/gnuastro/} sub-directory of the 
install path (here only showing NoiseChisel's configuration files):
 
 @example
-$ ls /usr/local/etc/astnoisechisel*.conf
-/usr/local/etc/astnoisechisel-3d.conf
-/usr/local/etc/astnoisechisel.conf
+$ ls /usr/local/etc/gnuastro/astnoisechisel*.conf
+/usr/local/etc/gnuastro/astnoisechisel-3d.conf
+/usr/local/etc/gnuastro/astnoisechisel.conf
 @end example
 
 @noindent
 We should therefore call NoiseChisel with the 3D configuration file like below 
(please change @file{/usr/local} to any directory that you find from the 
@code{which} command above):
 
 @example
-$ astnoisechisel --config=/usr/local/etc/astnoisechisel-3d.conf \
-                 no-continuum.fits --output=det.fits
+$ astnoisechisel no-continuum.fits --output=det.fits \
+                 --config=/usr/local/etc/gnuastro/astnoisechisel-3d.conf
 @end example
 
 But having to add this long @option{--config} option is annoying and makes the 
command hard to read!
@@ -8244,7 +8244,7 @@ Finally (with the last command), let's have a look at 
NoiseChisel's output:
 
 @example
 $ alias astnoisechisel-3d="astnoisechisel \
-           --config=/usr/local/etc/astnoisechisel-3d.conf"
+           --config=/usr/local/etc/gnuastro/astnoisechisel-3d.conf"
 
 $ astnoisechisel-3d no-continuum.fits --output=det.fits
 
@@ -8311,7 +8311,7 @@ Like NoiseChisel above, to simplify the commands, let's 
make an alias (@ref{3D d
 
 @example
 $ alias astsegment-3d="astsegment \
-           --config=/usr/local/etc/astsegment-3d.conf"
+        --config=/usr/local/etc/gnuastro/astsegment-3d.conf"
 
 $ astsegment-3d det.fits --output=seg.fits
 
@@ -14597,16 +14597,16 @@ Command-line options, for a particular run of 
ProgramName.
 @file{.gnuastro/gnuastro.conf} is parsed by all Gnuastro programs in the 
current directory.
 
 @item
-@file{$HOME/.local/etc/astprogname.conf} is parsed by ProgramName in the 
user's home directory (see @ref{Current directory and User wide}).
+@file{$HOME/.local/etc/gnuastro/astprogname.conf} is parsed by ProgramName in 
the user's home directory (see @ref{Current directory and User wide}).
 
 @item
-@file{$HOME/.local/etc/gnuastro.conf} is parsed by all Gnuastro programs in 
the user's home directory (see @ref{Current directory and User wide}).
+@file{$HOME/.local/etc/gnuastro/gnuastro.conf} is parsed by all Gnuastro 
programs in the user's home directory (see @ref{Current directory and User 
wide}).
 
 @item
-@file{prefix/etc/astprogname.conf} is parsed by ProgramName in the system-wide 
installation directory (see @ref{System wide} for @file{prefix}).
+@file{prefix/etc/gnuastro/astprogname.conf} is parsed by ProgramName in the 
system-wide installation directory (see @ref{System wide} for @file{prefix}).
 
 @item
-@file{prefix/etc/gnuastro.conf} is parsed by all Gnuastro programs in the 
system-wide installation directory (see @ref{System wide} for @file{prefix}).
+@file{prefix/etc/gnuastro/gnuastro.conf} is parsed by all Gnuastro programs in 
the system-wide installation directory (see @ref{System wide} for 
@file{prefix}).
 
 @end enumerate
 
@@ -14651,8 +14651,8 @@ For example, to keep the input's directory when no 
specific output is given (see
 
 @cindex @file{$HOME}
 @cindex @file{./.gnuastro/}
-@cindex @file{$HOME/.local/etc/}
-For the current (local) and user-wide directories, the configuration files are 
stored in the hidden sub-directories named @file{.gnuastro/} and 
@file{$HOME/.local/etc/} respectively.
+@cindex @file{$HOME/.local/etc/gnuastro}
+For the current (local) and user-wide directories, the configuration files are 
stored in the hidden sub-directories named @file{.gnuastro/} and 
@file{$HOME/.local/etc/gnuastro/} respectively.
 Unless you have changed it, the @file{$HOME} environment variable should point 
to your home directory.
 You can check it by running @command{$ echo $HOME}.
 Each time you run any of the programs in Gnuastro, this environment variable 
is read and placed in the above address.
@@ -14669,10 +14669,10 @@ To set the user or current directory configuration 
files based on your command-l
 @node System wide,  , Current directory and User wide, Configuration files
 @subsection System wide
 
-@cindex @file{prefix/etc/}
+@cindex @file{prefix/etc/gnuastro/}
 @cindex System wide configuration files
 @cindex Configuration files, system wide
-When Gnuastro is installed, the configuration files that are shipped with the 
distribution are copied into the (possibly system wide) @file{prefix/etc/} 
directory.
+When Gnuastro is installed, the configuration files that are shipped with the 
distribution are copied into the (possibly system wide) 
@file{prefix/etc/gnuastro} directory.
 For more details on @file{prefix}, see @ref{Installation directory} (by 
default it is: @file{/usr/local}).
 This directory is the final place (with the lowest priority) that the programs 
in Gnuastro will check to retrieve parameter values.
 
@@ -14680,7 +14680,7 @@ If you remove an option and its value from the system 
wide configuration files,
 Recall that none of the programs in Gnuastro keep any internal default values 
and will abort if they do not find a value for the necessary parameters (except 
the number of threads and output file name).
 So even though you might never expect to use an optional option, it safe to 
have it available in this system-wide configuration file even if you do not 
intend to use it frequently.
 
-Note that in case you install Gnuastro from your distribution's repositories, 
@file{prefix} will either be set to @file{/} (the root directory) or 
@file{/usr}, so you can find the system wide configuration variables in 
@file{/etc/} or @file{/usr/etc/}.
+Note that in case you install Gnuastro from your distribution's repositories, 
@file{prefix} will either be set to @file{/} (the root directory) or 
@file{/usr}, so you can find the system wide configuration variables in 
@file{/etc/gnuastro/} or @file{/usr/etc/gnuastro/}.
 The prefix of @file{/usr/local/} is conventionally used for programs you 
install from source by yourself as in @ref{Quick start}.
 
 
@@ -27937,7 +27937,7 @@ For example, if you installed Gnuastro with the prefix 
@file{/usr/local} (the de
 
 @example
 $ astnoisechisel cube.fits \
-                 --config=/usr/local/etc/astnoisechisel-3d.conf
+             --config=/usr/local/etc/gnuastro/astnoisechisel-3d.conf
 @end example
 
 @cindex Shell alias
@@ -27949,7 +27949,7 @@ Assuming that you installed Gnuastro in 
@file{/usr/local}, you can add this line
 
 @example
 alias astnoisechisel-3d="astnoisechisel \
-                    --config=/usr/local/etc/astnoisechisel-3d.conf"
+               --config=/usr/local/etc/gnuastro/astnoisechisel-3d.conf"
 @end example
 
 @noindent
@@ -32014,7 +32014,8 @@ For example, if you installed Gnuastro with the prefix 
@file{/usr/local} (the de
 As with all configuration files, if you want to customize a given option, call 
it before the configuration file.
 
 @example
-$ astmkprof --config=/usr/local/etc/astmkprof-3d.conf catalog.txt
+$ astmkprof --config=/usr/local/etc/gnuastro/astmkprof-3d.conf \
+            catalog.txt
 @end example
 
 @cindex Shell alias
@@ -32025,7 +32026,8 @@ To further simplify the process, you can define a shell 
alias in any startup fil
 Assuming that you installed Gnuastro in @file{/usr/local}, you can add this 
line to the startup file (you may put it all in one line, it is broken into two 
lines here for fitting within page limits).
 
 @example
-alias astmkprof-3d="astmkprof --config=/usr/local/etc/astmkprof-3d.conf"
+alias astmkprof-3d="astmkprof \
+               --config=/usr/local/etc/gnuastro/astmkprof-3d.conf"
 @end example
 
 @noindent
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 2b0feae4..447242cc 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -54,7 +54,7 @@ endif
 ##                        numpy C-API.
 AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
               -I\$(top_srcdir)/bootstrapped/lib \
-              -DSYSCONFIG_DIR=\"$(sysconfdir)\" \
+              -DSYSCONFIG_DIR=\"$(sysconfdir)/$(PACKAGE)\" \
               $(MAYBE_NUMPY_INCLUDE)
 
 
diff --git a/lib/options.c b/lib/options.c
index dc2f8767..9105ddec 100644
--- a/lib/options.c
+++ b/lib/options.c
@@ -2763,12 +2763,11 @@ gal_options_call_parse_config_file(struct argp_option 
*option, char *arg,
 
     - 'SYSCONFIG_DIR' is passed onto the library functions at compile time
       from the command-line. You can search for it in the outputs of
-      'make'. The main reason is that we want the the user still has the
+      'make'. The main reason is that we want the user to still have the
       chance to change the installation directory after 'configure'.
 
-    - 'USERCONFIG_DIR' is defined in 'config.h'.
+    - 'USERCONFIG_DIR' is defined in 'config.h' (from 'configure.ac'). */
 
-    - 'CURDIRCONFIG_DIR' is defined in 'config.h'. */
 static void
 gal_options_parse_config_files(struct gal_options_common_params *cp)
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]