Skip to content

Commit 5ff98db

Browse files
authored
Merge pull request #21812 from crasbe/pr/nrf_vendor_fixup
cpu/nrf5x_common: fix vendor header regression from #21800
2 parents 101a7bf + 89031c4 commit 5ff98db

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

cpu/nrf5x_common/Makefile.nrfx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ else ifeq (nrf52, $(CPU_FAM))
2121

2222
PKG_SPARSE_PATHS += mdk/nrf52811.h
2323
PKG_SPARSE_PATHS += mdk/nrf52811_bitfields.h
24-
PKG_SPARSE_PATHS += mdk/nrf52811_name_change.h
2524
PKG_SPARSE_PATHS += mdk/nrf52811_peripherals.h
2625

2726
PKG_SPARSE_PATHS += mdk/nrf52832_peripherals.h
2827

2928
PKG_SPARSE_PATHS += mdk/nrf52833.h
3029
PKG_SPARSE_PATHS += mdk/nrf52833_bitfields.h
31-
PKG_SPARSE_PATHS += mdk/nrf52833_name_change.h
3230
PKG_SPARSE_PATHS += mdk/nrf52833_peripherals.h
3331

3432
PKG_SPARSE_PATHS += mdk/nrf52840.h
@@ -48,13 +46,23 @@ else ifneq (nrf53%, $(CPU_FAM))
4846

4947
endif
5048

51-
PKG_SOURCE_DIR = $(BUILD_DIR)/nrf5x_nrfx_mdk/$(CPU_FAM)
52-
PKG_PATCH_DIR = $(RIOTCPU)/nrf5x_common/include/vendor/patches/$(CPU_FAM)
49+
# The rust implementation of git-cache is the only one doing
50+
# a sparse checkout. The others do a full clone, which we need to
51+
# consider here.
52+
ifneq (,$(GIT_CACHE_RS))
53+
PKG_SOURCE_DIR = $(BUILD_DIR)/nrf5x_nrfx_mdk/$(CPU_FAM)
54+
VENDOR_FOLDER = $(PKG_SOURCE_DIR)/vendor
55+
else
56+
PKG_SOURCE_DIR = $(BUILD_DIR)/nrf5x_nrfx_mdk
57+
VENDOR_FOLDER = $(PKG_SOURCE_DIR)/$(CPU_FAM)/vendor
58+
endif
59+
60+
PKG_PATCH_DIR = $(RIOTCPU)/nrf5x_common/include/vendor/patches
5361

5462
include $(RIOTBASE)/pkg/pkg.mk
5563

56-
# The sparse checkout keeps the path, but we need to have the header in a
64+
# The sparse checkout keeps the path, but we need to have the headers in a
5765
# subfolder called "vendor".
5866
all:
59-
@mkdir -p $(PKG_SOURCE_DIR)/vendor
60-
@cp $(PKG_SOURCE_DIR)/mdk/* $(PKG_SOURCE_DIR)/vendor
67+
@mkdir -p $(VENDOR_FOLDER)
68+
@cp $(addprefix $(PKG_SOURCE_DIR)/, $(PKG_SPARSE_PATHS)) $(VENDOR_FOLDER)

0 commit comments

Comments
 (0)