[pacman-dev] [PATCH 1/2] meson: fix website target

Eli Schwartz eschwartz at archlinux.org
Sun Jan 13 14:35:19 UTC 2019


On 1/13/19 8:15 AM, Dave Reisner wrote:
> On Sat, Jan 12, 2019 at 09:15:00PM -0500, Eli Schwartz wrote:
>> A number of pages don't actually exist as html inside the source tree,
>> and need to be generated even though they are manpages.
>>
>> This caused the website.tar.gz target to only work inside a dirty tree
>> initially created by autotools.
>>
>> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
>> ---
>>  doc/meson.build | 19 +++++++++++++++----
>>  1 file changed, 15 insertions(+), 4 deletions(-)
>>
>> diff --git a/doc/meson.build b/doc/meson.build
>> index 7c9631cb..4d796492 100644
>> --- a/doc/meson.build
>> +++ b/doc/meson.build
>> @@ -14,6 +14,13 @@ manpages = [
>>    { 'name': 'BUILDINFO.5' },
>>  ]
>>  
>> +sitepages = [
>> +  { 'name': 'submitting-patches' },
>> +  { 'name': 'translation-help' },
>> +  { 'name': 'HACKING', 'source': join_paths(meson.current_source_dir(), '../HACKING') },
> 
> This would be nicer as join_paths(meson.source_root(), 'HACKING')

Apparently that is bad or something because of the possibility that in a
subproject it would refer to the parent project. Actually though it
looks like just using { 'source': '../HACKING' } works fine... meson is
totally able to handle a filepath with relative paths here.

>> +  { 'name': 'index' },
>> +]
>> +
>>  asciidoc_conf = join_paths(meson.current_source_dir(), 'asciidoc.conf')
>>  
>>  asciidoc_opts = [
>> @@ -58,6 +65,12 @@ foreach page : manpages
>>      install : true,
>>      install_dir : mandirn,
>>    )
>> +endforeach
>> +
>> +foreach page: manpages + sitepages
>> +  manpage = page['name']
>> +  htmlpage = '@0 at .html'.format(manpage)
>> +  input = page.get('source', '@0 at .asciidoc'.format(manpage))
>>  
>>    html = custom_target(
>>      htmlpage,
>> @@ -85,6 +98,8 @@ foreach page : manpages
>>    html_files += [htmlpage]
>>  endforeach
>>  
>> +
>> +
> 
> One too many newlines?

TBH, two too many newlines.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20190113/4b86a6ad/attachment.asc>


More information about the pacman-dev mailing list