Skip to content

newt/builder: Add SDK private includes support#619

Merged
m-gorecki merged 1 commit into
apache:masterfrom
m-gorecki:m-gorecki/private-include-dirs
May 19, 2026
Merged

newt/builder: Add SDK private includes support#619
m-gorecki merged 1 commit into
apache:masterfrom
m-gorecki:m-gorecki/private-include-dirs

Conversation

@m-gorecki
Copy link
Copy Markdown
Contributor

This allows specifying include directories that will only be used internally in the SDK package.
Usage example (in pkg.yml):

pkg.private_include_dirs:

  • "example/directory1"
  • "example/directory2"

Copy link
Copy Markdown
Contributor

@kasjer kasjer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sjanc
Copy link
Copy Markdown
Contributor

sjanc commented May 19, 2026

Hmm doesn't seem to work for me (notice @osdp in include list not being expanded to repos/osdp)

repository.osdp:
    type: github
    vers: v3.2.1-commit
    user: goToMain
    repo: libosdp

pkg.private_include_dirs:
    - "@osdp/utils/include"

pkg.source_files:
    - "@osdp/src/osdp_common.c"
    - "@osdp/src/osdp_phy.c"

arm-none-eabi-gcc -DAPP_NAME=osdp_sample -DAPP_osdp_sample -DARCH_NAME=cortex_m4 -DARCH_cortex_m4 -DBSP_NAME=nordic_pca10056 -DBSP_nordic_pca10056 -DMBEDTLS_USER_CONFIG_FILE=<mbedtls/config_mynewt.h> -DMYNEWT=1 -DNRF52840_XXAA -Os -Wall -Werror -fdata-sections -ffunction-sections -fno-common -fno-exceptions -ggdb -mcpu=cortex-m4 -mthumb -mthumb-interwork -Ibin/targets/osdp_sample/generated/include -Ibin/targets/osdp_sample/user/pre_build/include -Irepos/apache-mynewt-core/boot/startup/include -Irepos/apache-mynewt-core/crypto/mbedtls/include -Irepos/apache-mynewt-core/crypto/mbedtls/include/mbedtls -Irepos/apache-mynewt-core/crypto/tinycrypt/include -Irepos/apache-mynewt-core/encoding/tinycbor/include -Irepos/apache-mynewt-core/hw/bsp/nordic_pca10056/include -Irepos/apache-mynewt-core/hw/bsp/nordic_pca10056/include/bsp -Irepos/apache-mynewt-core/hw/cmsis-core/include -Irepos/apache-mynewt-core/hw/drivers/trng/include -Irepos/apache-mynewt-core/hw/drivers/trng/trng_nrf52/include -Irepos/apache-mynewt-core/hw/drivers/uart/include -Irepos/apache-mynewt-core/hw/drivers/uart/uart_hal/include -Irepos/apache-mynewt-core/hw/hal/include -Irepos/apache-mynewt-core/hw/mcu/nordic/include -Irepos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/include -Irepos/apache-mynewt-core/hw/mcu/nordic/nrf_common/include -Irepos/apache-mynewt-core/kernel/os/include -Irepos/apache-mynewt-core/kernel/os/include/os/arch/cortex_m4 -Irepos/apache-mynewt-core/libc/baselibc/include -Irepos/apache-mynewt-core/net/osdp/include -Irepos/apache-mynewt-core/net/osdp/src -Irepos/apache-mynewt-core/sys/console/full/include -Irepos/apache-mynewt-core/sys/defs/include -Irepos/apache-mynewt-core/sys/flash_map/include -Irepos/apache-mynewt-core/sys/log/common/include -Irepos/apache-mynewt-core/sys/log/full/include -Irepos/apache-mynewt-core/sys/log/modlog/include -Irepos/apache-mynewt-core/sys/sys/include -Irepos/apache-mynewt-core/sys/sysdown/include -Irepos/apache-mynewt-core/sys/sysinit/include -Irepos/apache-mynewt-core/time/datetime/include -Irepos/apache-mynewt-core/util/cbmem/include -Irepos/apache-mynewt-core/util/mem/include -Irepos/apache-mynewt-core/util/rwlock/include -Irepos/apache-mynewt-mcumgr/cborattr/include -Irepos/mcuboot/boot/bootutil/include -Irepos/mcuboot/boot/mynewt/flash_map_backend/include -Irepos/mcuboot/boot/mynewt/mcuboot_config/include -I@osdp/utils/include -Irepos/arm-CMSIS_5/CMSIS/Core/Include -Irepos/arm-CMSIS_5/CMSIS/DSP/Include -Irepos/mbedtls/include -Irepos/mbedtls/library -Irepos/nordic-nrfx -Irepos/nordic-nrfx/drivers -Irepos/nordic-nrfx/drivers/include -Irepos/nordic-nrfx/drivers/src -Irepos/nordic-nrfx/hal -Irepos/nordic-nrfx/helpers -Irepos/nordic-nrfx/mdk -Irepos/osdp/include -Irepos/osdp/src -c -o /home/janc/devel/mynewt/bin/targets/osdp_sample/app/@apache-mynewt-core/net/osdp/repos/osdp/src/osdp_common.o repos/osdp/src/osdp_common.c

This allows specifying include directories that will only
be used interally in the SDK package.
Usage example (in pkg.yml):

pkg.private_include_dirs:
  - "example/directory1"
  - "example/directory2"
@m-gorecki m-gorecki force-pushed the m-gorecki/private-include-dirs branch from 9035a9e to 5991bf6 Compare May 19, 2026 09:52
@m-gorecki m-gorecki merged commit 1f1aa30 into apache:master May 19, 2026
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants