parent
67c106a001
commit
c693bd9bb4
8 changed files with 59 additions and 70 deletions
@ -1,8 +1,4 @@ |
||||
project('custom install script', 'c') |
||||
|
||||
if meson.get_compiler('c').get_id() == 'msvc' |
||||
install_data('no-installed-files', install_dir : '') |
||||
else |
||||
meson.add_install_script('myinstall.sh') |
||||
executable('prog', 'prog.c', install : true) |
||||
endif |
||||
executable('prog', 'prog.c', install : true) |
||||
meson.add_install_script('myinstall.py', 'diiba/daaba', 'file.dat') |
||||
|
@ -0,0 +1,12 @@ |
||||
#!/usr/bin/env python |
||||
|
||||
import os |
||||
import sys |
||||
|
||||
prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX'] |
||||
|
||||
dirname = os.path.join(prefix, sys.argv[1]) |
||||
|
||||
os.makedirs(dirname) |
||||
with open(os.path.join(dirname, sys.argv[2]), 'w') as f: |
||||
f.write('') |
@ -1,10 +0,0 @@ |
||||
#!/bin/sh |
||||
|
||||
set -eu |
||||
|
||||
echo Starting custom installation step |
||||
|
||||
mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/diiba/daaba" |
||||
touch "${DESTDIR}${MESON_INSTALL_PREFIX}/diiba/daaba/file.dat" |
||||
|
||||
echo Finished custom install step |
Loading…
Reference in new issue