From patchwork Tue Mar 26 19:06:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 87675 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA2C7385828B for ; Tue, 26 Mar 2024 19:08:40 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 5C9473858C56 for ; Tue, 26 Mar 2024 19:08:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C9473858C56 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5C9473858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711480092; cv=none; b=vdSh47UpRehFK7vlJ2TfoIiShuM5jHDpsmDjLcwLTDaoQIxMMHhuTLXC1nAHe2hpQBZIbyso+xmwy/Ez9H5JClsG/LAUHri7tBnX6dvGN+lhb9pFzHeH2zd4tlYd304Ict74Ees95Z/hrC4muDdRP1ZgNzZZnex/6APDTI5Bwyw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711480092; c=relaxed/simple; bh=JlOl3pqzwBU6mwX7THGTAHqyo2uakwRRjCjxZIh4gKA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=H5gmXJVnhRGJ6iZSKuFIWbnu61Veuf71BX09bRNMlhVedkQZgpVZVjvDt8qD1Q4uFzQkgliIqtKpzJkOzvuTMRykAYtY8lb5mybcyxVe7ugf+KkbgwjIWa5135818sOOW//E3uZ+05zNMs1NXa2AKSYfwUn8eIliVguEcvp0daQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost.localdomain (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 8AD341E0AC; Tue, 26 Mar 2024 15:08:08 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH v3 1/4] gdb, gdbserver, gdbsupport: reformat some Makefile variables, one entry per line Date: Tue, 26 Mar 2024 15:06:43 -0400 Message-ID: <20240326190806.89541-2-simon.marchi@efficios.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240326190806.89541-1-simon.marchi@efficios.com> References: <20240326190806.89541-1-simon.marchi@efficios.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1173.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Reformat some variables definitions. I think it makes them easier to read, and it also makes diffs clearer. Change-Id: I82f63ba0e6d0fe268eb1f1ad5ab22c3cd016ab02 --- gdb/Makefile.in | 39 ++++++++++++++++++++++++-------- gdbserver/Makefile.in | 50 ++++++++++++++++++++++++++++++++---------- gdbsupport/Makefile.am | 15 +++++++++---- gdbsupport/Makefile.in | 15 +++++++++---- 4 files changed, 90 insertions(+), 29 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 331620375aed..bf57a9a3e62e 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -260,7 +260,9 @@ LIBBACKTRACE_LIB=@LIBBACKTRACE_LIB@ SUPPORT = ../gdbsupport LIBSUPPORT = $(SUPPORT)/libgdbsupport.a -INCSUPPORT = -I$(srcdir)/.. -I.. +INCSUPPORT = \ + -I$(srcdir)/.. \ + -I.. # # CLI sub directory definitons @@ -601,8 +603,12 @@ CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR)) # your system doesn't have fcntl.h in /usr/include (which is where it # should be according to Posix). DEFS = @DEFS@ -GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \ - -DLOCALEDIR="\"$(localedir)\"" $(DEFS) +GDB_CFLAGS = \ + -I. \ + -I$(srcdir) \ + -I$(srcdir)/config \ + -DLOCALEDIR="\"$(localedir)\"" \ + $(DEFS) # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory. GLOBAL_CFLAGS = $(MH_CFLAGS) @@ -626,12 +632,27 @@ INTERNAL_CPPFLAGS = $(CPPFLAGS) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@ \ # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. INTERNAL_CFLAGS_BASE = \ - $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ - $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ - $(READLINE_CFLAGS) $(ZLIBINC) $(ZSTD_CFLAGS) $(LIBDECNUMBER_CFLAGS) \ - $(INTL_CFLAGS) $(INCGNU) $(INCSUPPORT) $(LIBBACKTRACE_INC) \ - $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS) $(SRCHIGH_CFLAGS) \ - $(TOP_CFLAGS) $(PTHREAD_CFLAGS) $(DEBUGINFOD_CFLAGS) $(GMPINC) \ + $(GLOBAL_CFLAGS) \ + $(PROFILE_CFLAGS) \ + $(GDB_CFLAGS) \ + $(OPCODES_CFLAGS) \ + $(BFD_CFLAGS) \ + $(INCLUDE_CFLAGS) \ + $(READLINE_CFLAGS) \ + $(ZLIBINC) \ + $(ZSTD_CFLAGS) \ + $(LIBDECNUMBER_CFLAGS) \ + $(INTL_CFLAGS) \ + $(INCGNU) \ + $(INCSUPPORT) \ + $(LIBBACKTRACE_INC) \ + $(ENABLE_CFLAGS) \ + $(INTERNAL_CPPFLAGS) \ + $(SRCHIGH_CFLAGS) \ + $(TOP_CFLAGS) \ + $(PTHREAD_CFLAGS) \ + $(DEBUGINFOD_CFLAGS) \ + $(GMPINC) \ $(AMD_DBGAPI_CFLAGS) INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS) INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS) diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in index c7120895a26d..3aa7aa760eaf 100644 --- a/gdbserver/Makefile.in +++ b/gdbserver/Makefile.in @@ -114,7 +114,9 @@ INTL = @LIBINTL@ INTL_DEPS = @LIBINTL_DEP@ INTL_CFLAGS = @INCINTL@ -INCSUPPORT = -I$(srcdir)/.. -I.. +INCSUPPORT = \ + -I$(srcdir)/.. \ + -I.. # All the includes used for CFLAGS and for lint. # -I. for config files. @@ -125,9 +127,15 @@ INCSUPPORT = -I$(srcdir)/.. -I.. # in those directories should be included with the subdirectory. # e.g.: "target/wait.h". # -INCLUDE_CFLAGS = -I. -I${srcdir} \ - -I$(srcdir)/../gdb/regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \ - -I$(srcdir)/../gdb $(INCGNU) $(INCSUPPORT) \ +INCLUDE_CFLAGS = \ + -I. \ + -I${srcdir} \ + -I$(srcdir)/../gdb/regformats \ + -I$(srcdir)/.. \ + -I$(INCLUDE_DIR) \ + -I$(srcdir)/../gdb \ + $(INCGNU) \ + $(INCSUPPORT) \ $(INTL_CFLAGS) # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS @@ -155,10 +163,21 @@ WIN32APILIBS = @WIN32APILIBS@ MAYBE_LIBICONV = @MAYBE_LIBICONV@ # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. -INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \ - ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS) -INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS) -INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER +INTERNAL_CFLAGS_BASE = \ + ${GLOBAL_CFLAGS} \ + ${PROFILE_CFLAGS} \ + ${INCLUDE_CFLAGS} \ + ${CPPFLAGS} \ + $(PTHREAD_CFLAGS) + +INTERNAL_WARN_CFLAGS = \ + ${INTERNAL_CFLAGS_BASE} \ + $(WARN_CFLAGS) + +INTERNAL_CFLAGS = \ + ${INTERNAL_WARN_CFLAGS} \ + $(WERROR_CFLAGS) \ + -DGDBSERVER # LDFLAGS is specifically reserved for setting from the command line # when running make. @@ -472,17 +491,24 @@ MAKEOVERRIDES = regdat_sh = $(srcdir)/../gdb/regformats/regdat.sh -UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION +UST_CFLAGS = \ + $(ustinc) \ + -DCONFIG_UST_GDB_INTEGRATION # Undo gnulib replacements for the IPA shared library build. # The gnulib headers are still needed, but gnulib is not linked # into the IPA lib so replacement apis don't work. -UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r -Drpl_free=free \ - -Drpl_malloc=malloc -Drpl_realloc=realloc +UNDO_GNULIB_CFLAGS = \ + -Drpl_strerror_r=strerror_r \ + -Drpl_free=free \ + -Drpl_malloc=malloc \ + -Drpl_realloc=realloc # Note, we only build the IPA if -fvisibility=hidden is supported in # the first place. -IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \ +IPAGENT_CFLAGS = \ + $(INTERNAL_CFLAGS) \ + $(UST_CFLAGS) \ $(UNDO_GNULIB_CFLAGS) \ -fPIC -DIN_PROCESS_AGENT \ -fvisibility=hidden diff --git a/gdbsupport/Makefile.am b/gdbsupport/Makefile.am index 88414b4c927a..7c360aa413ef 100644 --- a/gdbsupport/Makefile.am +++ b/gdbsupport/Makefile.am @@ -25,10 +25,17 @@ ACLOCAL_AMFLAGS = -I . -I ../config # ZW_GNU_GETTEXT_SISTER_DIR, but doesn't have any translations (currently). SUBDIRS = -AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \ - -I../gnulib/import -I$(srcdir)/../gnulib/import \ - -I.. -I$(srcdir)/.. $(INCINTL) -I../bfd -I$(srcdir)/../bfd \ - @LARGEFILE_CPPFLAGS@ +AM_CPPFLAGS = \ + -I$(srcdir)/../include \ + -I$(srcdir)/../gdb \ + -I../gnulib/import \ + -I$(srcdir)/../gnulib/import \ + -I.. \ + -I$(srcdir)/.. \ + $(INCINTL) \ + -I../bfd \ + -I$(srcdir)/../bfd \ + @LARGEFILE_CPPFLAGS@ override CXX += $(CXX_DIALECT) diff --git a/gdbsupport/Makefile.in b/gdbsupport/Makefile.in index 6f8dacc157f9..ab35b9148a50 100644 --- a/gdbsupport/Makefile.in +++ b/gdbsupport/Makefile.in @@ -393,10 +393,17 @@ ACLOCAL_AMFLAGS = -I . -I ../config # from Automake, as gdbsupport uses AM_GNU_GETTEXT through # ZW_GNU_GETTEXT_SISTER_DIR, but doesn't have any translations (currently). SUBDIRS = -AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \ - -I../gnulib/import -I$(srcdir)/../gnulib/import \ - -I.. -I$(srcdir)/.. $(INCINTL) -I../bfd -I$(srcdir)/../bfd \ - @LARGEFILE_CPPFLAGS@ +AM_CPPFLAGS = \ + -I$(srcdir)/../include \ + -I$(srcdir)/../gdb \ + -I../gnulib/import \ + -I$(srcdir)/../gnulib/import \ + -I.. \ + -I$(srcdir)/.. \ + $(INCINTL) \ + -I../bfd \ + -I$(srcdir)/../bfd \ + @LARGEFILE_CPPFLAGS@ AM_CXXFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) noinst_LIBRARIES = libgdbsupport.a