I will try to understand the conditions…
- I put DRIVER+=my_driver DRIVER+=lm75 in my build command : OK
DRIVER+=? make ... is not really the correct way, as it is adding directly resulting a “module” with all the same names
$ DRIVER+=my_driver DRIVER+=lm75 make -C tests/driver_lm75/ info-modules | grep my_driver
Instead it would be recommended to do:
DRIVER=lm75 make -C tests/driver_lm75/ info-modules | grep lm75
As mentioned previously, the parameters are missing from the
lm75 and would result in build failure, instead use the
- I put no DRIVER in my Makefile command : OK (because tests/driver_lm75/Makefile have DRIVER?=lm75)
No the makefile in the test sets it to
DRIVER ?= tmp1075… which should work, as it has parameters.
- I put only DRIVER+=my_driver in the Makefile command but modify DRIVER?=lm75 to DRIVER+=lm75 : NOK, I have the issue of lm75_regs.h not found.
DRIVER is really only a "helper
. Maybe it is failing because the lm75
doesn't have parameters. I don't really know what "my_driver module is or how it is implemented, or if it conflicts with the lm75 driver.
I believe the lm75 module only allows one driver, at least if you are using the PARAMS provided.
My question : what is the difference between writing DRIVER+=my_driver DRIVER+=lm75 in the build command and writing DRIVER+=my_driver in the build command and DRIVER+=lm75 in the Makefile?
The makefile splits the
DRIVER values which would result in the
my_driver and the
lm75 module being used.
Just the CLI make command (what I assume you mean by build command) would add those values together making a module