Skip to content

Commit

Permalink
package/rcw: allow not having custom rcwi files
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Francois Gervais <[email protected]>
[[email protected]: install includes in a separate hook]
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
DC-fgervais authored and yann-morin-1998 committed Feb 23, 2020
1 parent 7bd10f6 commit 78a9eab
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion package/rcw/rcw.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RCW_LICENSE_FILES = LICENSE
RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH))

ifneq ($(RCW_FILES),)
RCW_INCLUDES = $(filter-out %.rcw,$(RCW_FILES))
# Get the name of the custom rcw file from the custom list
RCW_PROJECT = $(notdir $(filter %.rcw,$(RCW_FILES)))

Expand All @@ -23,9 +24,16 @@ $(error BR2_PACKAGE_HOST_RCW_CUSTOM_PATH must have exactly one .rcw file)
endif
endif

ifneq ($(RCW_INCLUDES),)
define HOST_RCW_ADD_CUSTOM_RCW_INCLUDES
mkdir -p $(@D)/custom_board
cp -f $(RCW_INCLUDES) $(@D)/custom_board
endef
HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_INCLUDES
endif

define HOST_RCW_ADD_CUSTOM_RCW_FILES
mkdir -p $(@D)/custom_board/rcw
cp -f $(filter-out %.rcw,$(RCW_FILES)) $(@D)/custom_board
cp -f $(filter %.rcw,$(RCW_FILES)) $(@D)/custom_board/rcw
endef
HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_FILES
Expand Down

0 comments on commit 78a9eab

Please sign in to comment.