Skip to contentSkip to conversation

package/rcw: allow not having custom rcwi files

PATCH New Francois Gervais 3 participants 4 messages Feb 21, 2020 – Feb 24, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rcw: allow not having custom rcwi files

A project could quite possibly have a custom rcw file that does not rely on any custom rcw include files (rcwi).

Allow the build to succeed if this is the case.

---
 package/rcw/rcw.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/rcw/rcw.mk +3 -1
index 36d2da61b5..c1fb63b91b 100644
@@ -25,7 +25,9 @@ endif
 
 define HOST_RCW_ADD_CUSTOM_RCW_FILES
 	mkdir -p $(@D)/custom_board/rcw
-	cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board
+	if [ -n "$(filter-out %.rcw,$(RCW_FILES))" ]; then \
+		cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board; \
+	fi
 	cp -f $(filter %.rcw,$(RCW_FILES)) $(@D)/custom_board/rcw
 endef
 HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_FILES
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/rcw: allow not having custom rcwi files

I must say, this patch will conflict with this pending one:

[v5,2/9] package/qoriq-rcw: move rcw into nxp and rename it
https://patchwork.ozlabs.org/patch/1234790/

If the patch from Changming Huang is close to being pulled-in, we might want to delay the inclusion of mine and I'll update it based on Changming's work.

One way or the other is fine with me.

Quoted 31 lines

-----Original Message-----
From: Francois Gervais <[email protected]>
Sent: February 21, 2020 9:40 AM
To: buildroot at buildroot.org
Cc: Matt Weber <[email protected]>; Gervais, Francois <[email protected]>
Subject: [PATCH 1/1] package/rcw: allow not having custom rcwi files

A project could quite possibly have a custom rcw file that does not rely on any custom rcw include files (rcwi).

Allow the build to succeed if this is the case.

---
 package/rcw/rcw.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/rcw/rcw.mk +3 -1
@@ -25,7 +25,9 @@ endif
 
 define HOST_RCW_ADD_CUSTOM_RCW_FILES
 	mkdir -p $(@D)/custom_board/rcw
-	cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board
+	if [ -n "$(filter-out %.rcw,$(RCW_FILES))" ]; then \
+		cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board; \
+	fi
 	cp -f $(filter %.rcw,$(RCW_FILES)) $(@D)/custom_board/rcw  endef  HOST_RCW_POST_PATCH_HOOKS +=

HOST_RCW_ADD_CUSTOM_RCW_FILES
--
2.20.1

#2 lore raw

PATCH 1/1 package/rcw: allow not having custom rcwi files

In reply to Francois Gervais

Fran?ois, All,

On 2020-02-21 09:40 -0500, Francois Gervais spake thusly:

Quoted 15 lines

A project could quite possibly have a custom rcw file that does not rely on any custom rcw include files (rcwi).

Allow the build to succeed if this is the case.

---
 package/rcw/rcw.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/rcw/rcw.mk +0 -0
index 36d2da61b5..c1fb63b91b 100644

package/rcw/rcw.mk endif · line 30

Quoted 7 lines
package/rcw/rcw.mk +3 -1
@@ -25,7 +25,9 @@ endif
 
 define HOST_RCW_ADD_CUSTOM_RCW_FILES
 	mkdir -p $(@D)/custom_board/rcw
-	cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board
+	if [ -n "$(filter-out %.rcw,$(RCW_FILES))" ]; then \
+		cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board; \
+	fi

I've changed that to use a separate hook for the includes, and pushed that to master.

Please review the commit in case I borked anything. Thanks! ;-)

Regards,
Yann E. MORIN.

Quoted 10 lines
package/rcw/rcw.mk +0 -0
 	cp -f $(filter %.rcw,$(RCW_FILES)) $(@D)/custom_board/rcw
 endef
 HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_FILES
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/rcw: allow not having custom rcwi files

Quoted 35 lines

-----Original Message-----
From: Yann E. MORIN <[email protected]>
Sent: February 23, 2020 4:18 PM
To: Gervais, Francois <[email protected]>
Cc: buildroot at buildroot.org; Matt Weber <[email protected]>
Subject: Re: [Buildroot] [PATCH 1/1] package/rcw: allow not having custom rcwi files

Fran?ois, All,

On 2020-02-21 09:40 -0500, Francois Gervais spake thusly:

Quoted 15 lines

A project could quite possibly have a custom rcw file that does not rely on any custom rcw include files (rcwi).

Allow the build to succeed if this is the case.

---
 package/rcw/rcw.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/rcw/rcw.mk index renamed from package/rcw/rcw.mk +0 -0

36d2da61b5..c1fb63b91b 100644

package/rcw/rcw.mk endif · line 30

Quoted 7 lines
package/rcw/rcw.mk +3 -1
@@ -25,7 +25,9 @@ endif
 
 define HOST_RCW_ADD_CUSTOM_RCW_FILES
 	mkdir -p $(@D)/custom_board/rcw
-	cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board
+	if [ -n "$(filter-out %.rcw,$(RCW_FILES))" ]; then \
+		cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board; \
+	fi

I've changed that to use a separate hook for the includes, and pushed that to master.

Quoted 1 line

Please review the commit in case I borked anything. Thanks! ;-)

I confirm, the version in master works fine. Thank you for showing me a better version of my patch.

Quoted 8 lines

Regards,
Yann E. MORIN.

Quoted 4 lines
package/rcw/rcw.mk +0 -0
 	cp -f $(filter %.rcw,$(RCW_FILES)) $(@D)/custom_board/rcw  endef

HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_FILES --
2.20.1