summaryrefslogtreecommitdiff
path: root/doc/meson.build
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-30 12:15:33 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-04-30 12:17:00 +0200
commit4f5b3b95fb1a3c0e4d7f05f9eab6ca46e7006779 (patch)
tree23d405f352613164daa00b6a70e6a05111c97dd9 /doc/meson.build
parent93070e4f0f38867e1ea24cc02773146372ae4dce (diff)
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
Diffstat (limited to 'doc/meson.build')
-rw-r--r--doc/meson.build202
1 files changed, 202 insertions, 0 deletions
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..a24c528
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,202 @@
1doc_target = []
2
3text_filter_properties= [
4 ['Blend Example', 'Sans', '24', 'blend'],
5 ['Blur', 'Sans:style=bold', '32', 'blur'],
6 ['Bump', 'Sans:style=bold', '64', 'bump'],
7 ['Curve', 'Sans:style=bold', '64', 'curve'],
8 ['Grow - Contour', 'Sans:style=bold', '32', 'grow'],
9 ['Mask', 'Sans:style=bold', '64', 'mask'],
10 ['Transform - Mirror effect', 'Sans', '50', 'transform'],
11]
12widget_previews = [
13 ['actionslider', 'preview-00.png', 'widget_preview_actionslider', '120', '30'],
14 ['bg', 'preview-00.png', 'widget_preview_bg', '50', '50'],
15 ['box', 'preview-00.png', 'widget_preview_box', '200', '160'],
16 ['bubble', 'preview-00.png', 'widget_preview_bubble1', '160', '50'],
17 ['bubble', 'preview-01.png', 'widget_preview_bubble2', '160', '50'],
18 ['bubble', 'preview-02.png', 'widget_preview_bubble3', '160', '50'],
19 ['button', 'preview-00.png', 'widget_preview_button1', '160', '50'],
20 ['button', 'preview-01.png', 'widget_preview_button2', '160', '50'],
21 ['button', 'preview-02.png', 'widget_preview_button3', '160', '50'],
22 ['calendar', 'preview-00.png', 'widget_preview_calendar', '300', '300'],
23 ['check', 'preview-00.png', 'widget_preview_check1', '160', '50'],
24 ['check', 'preview-01.png', 'widget_preview_check2', '160', '50'],
25 ['check', 'preview-02.png', 'widget_preview_check3', '160', '50'],
26 ['clock', 'preview-00.png', 'widget_preview_clock', '200', '100'],
27 ['colorselector', 'preview-00.png', 'widget_preview_colorselector', '320', '300'],
28 ['conformant', 'preview-00.png', 'widget_preview_conformant', '200', '400'],
29 ['combobox', 'preview-00.png', 'widget_preview_combobox', '300', '300'],
30 ['ctxpopup', 'preview-00.png', 'widget_preview_ctxpopup', '200', '130'],
31 ['datetime', 'preview-00.png', 'widget_preview_datetime1', '360', '60'],
32 ['datetime', 'preview-01.png', 'widget_preview_datetime2', '200', '60'],
33 ['datetime', 'preview-02.png', 'widget_preview_datetime3', '200', '60'],
34 ['dayselector', 'preview-00.png', 'widget_preview_dayselector', '350', '50'],
35 ['diskselector', 'preview-00.png', 'widget_preview_diskselector', '120', '50'],
36 ['entry', 'preview-00.png', 'widget_preview_entry1', '160', '50'],
37 ['entry', 'preview-01.png', 'widget_preview_entry2', '160', '50'],
38 ['entry', 'preview-02.png', 'widget_preview_entry3', '160', '50'],
39 ['entry', 'preview-03.png', 'widget_preview_entry4', '160', '50'],
40 ['fileselector', 'preview-00.png', 'widget_preview_fileselector', '300', '300'],
41 ['fileselector_button', 'preview-00.png', 'widget_preview_fileselector_button1', '200', '50'],
42 ['fileselector_button', 'preview-01.png', 'widget_preview_fileselector_button2', '200', '50'],
43 ['fileselector_button', 'preview-02.png', 'widget_preview_fileselector_button3', '160', '50'],
44 ['fileselector_entry', 'preview-00.png', 'widget_preview_fileselector_entry', '70', '50'],
45 ['flip', 'preview-00.png', 'widget_preview_flip', '100', '100'],
46 ['flipselector', 'preview-00.png', 'widget_preview_flipselector', '100', '60'],
47 ['frame', 'preview-00.png', 'widget_preview_frame', '100', '50'],
48 ['gengrid', 'preview-00.png', 'widget_preview_gengrid', '200', '160'],
49 ['genlist', 'preview-00.png', 'widget_preview_genlist1', '200', '200'],
50 ['genlist', 'preview-01.png', 'widget_preview_genlist2', '200', '160'],
51 ['genlist', 'preview-02.png', 'widget_preview_genlist3', '200', '160'],
52 ['genlist', 'preview-03.png', 'widget_preview_genlist4', '200', '160'],
53 ['genlist', 'preview-04.png', 'widget_preview_genlist5', '200', '160'],
54 ['hover', 'preview-00.png', 'widget_preview_hover', '90', '170'],
55 ['hoversel', 'preview-00.png', 'widget_preview_hoversel', '90', '170'],
56 ['icon', 'preview-00.png', 'widget_preview_icon', '50', '50'],
57 ['image', 'preview-00.png', 'widget_preview_image', '50', '50'],
58 ['index', 'preview-00.png', 'widget_preview_index', '200', '160'],
59 ['inwin', 'preview-00.png', 'widget_preview_inwin1', '200', '160'],
60 ['inwin', 'preview-01.png', 'widget_preview_inwin2', '200', '160'],
61 ['inwin', 'preview-02.png', 'widget_preview_inwin3', '200', '160'],
62 ['label', 'preview-00.png', 'widget_preview_label', '70', '30'],
63 ['layout', 'preview-00.png', 'widget_preview_layout', '200', '160'],
64 ['list', 'preview-00.png', 'widget_preview_list', '200', '200'],
65 ['map', 'preview-00.png', 'widget_preview_map', '256', '256'],
66 ['mapbuf', 'preview-00.png', 'widget_preview_mapbuf', '200', '200'],
67 ['menu', 'preview-00.png', 'widget_preview_menu', '100', '100'],
68 ['notify', 'preview-00.png', 'widget_preview_notify', '60', '30'],
69 ['nstate', 'preview-00.png', 'widget_preview_nstate', '45', '28'],
70 ['panel', 'preview-00.png', 'widget_preview_panel', '150', '50'],
71 ['panes', 'preview-00.png', 'widget_preview_panes', '200', '100'],
72 ['photocam', 'preview-00.png', 'widget_preview_photocam', '243', '162'],
73 ['popup', 'preview-00.png', 'widget_preview_popup', '480', '400'],
74 ['prefs', 'preview-00.png', 'widget_preview_prefs', '200', '160'],
75 ['prefs', 'preview-00.png', 'widget_preview_prefs', '280', '250'],
76 ['progressbar', 'preview-00.png', 'widget_preview_progressbar', '150', '50'],
77 ['radio', 'preview-00.png', 'widget_preview_radio', '60', '20'],
78 ['scroller', 'preview-00.png', 'widget_preview_scroller', '100', '30'],
79 ['segment_control', 'preview-00.png', 'widget_preview_segment_control', '240', '120'],
80 ['separator', 'preview-00.png', 'widget_preview_separator', '10', '80'],
81 ['slider', 'preview-00.png', 'widget_preview_slider', '200', '100'],
82 ['slideshow', 'preview-00.png', 'widget_preview_slideshow', '50', '50'],
83 ['spinner', 'preview-00.png', 'widget_preview_spinner', '160', '30'],
84 ['table', 'preview-00.png', 'widget_preview_table', '100', '100'],
85 ['thumb', 'preview-00.png', 'widget_preview_thumb', '100', '100'],
86 ['toolbar', 'preview-00.png', 'widget_preview_toolbar', '300', '100'],
87 ['web', 'preview-00.png', 'widget_preview_web', '300', '300'],
88 ['win', 'preview-00.png', 'widget_preview_win', '200', '200'],
89]
90
91preview_text_filter = executable('preview_text_filter',
92 join_paths('previews', 'preview_text_filter.c'),
93 include_directories : config_dir,
94 dependencies: [ecore_evas],
95 build_by_default: false,
96)
97
98widget_preview_eps = custom_target('widget_preview_prefs_epc',
99 input: join_paths('widgets', 'widget_preview_prefs.epc'),
100 output: 'widget_preview_prefs.epb',
101 command: elm_prefs_cc_exe + ['@INPUT@', '@OUTPUT@'],
102 build_by_default: false,
103 depends: [elm_prefs_cc]
104)
105
106shot_sh = find_program('shot.sh')
107tar = find_program('tar')
108convert = find_program('convert')
109
110foreach text_filter_property : text_filter_properties
111 text = text_filter_property[0]
112 font = text_filter_property[1]
113 size = text_filter_property[2]
114 name = text_filter_property[3]
115 filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua'))
116
117 doc_target += custom_target('preview_text_filters_'+name,
118 command: [env, 'EFL_RUN_IN_TREE=1', preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size],
119 depends: preview_text_filter,
120 output: 'filter_'+name+'.png',
121 build_by_default: false
122 )
123endforeach
124
125foreach widget_preview : widget_previews
126 binary = widget_preview[2]
127
128 if get_variable(binary, preview_text_filter) == preview_text_filter
129 tmp = executable(binary,
130 join_paths('widgets', binary+'.c'),
131 dependencies: elementary,
132 build_by_default: false,
133 c_args : [
134 '-DPACKAGE_DATA_DIR="'+meson.current_build_dir()+'"',
135 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
136 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"',
137 '-DDOCW_DIR="'+meson.current_build_dir()+'"']
138 )
139 set_variable(binary, tmp)
140 endif
141endforeach
142
143foreach widget_preview : widget_previews
144 directory = widget_preview[0]
145 ss = widget_preview[1]
146 binary = widget_preview[2]
147 x = widget_preview[3]
148 y = widget_preview[4]
149
150 widget_executable = get_variable(binary)
151
152 screen_shot_dir = join_paths(meson.build_root(), 'html', 'img', 'widget', directory)
153
154 create_preview = custom_target('widget_preview_'+('_'.join([directory, ss, x, y])),
155 command: [shot_sh, screen_shot_dir, ss, widget_executable.full_path(), x, y],
156 output: '-'.join([directory, ss, x, y]),
157 depends: [widget_executable, widget_preview_eps],
158 build_by_default: false,
159 )
160 convert_preview = []
161 #
162 # This does not work see https://github.com/the-paperless-project/paperless/issues/439 for more details
163 # for now this means that no images will be in the latex documentation
164 #
165 #convert_preview = custom_target('convert_preview_'+('_'.join([directory, ss, x, y])),
166 # command: [convert, join_paths(screen_shot_dir, ss), join_paths(screen_shot_dir, ss.split('.')[0]+'.eps')],
167 # output: '-'.join([directory, ss, x, y])+'.eps',
168 # depends: [create_preview],
169 # build_by_default: false,
170 #)
171 doc_target += [create_preview, convert_preview]
172endforeach
173
174doc_target += custom_target('doxygen',
175 command: [doxygen, join_paths(meson.current_build_dir(), 'Doxyfile')],
176 output: ['empty'],
177 build_by_default: false
178)
179
180compress_target = custom_target('package_doc_tar',
181 command: [tar, '-C', meson.build_root(), '-cf', 'efl-'+meson.version()+'.tar', 'html', 'man'],
182 output: 'efl-'+meson.version()+'.tar',
183 depends: doc_target,
184 build_by_default: false
185)
186
187run_target('doc',
188 command: ['echo', 'Documentation sucessfully build!'],
189 depends: compress_target,
190)
191
192doxyfile_conf = configuration_data()
193doxyfile_conf.merge_from(config_h)
194doxyfile_conf.set('srcdir', meson.current_source_dir())
195doxyfile_conf.set('top_builddir', meson.build_root())
196doxyfile_conf.set('top_srcdir', meson.source_root())
197
198configure_file(
199 input: 'Doxyfile.in',
200 output: 'Doxyfile',
201 configuration: doxyfile_conf,
202)