All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Millikin <john@john-millikin.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: [PATCH v2] lib/raid6: Let $(UNROLL) rules work with macOS userland
Date: Wed, 23 Dec 2020 15:23:25 +0900	[thread overview]
Message-ID: <60f12be3-2f7f-8c7c-55dc-f360ff959fe0@john-millikin.com> (raw)
In-Reply-To: <CAK7LNARnoU6GFCxNTEzOqj1J2hYZVNJKTtEb81b_VtRz6jswiQ@mail.gmail.com>

Older versions of BSD awk are fussy about the order of '-v' and '-f'
flags, and require a space after the flag name. This causes build
failures on platforms with an old awk, such as macOS and NetBSD.

Since GNU awk and modern versions of BSD awk (distributed with
FreeBSD/OpenBSD) are fine with either form, the definition of
'cmd_unroll' can be trivially tweaked to let the lib/raid6 Makefile
work with both old and new awk flag dialects.

Signed-off-by: John Millikin <john@john-millikin.com>
---
Changes in v2:
  - Updated the patch description to note that only older versions of
    awk (as found in macOS and NetBSD) need this patch to work.

 lib/raid6/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile
index b4c0df6d706d..c770570bfe4f 100644
--- a/lib/raid6/Makefile
+++ b/lib/raid6/Makefile
@@ -48,7 +48,7 @@ endif
 endif
 
 quiet_cmd_unroll = UNROLL  $@
-      cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$* < $< > $@
+      cmd_unroll = $(AWK) -v N=$* -f $(srctree)/$(src)/unroll.awk < $< > $@
 
 targets += int1.c int2.c int4.c int8.c int16.c int32.c
 $(obj)/int%.c: $(src)/int.uc $(src)/unroll.awk FORCE
-- 


  reply	other threads:[~2020-12-23  6:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  8:21 [PATCH] lib/raid6: Let $(UNROLL) rules work with BSD userland John Millikin
2020-12-16  5:45 ` Masahiro Yamada
2020-12-23  4:24   ` John Millikin
2020-12-23  6:08     ` Masahiro Yamada
2020-12-23  6:23       ` John Millikin [this message]
2020-12-23  8:11         ` [PATCH v2] lib/raid6: Let $(UNROLL) rules work with macOS userland Masahiro Yamada

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=60f12be3-2f7f-8c7c-55dc-f360ff959fe0@john-millikin.com \
    --to=john@john-millikin.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.