[riot-devel] Activation of modules by make command line

Joakim Nohlgård joakim.nohlgard at eistec.se
Thu Sep 6 11:30:24 CEST 2018


In case anyone stumbles across this thread in the future:
The difference is that giving a variable on the command line to make will
cause that variable to become immutable by the makefiles, which means that
it will not be updated by the USEMODULE += module commands in the makefiles
(unless the special command "override USEMODULE" is used in the makefile).
So the easy solution is to only set it in the environment and not on the
command line.

/Joakim

Den tor 6 sep. 2018 11:26Gunar Schorcht <gunar at schorcht.net> skrev:

> Hi Martine,
> hi Joakim,
>
> thanks for the fast answer. I already thought that it should work using
> an environment variables, but I unfortunatly tried
>
> make BOARD=... USEMODULE="sdcard_spi mrf24j40"
>
> which didn't work, my fault.
>
> USEMODULE="sdcard_spi mrf24j40" make BOARD=...
>
> works as expected.
>
> Thanks.
>
> Regards
> Gunar
>
> On 06.09.2018 10:44, Martine Lenders wrote:
> > Hi Gunar,
> >
> > Of course it is possible to do it from command-line. You were pretty
> > close, but you don't need an intermediate variable. Just set the
> > variable USEMODULE in your environment:
> >
> >     USEMODULE="sdcard_spi mrf24j40" BOARD=... make ...
> >
> > Regards,
> > Martine
> >
> > Am Do., 6. Sep. 2018 um 10:33 Uhr schrieb Gunar Schorcht
> > <gunar at schorcht.net <mailto:gunar at schorcht.net>>:
> >
> >     Hi,
> >
> >     It is often necessary to enable or disable various functions at
> >     compilation time, for example, to test dependencies. In RIOT,
> features
> >     are activated using the module concept:
> >
> >             USEMODULE + = feature
> >
> >     I'm wondering whether there is a possibility to enable modules
> without
> >     changing the makefile when the make command is called, for example:
> >
> >             make BOARD=... USE_MODULES="sdcard_spi mrf24j40"
> >
> >     I was looking through the documentation and the makefile structure
> for
> >     something like
> >
> >             USEMODULE += $(USE_MODULES)
> >
> >     Did I miss something? If it is not possible, would it be worth to
> >     realize it?
> >
> >     Regards
> >     Gunar
> >
> >     --
> >     Wenn du laufen willst, lauf eine Meile. Wenn du ein neues Leben
> >     kennenlernen willst, dann lauf Marathon. (Emil Zatopek)
> >
> >     _______________________________________________
> >     devel mailing list
> >     devel at riot-os.org <mailto:devel at riot-os.org>
> >     https://lists.riot-os.org/mailman/listinfo/devel
> >
> >
> >
> > _______________________________________________
> > devel mailing list
> > devel at riot-os.org
> > https://lists.riot-os.org/mailman/listinfo/devel
> >
>
>
> --
> Dr. Gunar Schorcht
>
> Mission Level Design GmbH
> Langewiesener Strasse 22
> 98693 Ilmenau
>
> schorcht at mldesigner.de
>
> Sitz der Gesellschaft:
> Lohmühlenweg 2
> 99310 Arnstadt
>
> Amtsgericht Jena: HRB 111384
> Geschäftsführung: Dipl.-Inf. Tino Jungebloud
>
>
>
> --
> Wenn du laufen willst, lauf eine Meile. Wenn du ein neues Leben
> kennenlernen willst, dann lauf Marathon. (Emil Zatopek)
>
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20180906/d54917c7/attachment.html>


More information about the devel mailing list