diff mbox series

[iw] Please support CPPFLAGS in Makefile

Message ID 2024dc2e-fb2d-2866-141e-78044d3ccba2@ninthfloor.org (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series [iw] Please support CPPFLAGS in Makefile | expand

Commit Message

Paride Legovini Nov. 8, 2018, 8:23 p.m. UTC
Dear linux-wireless,

The attached patch adds support for CPPFLAGS to iw's Makefile.

I am not subscribed to the list, please Cc: me in replies.

Paride

Comments

Johannes Berg Nov. 8, 2018, 8:35 p.m. UTC | #1
On Thu, 2018-11-08 at 21:26 +0100, Johannes Berg wrote:
> Hi,
> 
> > The attached patch adds support for CPPFLAGS to iw's Makefile.
> 
> Please send the patch as plain text (not attachment), and with signed-
> off-by per the CONTRIBUTING file.

Actually, it looks like patchwork knows how to read attachments? :)

So I guess attachment is fine, but you need to add the s-o-b and a
commit message in the patch itself.

johannes
Paride Legovini Nov. 8, 2018, 8:44 p.m. UTC | #2
Johannes Berg wrote on 08/11/2018:
> On Thu, 2018-11-08 at 21:26 +0100, Johannes Berg wrote:
>> Hi,
>>
>>> The attached patch adds support for CPPFLAGS to iw's Makefile.
>>
>> Please send the patch as plain text (not attachment), and with signed-
>> off-by per the CONTRIBUTING file.
> 
> Actually, it looks like patchwork knows how to read attachments? :)
> 
> So I guess attachment is fine, but you need to add the s-o-b and a
> commit message in the patch itself.

Thanks for the hints Johannes.
Here is the updated patch.

Paride
From 5a4c71201f4de8087d220db1755bb7a458dbd23d Mon Sep 17 00:00:00 2001
From: Paride Legovini <pl@ninthfloor.org>
Date: Thu, 8 Nov 2018 21:36:59 +0100
Subject: [PATCH] Honor CPPFLAGS when compiling

Pass CPPFLAGS to the compiler as done with CFLAGS.

Signed-off-by: Paride Legovini <pl@ninthfloor.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 75ae989..9a6c25a 100644
--- a/Makefile
+++ b/Makefile
@@ -101,7 +101,7 @@ version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefil
 
 %.o: %.c iw.h nl80211.h
 	@$(NQ) ' CC  ' $@
-	$(Q)$(CC) $(CFLAGS) -c -o $@ $<
+	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
 ifeq ($(IW_ANDROID_BUILD),)
 iw:	$(OBJS)
Johannes Berg Nov. 9, 2018, 12:20 p.m. UTC | #3
> > So I guess attachment is fine, but you need to add the s-o-b and a
> > commit message in the patch itself.

So, actually, that didn't work. I've applied the patch anyway, but in
the future better submit patches inline in the email so patchwork picks
them up and I can track them (and don't lose them).

johannes
diff mbox series

Patch

From f672e0f8690b7f38d29d83b29f2374787694c31e Mon Sep 17 00:00:00 2001
From: Paride Legovini <pl@ninthfloor.org>
Date: Thu, 8 Nov 2018 21:19:20 +0100
Subject: [PATCH] Honor CPPFLAGS when compiling

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

diff --git a/Makefile b/Makefile
index 75ae989..9a6c25a 100644
--- a/Makefile
+++ b/Makefile
@@ -101,7 +101,7 @@  version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefil
 
 %.o: %.c iw.h nl80211.h
 	@$(NQ) ' CC  ' $@
-	$(Q)$(CC) $(CFLAGS) -c -o $@ $<
+	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
 ifeq ($(IW_ANDROID_BUILD),)
 iw:	$(OBJS)
-- 
2.19.1