-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pkg: USEPKG vs USEMODULE #6668
Copy link
Copy link
Open
Labels
Area: build systemArea: Build systemArea: Build systemArea: pkgArea: External package portsArea: External package portsDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRThe issue/PR is used as a discussion starting point about the item of the issue/PRState: don't staleState: Tell state-bot to ignore this issueState: Tell state-bot to ignore this issue
Description
There seem to be some confusion all throughout the code-base about the USEPKG macro and how to use it. My interpretation at this point: USEPKG pulls the package in (i.e. just downloads and patches it), USEMODULE then builds modules that are part of that module. Yes, USEPKG lets the buildsystem step into the package's path, but I see it more like updating DIRS in sys or net/gnrc. However, this does not seem to be the case with all packages. Some use USEPKG and USEMODULE interchangeably, or even require the user only to provide USEPKG, while failing to build if a user provides it in USEMODULE. I think my interpretation makes sense in terms of user-friendliness for several reasons:
- It provides a clear semantic between what a package (a mechanism for building and patching an external module) is and what a module (a build-unit provided to the RIOT image) is
- It allows a package to have sub-modules (see lwIP) or modules that have nothing to do with the project they belong to (see nanocoap, which belongs to @kaspar030's
sockproject), while not desturbing the above mentioned semantics - It allows for pulling in packages transparently to the user:
USEMODULE += lwip_ipv6can updateUSEPKG += lwipinMakefile.depwithout makinglwipall that different from other modules.
Reactions are currently unavailable
Metadata
Metadata
Labels
Area: build systemArea: Build systemArea: Build systemArea: pkgArea: External package portsArea: External package portsDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRThe issue/PR is used as a discussion starting point about the item of the issue/PRState: don't staleState: Tell state-bot to ignore this issueState: Tell state-bot to ignore this issue