Build xed CLI for the intel-xed package (#14114)

The xed CLI is handy, and can be gotten by building the examples in the
intel-xed package. This PR builds the examples and installs the xed CLI.
It would also be possible to install more of the example binaries if
someone thinks they are useful.
This commit is contained in:
Glenn Johnson 2019-12-11 12:13:27 -06:00 committed by Adam J. Stewart
parent 77482e102a
commit f2979da2af

View File

@ -84,19 +84,23 @@ def install(self, spec, prefix):
mkdirp(prefix.include) mkdirp(prefix.include)
mkdirp(prefix.lib) mkdirp(prefix.lib)
mkdirp(prefix.bin)
libs = glob.glob(join_path('obj', 'lib*.a')) libs = glob.glob(join_path('obj', 'lib*.a'))
for lib in libs: for lib in libs:
install(lib, prefix.lib) install(lib, prefix.lib)
# Build and install shared libxed.so. # Build and install shared libxed.so and examples (to get the CLI).
mfile('--clean') mfile('--clean')
mfile('--shared', *args) mfile('examples', '--shared', *args)
libs = glob.glob(join_path('obj', 'lib*.so')) libs = glob.glob(join_path('obj', 'lib*.so'))
for lib in libs: for lib in libs:
install(lib, prefix.lib) install(lib, prefix.lib)
# Install the xed program
install(join_path('obj', 'examples', 'xed'), prefix.bin)
# Install header files. # Install header files.
hdrs = glob.glob(join_path('include', 'public', 'xed', '*.h')) \ hdrs = glob.glob(join_path('include', 'public', 'xed', '*.h')) \
+ glob.glob(join_path('obj', '*.h')) + glob.glob(join_path('obj', '*.h'))