meson: add docs

Summary:
this here brings one new top level target which is doc. It is not build
by default, and does rerun everything on every call.

ninja doc will create previews and run the doxygen command. After this
is done, a tarbal of the html & man will be created, latex is not added
for now, due to the unability to compile the resulting .tex files.

Nothing of the documentation is installed for now, if this would be
enabled, then every single ninja install would regenerate the whole
documentation again, which is quite a lot, and quite a pain (and
sometimes crashes)

While porting this over, i encountered a problem with *convert* the bug
report is linked in the comment.

fix T7781

Depends on D8690

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7781

Differential Revision: https://phab.enlightenment.org/D8561
devs/lauromoura/pin-unpin
Marcel Hollerbach 3 years ago committed by Xavi Artigas
parent 93070e4f0f
commit 4f5b3b95fb
  1. 5
      doc/Doxyfile.in
  2. 202
      doc/meson.build
  3. 1
      doc/shot.sh
  4. 6
      meson.build

@ -49,7 +49,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = .
OUTPUT_DIRECTORY = @top_builddir@/
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@ -594,7 +594,8 @@ WARN_LOGFILE =
# with spaces.
INPUT = @top_srcdir@/src/lib \
@top_srcdir@/elm_intro.h \
@top_builddir@/src/lib \
@top_builddir@/elm_intro.h \
@srcdir@/index_elm.dox \
@srcdir@/main.dox \
@srcdir@/pkgconfig.dox \

