From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2041) id A62C63857424; Wed, 29 Jun 2022 04:37:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A62C63857424 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Vladimir Mezentsev To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] gprofng: use $(sysconfdir) instead $(prefix)/etc X-Act-Checkin: binutils-gdb X-Git-Author: Vladimir Mezentsev X-Git-Refname: refs/heads/master X-Git-Oldrev: 22a8ddfe934283113c8e88de3b49caee40343e14 X-Git-Newrev: 6284f0aa11381a472d7f0ecac6b24b989d2c12db Message-Id: <20220629043721.A62C63857424@sourceware.org> Date: Wed, 29 Jun 2022 04:37:21 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2022 04:37:21 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D6284f0aa1138= 1a472d7f0ecac6b24b989d2c12db commit 6284f0aa11381a472d7f0ecac6b24b989d2c12db Author: Vladimir Mezentsev Date: Tue Jun 28 09:04:49 2022 -0700 gprofng: use $(sysconfdir) instead $(prefix)/etc =20 gprofng/ChangeLog 2022-06-28 Vladimir Mezentsev =20 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 =3D libgprofng.la ZLIB =3D @zlibdir@ -lz ZLIBINC =3D @zlibinc@ =20 -AM_CPPFLAGS =3D $(GPROFNG_CPPFLAGS) -DLOCALEDIR=3D\"@localedir@\" -I.. -I$= (srcdir) \ +LOCALEDIR =3D @localedir@ +SYSCONFDIR =3D @sysconfdir@ + +AM_CPPFLAGS =3D $(GPROFNG_CPPFLAGS) -DLOCALEDIR=3D\"$(LOCALEDIR)\" \ + -DSYSCONFDIR=3D\"$(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 =3D $(top_builddir)/../opcodes/lib= opcodes.la \ $(GPROFNG_LIBADD) \ $(PTHREAD_LIBS) -ldl =20 -dbedir =3D $(prefix)/etc +dbedir =3D $(SYSCONFDIR) dbe_DATA =3D $(srcdir)/gprofng.rc =20 =20 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 =3D libgprofng.la # case both are empty. ZLIB =3D @zlibdir@ -lz ZLIBINC =3D @zlibinc@ -AM_CPPFLAGS =3D $(GPROFNG_CPPFLAGS) -DLOCALEDIR=3D\"@localedir@\" -I.. -I$= (srcdir) \ +LOCALEDIR =3D @localedir@ +SYSCONFDIR =3D @sysconfdir@ +AM_CPPFLAGS =3D $(GPROFNG_CPPFLAGS) -DLOCALEDIR=3D\"$(LOCALEDIR)\" \ + -DSYSCONFDIR=3D\"$(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 =3D $(top_builddir)/../opcodes/lib= opcodes.la \ $(GPROFNG_LIBADD) \ $(PTHREAD_LIBS) -ldl =20 -dbedir =3D $(prefix)/etc +dbedir =3D $(SYSCONFDIR) dbe_DATA =3D $(srcdir)/gprofng.rc gp_archive_SOURCES =3D gp-archive.cc ArchiveExp.cc gp_archive_LDADD =3D $(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); =20 // Read system-wide file - rc_path =3D dbe_sprintf (NTXT ("%s/../etc/gprofng.rc"), app->get_run_dir= ()); + rc_path =3D dbe_sprintf (NTXT ("%s/gprofng.rc"), SYSCONFDIR); if (access (rc_path, R_OK | F_OK) !=3D 0) { StringBuilder sb;