[libcamera-devel] [PATCH v3 1/2] Documentation: Introduce sphinx documentation

Kieran Bingham kieran.bingham at ideasonboard.com
Wed Nov 28 01:24:34 CET 2018


Hi Laurent,

On 27/11/2018 18:25, Laurent Pinchart wrote:
> Hi Kieran,
> 
<snip>

>>>> +
>>>> +    custom_target('documentation',
>>>> +		  command: [sphinx, '-W', '-b', 'html', meson.current_source_dir(),
>>>> '@OUTPUT@'], +		  input: docs_sources,
>>>> +		  output: 'html',
>>>> +		  build_by_default: true)
>>>> +
>>>> +    install_subdir(meson.current_build_dir() + '/html',
>>>> +		  install_dir: 'share/doc/libcamera- at 0@'.format(api_version))
>>>> +endif
>>>
>>> Mixing spaces and tabs for indentations worries me. What's your opinion ?
>>
>> This was supposed to align the content to the brackets.
>> Just as we do in in the kernel ...
> 
> I think spaces after tabs for alignment are fine when using tabs for 
> indentation. Mixing tabs and spaces for alignment is what concerns me, as it 
> can create problems with alignment-aware files (such as python sources).
> 
>> It seems that the meson developers do not like tabs at all:
>>
>>  https://mesonbuild.com/Style-guide.html:
>>> Tabs or spaces?
>>>
>>> Always spaces.
>>
>> I'll change
> 
> If we use less that 8 spaces for indentation I also prefer using spaces 
> instead of tabs.
> 
> And according to http://mesonbuild.com/Contributing.html, the preferred style 
> for meson.build files uses two spaces for indentation :-( Should we go for 
> that, or keep 4 spaces ?

  Eugh ... 2 feels incredibly short for an indent :(

    I would personally prefer 4 ... but if meson.build files already
    have a style guide - I think perhaps we should follow it as much as
    possible

  /me shudders again.

#>>>> diff --git a/meson.build b/meson.build
>>>> index 4b3d528c8932..434aa557b8a1 100644
>>>> --- a/meson.build
>>>> +++ b/meson.build
>>>> @@ -2,8 +2,14 @@ project('libcamera - supporting complex camera
>>>> pipelines',
>>>> 'c', 'cpp', version : '0.1',
>>>>    license : 'LGPL 2.1+')
>>>>
>>>> +# TODO: Extract this from project.version.
>>>> +#	Ideally the version at Documentation/conf.py should be
>>>> +#	generated from this too.
>>>> +api_version = '0.1'
>>>> +
>>>>  inc = include_directories('include')
>>>>
>>>> +subdir('Documentation')
>>>>  subdir('lib')
>>>>  subdir('test')
>>>>  subdir('utils')
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list