@ -0,0 +1,202 @@
doc_target = []
text_filter_properties= [
['Blend Example', 'Sans', '24', 'blend'],
['Blur', 'Sans:style=bold', '32', 'blur'],
['Bump', 'Sans:style=bold', '64', 'bump'],
['Curve', 'Sans:style=bold', '64', 'curve'],
['Grow - Contour', 'Sans:style=bold', '32', 'grow'],
['Mask', 'Sans:style=bold', '64', 'mask'],
['Transform - Mirror effect', 'Sans', '50', 'transform'],
]
widget_previews = [
['actionslider', 'preview-00.png', 'widget_preview_actionslider', '120', '30'],
['bg', 'preview-00.png', 'widget_preview_bg', '50', '50'],
['box', 'preview-00.png', 'widget_preview_box', '200', '160'],
['bubble', 'preview-00.png', 'widget_preview_bubble1', '160', '50'],
['bubble', 'preview-01.png', 'widget_preview_bubble2', '160', '50'],
['bubble', 'preview-02.png', 'widget_preview_bubble3', '160', '50'],
['button', 'preview-00.png', 'widget_preview_button1', '160', '50'],
['button', 'preview-01.png', 'widget_preview_button2', '160', '50'],
['button', 'preview-02.png', 'widget_preview_button3', '160', '50'],
['calendar', 'preview-00.png', 'widget_preview_calendar', '300', '300'],
['check', 'preview-00.png', 'widget_preview_check1', '160', '50'],
['check', 'preview-01.png', 'widget_preview_check2', '160', '50'],
['check', 'preview-02.png', 'widget_preview_check3', '160', '50'],
['clock', 'preview-00.png', 'widget_preview_clock', '200', '100'],
['colorselector', 'preview-00.png', 'widget_preview_colorselector', '320', '300'],
['conformant', 'preview-00.png', 'widget_preview_conformant', '200', '400'],
['combobox', 'preview-00.png', 'widget_preview_combobox', '300', '300'],
['ctxpopup', 'preview-00.png', 'widget_preview_ctxpopup', '200', '130'],
['datetime', 'preview-00.png', 'widget_preview_datetime1', '360', '60'],
['datetime', 'preview-01.png', 'widget_preview_datetime2', '200', '60'],
['datetime', 'preview-02.png', 'widget_preview_datetime3', '200', '60'],
['dayselector', 'preview-00.png', 'widget_preview_dayselector', '350', '50'],
['diskselector', 'preview-00.png', 'widget_preview_diskselector', '120', '50'],
['entry', 'preview-00.png', 'widget_preview_entry1', '160', '50'],
['entry', 'preview-01.png', 'widget_preview_entry2', '160', '50'],
['entry', 'preview-02.png', 'widget_preview_entry3', '160', '50'],
['entry', 'preview-03.png', 'widget_preview_entry4', '160', '50'],
['fileselector', 'preview-00.png', 'widget_preview_fileselector', '300', '300'],
['fileselector_button', 'preview-00.png', 'widget_preview_fileselector_button1', '200', '50'],
['fileselector_button', 'preview-01.png', 'widget_preview_fileselector_button2', '200', '50'],
['fileselector_button', 'preview-02.png', 'widget_preview_fileselector_button3', '160', '50'],
['fileselector_entry', 'preview-00.png', 'widget_preview_fileselector_entry', '70', '50'],
['flip', 'preview-00.png', 'widget_preview_flip', '100', '100'],
['flipselector', 'preview-00.png', 'widget_preview_flipselector', '100', '60'],
['frame', 'preview-00.png', 'widget_preview_frame', '100', '50'],
['gengrid', 'preview-00.png', 'widget_preview_gengrid', '200', '160'],
['genlist', 'preview-00.png', 'widget_preview_genlist1', '200', '200'],
['genlist', 'preview-01.png', 'widget_preview_genlist2', '200', '160'],
['genlist', 'preview-02.png', 'widget_preview_genlist3', '200', '160'],
['genlist', 'preview-03.png', 'widget_preview_genlist4', '200', '160'],
['genlist', 'preview-04.png', 'widget_preview_genlist5', '200', '160'],
['hover', 'preview-00.png', 'widget_preview_hover', '90', '170'],
['hoversel', 'preview-00.png', 'widget_preview_hoversel', '90', '170'],
['icon', 'preview-00.png', 'widget_preview_icon', '50', '50'],
['image', 'preview-00.png', 'widget_preview_image', '50', '50'],
['index', 'preview-00.png', 'widget_preview_index', '200', '160'],
['inwin', 'preview-00.png', 'widget_preview_inwin1', '200', '160'],
['inwin', 'preview-01.png', 'widget_preview_inwin2', '200', '160'],
['inwin', 'preview-02.png', 'widget_preview_inwin3', '200', '160'],
['label', 'preview-00.png', 'widget_preview_label', '70', '30'],
['layout', 'preview-00.png', 'widget_preview_layout', '200', '160'],
['list', 'preview-00.png', 'widget_preview_list', '200', '200'],
['map', 'preview-00.png', 'widget_preview_map', '256', '256'],
['mapbuf', 'preview-00.png', 'widget_preview_mapbuf', '200', '200'],
['menu', 'preview-00.png', 'widget_preview_menu', '100', '100'],
['notify', 'preview-00.png', 'widget_preview_notify', '60', '30'],
['nstate', 'preview-00.png', 'widget_preview_nstate', '45', '28'],
['panel', 'preview-00.png', 'widget_preview_panel', '150', '50'],
['panes', 'preview-00.png', 'widget_preview_panes', '200', '100'],
['photocam', 'preview-00.png', 'widget_preview_photocam', '243', '162'],
['popup', 'preview-00.png', 'widget_preview_popup', '480', '400'],
['prefs', 'preview-00.png', 'widget_preview_prefs', '200', '160'],
['prefs', 'preview-00.png', 'widget_preview_prefs', '280', '250'],
['progressbar', 'preview-00.png', 'widget_preview_progressbar', '150', '50'],
['radio', 'preview-00.png', 'widget_preview_radio', '60', '20'],
['scroller', 'preview-00.png', 'widget_preview_scroller', '100', '30'],
['segment_control', 'preview-00.png', 'widget_preview_segment_control', '240', '120'],
['separator', 'preview-00.png', 'widget_preview_separator', '10', '80'],
['slider', 'preview-00.png', 'widget_preview_slider', '200', '100'],
['slideshow', 'preview-00.png', 'widget_preview_slideshow', '50', '50'],
['spinner', 'preview-00.png', 'widget_preview_spinner', '160', '30'],
['table', 'preview-00.png', 'widget_preview_table', '100', '100'],
['thumb', 'preview-00.png', 'widget_preview_thumb', '100', '100'],
['toolbar', 'preview-00.png', 'widget_preview_toolbar', '300', '100'],
['web', 'preview-00.png', 'widget_preview_web', '300', '300'],
['win', 'preview-00.png', 'widget_preview_win', '200', '200'],
]
preview_text_filter = executable('preview_text_filter',
join_paths('previews', 'preview_text_filter.c'),
include_directories : config_dir,
dependencies: [ecore_evas],
build_by_default: false,
)
widget_preview_eps = custom_target('widget_preview_prefs_epc',
input: join_paths('widgets', 'widget_preview_prefs.epc'),
output: 'widget_preview_prefs.epb',
command: elm_prefs_cc_exe + ['@INPUT@', '@OUTPUT@'],
build_by_default: false,
depends: [elm_prefs_cc]
)
shot_sh = find_program('shot.sh')
tar = find_program('tar')
convert = find_program('convert')
foreach text_filter_property : text_filter_properties
text = text_filter_property[0]
font = text_filter_property[1]
size = text_filter_property[2]
name = text_filter_property[3]
filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua'))
doc_target += custom_target('preview_text_filters_'+name,
command: [env, 'EFL_RUN_IN_TREE=1', preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size],
depends: preview_text_filter,
output: 'filter_'+name+'.png',
build_by_default: false
)
endforeach
foreach widget_preview : widget_previews
binary = widget_preview[2]
if get_variable(binary, preview_text_filter) == preview_text_filter
tmp = executable(binary,
join_paths('widgets', binary+'.c'),
dependencies: elementary,
build_by_default: false,
c_args : [
'-DPACKAGE_DATA_DIR="'+meson.current_build_dir()+'"',
'-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
'-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"',
'-DDOCW_DIR="'+meson.current_build_dir()+'"']
)
set_variable(binary, tmp)
endif
endforeach
foreach widget_preview : widget_previews
directory = widget_preview[0]
ss = widget_preview[1]
binary = widget_preview[2]
x = widget_preview[3]
y = widget_preview[4]
widget_executable = get_variable(binary)
screen_shot_dir = join_paths(meson.build_root(), 'html', 'img', 'widget', directory)
create_preview = custom_target('widget_preview_'+('_'.join([directory, ss, x, y])),
command: [shot_sh, screen_shot_dir, ss, widget_executable.full_path(), x, y],
output: '-'.join([directory, ss, x, y]),
depends: [widget_executable, widget_preview_eps],
build_by_default: false,
)
convert_preview = []
#
# This does not work see https://github.com/the-paperless-project/paperless/issues/439 for more details
# for now this means that no images will be in the latex documentation
#
#convert_preview = custom_target('convert_preview_'+('_'.join([directory, ss, x, y])),
# command: [convert, join_paths(screen_shot_dir, ss), join_paths(screen_shot_dir, ss.split('.')[0]+'.eps')],
# output: '-'.join([directory, ss, x, y])+'.eps',
# depends: [create_preview],
# build_by_default: false,
#)
doc_target += [create_preview, convert_preview]
endforeach
doc_target += custom_target('doxygen',
command: [doxygen, join_paths(meson.current_build_dir(), 'Doxyfile')],
output: ['empty'],
build_by_default: false
)
compress_target = custom_target('package_doc_tar',
command: [tar, '-C', meson.build_root(), '-cf', 'efl-'+meson.version()+'.tar', 'html', 'man'],
output: 'efl-'+meson.version()+'.tar',
depends: doc_target,
build_by_default: false
)
run_target('doc',
command: ['echo', 'Documentation sucessfully build!'],
depends: compress_target,
)
doxyfile_conf = configuration_data()
doxyfile_conf.merge_from(config_h)
doxyfile_conf.set('srcdir', meson.current_source_dir())
doxyfile_conf.set('top_builddir', meson.build_root())
doxyfile_conf.set('top_srcdir', meson.source_root())
configure_file(
input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: doxyfile_conf,
)

@ -12,6 +12,7 @@ export ELM_DISPLAY=shot
export ILLUME_KBD=0,0,240,123
export ILLUME_IND=0,0,240,32
export ILLUME_STK=0,288,240,32
export EFL_RUN_IN_TREE=1
mkdir -p $DIR || true

@ -478,6 +478,12 @@ foreach evas_loader_map_inst : evas_loader_map
meson.add_install_script('meson/evas_loader_conf.sh', evas_loader_original, evas_loader_link_types)
endforeach
doxygen = find_program('doxygen', required : false)
if get_option('eolian-bootstrap') == false and doxygen.found()
subdir('doc')
endif
#
# Configure files
#

Loading…
Cancel
Save