Add scripts to copy fio and qemu includes to the source package

Vitaliy Filippov 2020-11-06 01:12:00 +03:00
förälder 64d471cf53
incheckning 0c43ff9daf
2 ändrade filer med 31 tillägg och 0 borttagningar

13
copy-fio-includes.sh Executable file
Visa fil

@ -0,0 +1,13 @@
#!/bin/bash
gcc -E -o fio_headers.i fio_headers.h
rm -rf fio-copy
for i in `grep -Po 'fio/[^"]+' fio_headers.i | sort | uniq`; do
j=${i##fio/}
p=$(dirname $j)
mkdir -p fio-copy/$p
cp $i fio-copy/$j
done
rm fio_headers.i

18
copy-qemu-includes.sh Executable file
Visa fil

@ -0,0 +1,18 @@
#!/bin/bash
#cd qemu
#debian/rules b/configure-stamp
#cd b/qemu; make qapi
gcc -I qemu/b/qemu `pkg-config glib-2.0 --cflags` \
-I qemu/include -E -o qemu_driver.i qemu_driver.c
rm -rf qemu-copy
for i in `grep -Po 'qemu/[^"]+' qemu_driver.i | sort | uniq`; do
j=${i##qemu/}
p=$(dirname $j)
mkdir -p qemu-copy/$p
cp $i qemu-copy/$j
done
rm qemu_driver.i