public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Vladimir Mezentsev <vmezents@sourceware.org>
To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org
Subject: [binutils-gdb] gprofng: use $(sysconfdir) instead $(prefix)/etc
Date: Wed, 29 Jun 2022 04:37:21 +0000 (GMT)	[thread overview]
Message-ID: <20220629043721.A62C63857424@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6284f0aa11381a472d7f0ecac6b24b989d2c12db

commit 6284f0aa11381a472d7f0ecac6b24b989d2c12db
Author: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Date:   Tue Jun 28 09:04:49 2022 -0700

    gprofng: use $(sysconfdir) instead $(prefix)/etc
    
    gprofng/ChangeLog
    2022-06-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
    
            PR gprofng/29191
            * src/Makefile.am: Use $(sysconfdir) instead $(prefix)/etc.
            * src/Settings.cc: Likewise.
            * src/Makefile.in: Rebuild.

Diff:
---
 gprofng/src/Makefile.am | 9 +++++++--
 gprofng/src/Makefile.in | 8 ++++++--
 gprofng/src/Settings.cc | 2 +-
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am
index f2bd0a04a9a..bcdd03bfae6 100644
--- a/gprofng/src/Makefile.am
+++ b/gprofng/src/Makefile.am
@@ -104,7 +104,12 @@ LIBGPROFNG = libgprofng.la
 ZLIB = @zlibdir@ -lz
 ZLIBINC = @zlibinc@
 
-AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"@localedir@\" -I.. -I$(srcdir) \
+LOCALEDIR = @localedir@
+SYSCONFDIR = @sysconfdir@
+
+AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" \
+	-DSYSCONFDIR=\"$(SYSCONFDIR)\" \
+	-I.. -I$(srcdir) \
 	-I$(srcdir)/../common \
 	-I$(srcdir)/../../include -I$(srcdir)/../../opcodes \
 	-I../../bfd -I$(srcdir)/../../bfd $(ZLIBINC)
@@ -135,7 +140,7 @@ libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \
 	$(GPROFNG_LIBADD) \
 	$(PTHREAD_LIBS) -ldl
 
-dbedir = $(prefix)/etc
+dbedir = $(SYSCONFDIR)
 dbe_DATA = $(srcdir)/gprofng.rc
 
 
diff --git a/gprofng/src/Makefile.in b/gprofng/src/Makefile.in
index 5101b3930fa..27747708861 100644
--- a/gprofng/src/Makefile.in
+++ b/gprofng/src/Makefile.in
@@ -534,7 +534,11 @@ LIBGPROFNG = libgprofng.la
 # case both are empty.
 ZLIB = @zlibdir@ -lz
 ZLIBINC = @zlibinc@
-AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"@localedir@\" -I.. -I$(srcdir) \
+LOCALEDIR = @localedir@
+SYSCONFDIR = @sysconfdir@
+AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" \
+	-DSYSCONFDIR=\"$(SYSCONFDIR)\" \
+	-I.. -I$(srcdir) \
 	-I$(srcdir)/../common \
 	-I$(srcdir)/../../include -I$(srcdir)/../../opcodes \
 	-I../../bfd -I$(srcdir)/../../bfd $(ZLIBINC)
@@ -560,7 +564,7 @@ libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \
 	$(GPROFNG_LIBADD) \
 	$(PTHREAD_LIBS) -ldl
 
-dbedir = $(prefix)/etc
+dbedir = $(SYSCONFDIR)
 dbe_DATA = $(srcdir)/gprofng.rc
 gp_archive_SOURCES = gp-archive.cc ArchiveExp.cc
 gp_archive_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
diff --git a/gprofng/src/Settings.cc b/gprofng/src/Settings.cc
index 965b9174da6..39cb806dd4e 100644
--- a/gprofng/src/Settings.cc
+++ b/gprofng/src/Settings.cc
@@ -407,7 +407,7 @@ Settings::read_rc (bool ipc_or_rdt_mode)
   free (rc_path);
 
   // Read system-wide file
-  rc_path = dbe_sprintf (NTXT ("%s/../etc/gprofng.rc"), app->get_run_dir ());
+  rc_path = dbe_sprintf (NTXT ("%s/gprofng.rc"), SYSCONFDIR);
   if (access (rc_path, R_OK | F_OK) != 0)
     {
       StringBuilder sb;


                 reply	other threads:[~2022-06-29  4:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220629043721.A62C63857424@sourceware.org \
    --to=vmezents@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).