diff options
author | Adam Jackson <ajax@redhat.com> | 2018-01-31 13:31:53 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-02-01 15:01:56 -0500 |
commit | 193b75db8c1aa9d91d079901d7da98ec72810378 (patch) | |
tree | 016f228b0046db822ec41668100a899a13143a49 | |
parent | 0d4330017c811227f8424ecbd061d987f39b4e9f (diff) |
meson: Spread the install rules into their subdirs
Mostly this is is so the generated Xpoll.h can be emitted into a usable
directory when we build as a subproject.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | include/GL/internal/meson.build | 1 | ||||
-rw-r--r-- | include/GL/meson.build | 7 | ||||
-rw-r--r-- | include/X11/PM/meson.build | 5 | ||||
-rw-r--r-- | include/X11/dri/meson.build | 6 | ||||
-rw-r--r-- | include/X11/extensions/meson.build | 122 | ||||
-rw-r--r-- | include/X11/fonts/meson.build | 9 | ||||
-rw-r--r-- | include/X11/meson.build | 62 | ||||
-rw-r--r-- | include/meson.build | 2 | ||||
-rw-r--r-- | meson.build | 191 |
9 files changed, 219 insertions, 186 deletions
diff --git a/include/GL/internal/meson.build b/include/GL/internal/meson.build new file mode 100644 index 0000000..158e0cc --- /dev/null +++ b/include/GL/internal/meson.build @@ -0,0 +1 @@ +install_headers('glcore.h', subdir : 'GL/internal') diff --git a/include/GL/meson.build b/include/GL/meson.build new file mode 100644 index 0000000..10da898 --- /dev/null +++ b/include/GL/meson.build @@ -0,0 +1,7 @@ +install_headers( + 'glxint.h', + 'glxmd.h', + 'glxproto.h', + 'glxtokens.h', + subdir : 'GL') +subdir('internal') diff --git a/include/X11/PM/meson.build b/include/X11/PM/meson.build new file mode 100644 index 0000000..7d9fadf --- /dev/null +++ b/include/X11/PM/meson.build @@ -0,0 +1,5 @@ +install_headers( + 'PM.h', + 'PMproto.h', + subdir : 'X11/PM' +) diff --git a/include/X11/dri/meson.build b/include/X11/dri/meson.build new file mode 100644 index 0000000..d0ac724 --- /dev/null +++ b/include/X11/dri/meson.build @@ -0,0 +1,6 @@ +install_headers( + 'xf86dri.h', + 'xf86driproto.h', + 'xf86dristr.h', + subdir : 'X11/dri' +) diff --git a/include/X11/extensions/meson.build b/include/X11/extensions/meson.build new file mode 100644 index 0000000..e7e7de2 --- /dev/null +++ b/include/X11/extensions/meson.build @@ -0,0 +1,122 @@ +install_headers( + 'ag.h', + 'agproto.h', + 'applewmconst.h', + 'applewmproto.h', + 'bigreqsproto.h', + 'bigreqstr.h', + 'composite.h', + 'compositeproto.h', + 'cup.h', + 'cupproto.h', + 'damageproto.h', + 'damagewire.h', + 'dbe.h', + 'dbeproto.h', + 'dmx.h', + 'dmxproto.h', + 'dpmsconst.h', + 'dpmsproto.h', + 'dri2proto.h', + 'dri2tokens.h', + 'dri3proto.h', + 'EVI.h', + 'EVIproto.h', + 'ge.h', + 'geproto.h', + 'lbx.h', + 'lbxproto.h', + 'mitmiscconst.h', + 'mitmiscproto.h', + 'multibufconst.h', + 'multibufproto.h', + 'panoramiXproto.h', + 'presentproto.h', + 'presenttokens.h', + 'randr.h', + 'randrproto.h', + 'recordconst.h', + 'recordproto.h', + 'recordstr.h', + 'render.h', + 'renderproto.h', + 'saver.h', + 'saverproto.h', + 'secur.h', + 'securproto.h', + 'shapeconst.h', + 'shapeproto.h', + 'shapestr.h', + 'shm.h', + 'shmproto.h', + 'shmstr.h', + 'syncconst.h', + 'syncproto.h', + 'syncstr.h', + 'vldXvMC.h', + 'windowswm.h', + 'windowswmstr.h', + 'xcmiscproto.h', + 'xcmiscstr.h', + 'xf86bigfont.h', + 'xf86bigfproto.h', + 'xf86bigfstr.h', + 'xf86dga1const.h', + 'xf86dga1proto.h', + 'xf86dga1str.h', + 'xf86dgaconst.h', + 'xf86dga.h', + 'xf86dgaproto.h', + 'xf86dgastr.h', + 'xf86misc.h', + 'xf86mscstr.h', + 'xf86vm.h', + 'xf86vmproto.h', + 'xf86vmstr.h', + 'xfixesproto.h', + 'xfixeswire.h', + 'XI2.h', + 'XI2proto.h', + 'XI.h', + 'XIproto.h', + 'XKBgeom.h', + 'XKB.h', + 'XKBproto.h', + 'XKBsrv.h', + 'XKBstr.h', + 'XResproto.h', + 'xtestconst.h', + 'xtestext1const.h', + 'xtestext1proto.h', + 'xtestproto.h', + 'xtrapbits.h', + 'xtrapddmi.h', + 'xtrapdi.h', + 'xtrapemacros.h', + 'xtraplib.h', + 'xtraplibp.h', + 'xtrapproto.h', + 'Xv.h', + 'XvMC.h', + 'XvMCproto.h', + 'Xvproto.h', + subdir : 'X11/extensions' +) + +if get_option('legacy') == true + install_headers( + 'evieproto.h', + 'fontcache.h', + 'fontcacheP.h', + 'fontcachstr.h', + 'lgewire.h', + 'Print.h', + 'Printstr.h', + 'xcalibrateproto.h', + 'xcalibratewire.h', + 'Xeviestr.h', + 'xf86rush.h', + 'xf86rushstr.h', + subdir : 'X11/extensions' + ) +endif diff --git a/include/X11/fonts/meson.build b/include/X11/fonts/meson.build new file mode 100644 index 0000000..5e49054 --- /dev/null +++ b/include/X11/fonts/meson.build @@ -0,0 +1,9 @@ +install_headers( + 'font.h', + 'fontproto.h', + 'fontstruct.h', + 'FS.h', + 'fsmasks.h', + 'FSproto.h', + subdir : 'X11/fonts' +) diff --git a/include/X11/meson.build b/include/X11/meson.build new file mode 100644 index 0000000..1c33c64 --- /dev/null +++ b/include/X11/meson.build @@ -0,0 +1,62 @@ +fd_set_maybe_headers = [ 'sys/param.h', + 'sys/types.h', + 'sys/time.h', + 'sys/select.h' +] +fd_set_headers = '' +foreach h : fd_set_maybe_headers + if cc.has_header(h) + fd_set_headers += '#include <' + h + '>\n' + endif +endforeach + +# generated headers. try not to make more of these, please. +if cc.has_member('fd_set', 'fds_bits', prefix: fd_set_headers) + fds_bits = 'fds_bits' +elif cc.has_member('fd_set', '__fds_bits', prefix: fd_set_headers) + fds_bits = '__fds_bits' +else + error('Your fd_set is too weird.') +endif +custom_target('Xpoll.h', + capture : true, + install : true, + install_dir : get_option('includedir') + '/X11', + input : 'Xpoll.h.in', + output : 'Xpoll.h', + command : [ sed, + 's/@USE_FDS_BITS@/' + fds_bits + '/g', + '@INPUT@']) + +install_headers( + 'ap_keysym.h', + 'DECkeysym.h', + 'HPkeysym.h', + 'keysymdef.h', + 'keysym.h', + 'Sunkeysym.h', + 'Xalloca.h', + 'Xarch.h', + 'Xatom.h', + 'Xdefs.h', + 'XF86keysym.h', + 'Xfuncs.h', + 'Xfuncproto.h', + 'X.h', + 'Xmd.h', + 'Xosdefs.h', + 'Xos.h', + 'Xos_r.h', + 'Xproto.h', + 'Xprotostr.h', + 'Xthreads.h', + 'Xw32defs.h', + 'XWDFile.h', + 'Xwindows.h', + 'Xwinsock.h', + subdir : 'X11') + +subdir('dri') +subdir('extensions') +subdir('fonts') +subdir('PM') diff --git a/include/meson.build b/include/meson.build new file mode 100644 index 0000000..805ef90 --- /dev/null +++ b/include/meson.build @@ -0,0 +1,2 @@ +subdir('GL') +subdir('X11') diff --git a/meson.build b/meson.build index aa20a78..b9964cb 100644 --- a/meson.build +++ b/meson.build @@ -18,177 +18,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -project('xorgproto', license : 'MIT', version : '2018.0') +project('xorgproto', 'c', license : 'MIT', version : '2018.0') pkg = import('pkgconfig') - -# core -install_headers( - 'include/X11/ap_keysym.h', - 'include/X11/DECkeysym.h', - 'include/X11/HPkeysym.h', - 'include/X11/keysymdef.h', - 'include/X11/keysym.h', - 'include/X11/Sunkeysym.h', - 'include/X11/Xalloca.h', - 'include/X11/Xarch.h', - 'include/X11/Xatom.h', - 'include/X11/Xdefs.h', - 'include/X11/XF86keysym.h', - 'include/X11/Xfuncs.h', - 'include/X11/X.h', - 'include/X11/Xmd.h', - 'include/X11/Xosdefs.h', - 'include/X11/Xos.h', - 'include/X11/Xos_r.h', - 'include/X11/Xproto.h', - 'include/X11/Xprotostr.h', - 'include/X11/Xthreads.h', - 'include/X11/Xw32defs.h', - 'include/X11/XWDFile.h', - 'include/X11/Xwindows.h', - 'include/X11/Xwinsock.h', - subdir : 'X11') - -# proxy manager -install_headers( - 'include/X11/PM/PM.h', - 'include/X11/PM/PMproto.h', - subdir : 'X11/PM' -) - -# fonts -install_headers( - 'include/X11/fonts/font.h', - 'include/X11/fonts/fontproto.h', - 'include/X11/fonts/fontstruct.h', - 'include/X11/fonts/FS.h', - 'include/X11/fonts/fsmasks.h', - 'include/X11/fonts/FSproto.h', - subdir : 'X11/fonts' -) - -# dri1 -install_headers( - 'include/X11/dri/xf86dri.h', - 'include/X11/dri/xf86driproto.h', - 'include/X11/dri/xf86dristr.h', - subdir : 'X11/dri' -) - -# GL -install_headers( - 'include/GL/glxint.h', - 'include/GL/glxmd.h', - 'include/GL/glxproto.h', - 'include/GL/glxtokens.h', - subdir : 'GL') -install_headers('include/GL/internal/glcore.h', subdir : 'GL/internal') - -# all other extensions -install_headers( - 'include/X11/extensions/ag.h', - 'include/X11/extensions/agproto.h', - 'include/X11/extensions/applewmconst.h', - 'include/X11/extensions/applewmproto.h', - 'include/X11/extensions/bigreqsproto.h', - 'include/X11/extensions/bigreqstr.h', - 'include/X11/extensions/composite.h', - 'include/X11/extensions/compositeproto.h', - 'include/X11/extensions/cup.h', - 'include/X11/extensions/cupproto.h', - 'include/X11/extensions/damageproto.h', - 'include/X11/extensions/damagewire.h', - 'include/X11/extensions/dbe.h', - 'include/X11/extensions/dbeproto.h', - 'include/X11/extensions/dmx.h', - 'include/X11/extensions/dmxproto.h', - 'include/X11/extensions/dpmsconst.h', - 'include/X11/extensions/dpmsproto.h', - 'include/X11/extensions/dri2proto.h', - 'include/X11/extensions/dri2tokens.h', - 'include/X11/extensions/dri3proto.h', - 'include/X11/extensions/EVI.h', - 'include/X11/extensions/EVIproto.h', - 'include/X11/extensions/ge.h', - 'include/X11/extensions/geproto.h', - 'include/X11/extensions/lbx.h', - 'include/X11/extensions/lbxproto.h', - 'include/X11/extensions/mitmiscconst.h', - 'include/X11/extensions/mitmiscproto.h', - 'include/X11/extensions/multibufconst.h', - 'include/X11/extensions/multibufproto.h', - 'include/X11/extensions/panoramiXproto.h', - 'include/X11/extensions/presentproto.h', - 'include/X11/extensions/presenttokens.h', - 'include/X11/extensions/randr.h', - 'include/X11/extensions/randrproto.h', - 'include/X11/extensions/recordconst.h', - 'include/X11/extensions/recordproto.h', - 'include/X11/extensions/recordstr.h', - 'include/X11/extensions/render.h', - 'include/X11/extensions/renderproto.h', - 'include/X11/extensions/saver.h', - 'include/X11/extensions/saverproto.h', - 'include/X11/extensions/secur.h', - 'include/X11/extensions/securproto.h', - 'include/X11/extensions/shapeconst.h', - 'include/X11/extensions/shapeproto.h', - 'include/X11/extensions/shapestr.h', - 'include/X11/extensions/shm.h', - 'include/X11/extensions/shmproto.h', - 'include/X11/extensions/shmstr.h', - 'include/X11/extensions/syncconst.h', - 'include/X11/extensions/syncproto.h', - 'include/X11/extensions/syncstr.h', - 'include/X11/extensions/vldXvMC.h', - 'include/X11/extensions/windowswm.h', - 'include/X11/extensions/windowswmstr.h', - 'include/X11/extensions/xcmiscproto.h', - 'include/X11/extensions/xcmiscstr.h', - 'include/X11/extensions/xf86bigfont.h', - 'include/X11/extensions/xf86bigfproto.h', - 'include/X11/extensions/xf86bigfstr.h', - 'include/X11/extensions/xf86dga1const.h', - 'include/X11/extensions/xf86dga1proto.h', - 'include/X11/extensions/xf86dga1str.h', - 'include/X11/extensions/xf86dgaconst.h', - 'include/X11/extensions/xf86dga.h', - 'include/X11/extensions/xf86dgaproto.h', - 'include/X11/extensions/xf86dgastr.h', - 'include/X11/extensions/xf86misc.h', - 'include/X11/extensions/xf86mscstr.h', - 'include/X11/extensions/xf86vm.h', - 'include/X11/extensions/xf86vmproto.h', - 'include/X11/extensions/xf86vmstr.h', - 'include/X11/extensions/xfixesproto.h', - 'include/X11/extensions/xfixeswire.h', - 'include/X11/extensions/XI2.h', - 'include/X11/extensions/XI2proto.h', - 'include/X11/extensions/XI.h', - 'include/X11/extensions/XIproto.h', - 'include/X11/extensions/XKBgeom.h', - 'include/X11/extensions/XKB.h', - 'include/X11/extensions/XKBproto.h', - 'include/X11/extensions/XKBsrv.h', - 'include/X11/extensions/XKBstr.h', - 'include/X11/extensions/XResproto.h', - 'include/X11/extensions/xtestconst.h', - 'include/X11/extensions/xtestext1const.h', - 'include/X11/extensions/xtestext1proto.h', - 'include/X11/extensions/xtestproto.h', - 'include/X11/extensions/xtrapbits.h', - 'include/X11/extensions/xtrapddmi.h', - 'include/X11/extensions/xtrapdi.h', - 'include/X11/extensions/xtrapemacros.h', - 'include/X11/extensions/xtraplib.h', - 'include/X11/extensions/xtraplibp.h', - 'include/X11/extensions/xtrapproto.h', - 'include/X11/extensions/Xv.h', - 'include/X11/extensions/XvMC.h', - 'include/X11/extensions/XvMCproto.h', - 'include/X11/extensions/Xvproto.h', - subdir : 'X11/extensions' -) +cc = meson.get_compiler('c') +sed = find_program('sed') pcs = [ ['applewmproto', '1.4.2'], @@ -234,23 +67,7 @@ foreach pc : pcs ) endforeach -# legacy if get_option('legacy') == true - install_headers( - 'include/X11/extensions/evieproto.h', - 'include/X11/extensions/fontcache.h', - 'include/X11/extensions/fontcacheP.h', - 'include/X11/extensions/fontcachstr.h', - 'include/X11/extensions/lgewire.h', - 'include/X11/extensions/Print.h', - 'include/X11/extensions/Printstr.h', - 'include/X11/extensions/xcalibrateproto.h', - 'include/X11/extensions/xcalibratewire.h', - 'include/X11/extensions/Xeviestr.h', - 'include/X11/extensions/xf86rush.h', - 'include/X11/extensions/xf86rushstr.h', - subdir : 'X11/extensions' - ) legacy_pcs = [ ['evieproto', '1.1.1'], ['fontcacheproto', '0.1.3'], @@ -273,3 +90,5 @@ endif ext_xorgproto = declare_dependency( include_directories : include_directories('include') ) + +subdir('include') |