[Buildroot] CMake and VERBOSE variable

Cédric Marie cedric.marie at openmailbox.org
Mon Jun 22 14:22:41 UTC 2015


Le 2015-06-22 13:57, Samuel Martin a écrit :
>> No, you can still build with "make VERBOSE=1" and CMake will take it 
>> into
>> account.
> 
> Not really convenient :(
> AFAICS, VERBOSE is not an official env. var. altering Buildroot's
> behavior, unlike V [1].
> 
> If VERBOSE should only be set for cmake-based package, in addition to
> globally unexport it, I'd prefer:
> - either fix the cmake infra to keep the same behavior from the user
> point of view;
> - or update the doc.
> 
> I prefer the 1st option.


I guess you're right. I was not aware of that.

Please note that the first patch will not remove the export of VERBOSE. 
It will export it only if V is set.
The patch proposed by Arnout was:

  ifeq ($(KBUILD_VERBOSE),1)
    quiet =
    Q =
  ifndef VERBOSE
    VERBOSE = 1
  endif
+export VERBOSE
  else
    quiet = quiet_
    Q = @
  endif

Which means that you can still enable CMake verbose mode with "make 
V=1".


In the second patch, we are planning to remove: quiet Q KBUILD_VERBOSE 
VERBOSE
It would be possible to keep VERBOSE (and export it only if V is set), 
but I agree that it would make more sense to turn V into VERBOSE in 
cmake-infra, since it is CMake specific, and CMake does not understand 
V.

But then, what about autotools?
V is supposed to be taken into account by autotools, but I can't see no 
difference with V=0 or V=1, even when forcing it in <pkg>_BUILD_CMDS. 
(Checked with gdb for example).



> I think it is intentional (given [2] and the number of occurences of
> "\<VERBOSE\>" in the cmake code base ;-]).

What I suggested to be non-intentional is the empty VERBOSE case, which 
produces only the "dependee" messages.
I have already contacted CMake dev team about that, but I couldn't get a 
clear answer for the empty VERBOSE case.
The discussion is here, I have pointed out the source code that was 
responsible for that behaviour (see the last message of the discussion):
http://www.cmake.org/pipermail/cmake/2014-February/056943.html


-- 
Cédric




More information about the buildroot mailing list