public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Mayer <mmayer@broadcom.com>
To: Linux XFS <linux-xfs@vger.kernel.org>
Cc: Markus Mayer <mmayer@broadcom.com>
Subject: [PATCH v2] include/buildrules: substitute ".o" for ".lo" only at the very end
Date: Wed, 17 Feb 2021 14:26:56 -0800	[thread overview]
Message-ID: <20210217222656.1762426-1-mmayer@broadcom.com> (raw)

To prevent issues when the ".o" extension appears in a directory path,
ensure that the ".o" -> ".lo" substitution is only performed for the
file extension immediately preceeding the ":" of a makefile rule.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---

Change since v1:
    - reworked the regex as suggested by David
      https://www.spinics.net/lists/linux-xfs/msg49712.html

 include/buildrules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/buildrules b/include/buildrules
index 7a139ff07de8..f6663615d278 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -133,7 +133,7 @@ rmltdep:
 	$(Q)rm -f .ltdep
 
 .ltdep: $(CFILES) $(HFILES)
-	$(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' > .ltdep
+	$(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o: ,\1.lo: ,' > .ltdep
 
 depend: rmdep .dep
 
-- 
2.25.1


                 reply	other threads:[~2021-02-17 22:27 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=20210217222656.1762426-1-mmayer@broadcom.com \
    --to=mmayer@broadcom.com \
    --cc=linux-xfs@vger.kernel.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