How to add all files from a folder in src_uri in a bitbake file
Asked Answered
M

3

9

I am having a folder in which there are too many c files (Approx 200 c files)

Right now in the bitbake file of that folder I am adding files in SRC_URI variable like this:

SRC_URI = "file://filename_1.c \
           file://filename_2.c \
                   .
                   .
                   .
           file://filename_n.c \

It is very difficult to add files like this in a SRC_URI variable of a bitbake since I am having too many c files. What can be the shortest way to include all the c files in a bitabake file. Or Is there any way to add the directory of the c files and it will include all the c files present in that directory.

Please help

Moskow answered 20/9, 2017 at 11:50 Comment(0)
C
14

If all of the files are in the same folder, just include the folder.

SRC_URI += " file://folder/ "

All files in the folder will be added.

Clawson answered 5/1, 2018 at 2:42 Comment(1)
is this recursive? what if folder contains subfolders?Brame
K
10

You can use wildcards.

SRC_URI = "file://*.c"
Kranz answered 8/11, 2017 at 12:43 Comment(1)
file:// urls with globbing are no longer supported. The recommended replacement is to simply reference a directory.Shaylashaylah
C
1

Make a tar with all .c files, then mention the tar file name in SRC_URI.

SRC_URI = "file://test.tar.gz"
Command answered 20/9, 2017 at 12:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.