88 lines
3.1 KiB
Bash
Executable File
88 lines
3.1 KiB
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# Set ${PYTHON} to plain 'python' if not set already
|
|
: ${PYTHON:=python}
|
|
|
|
export LC_COLLATE=C
|
|
unset LC_ALL
|
|
|
|
find . -iname '*.[ch]' ! -ipath './VasEBoot-core/lib/libgcrypt-VasEBoot/*' ! -ipath './build-aux/*' ! -ipath './VasEBoot-core/lib/libgcrypt/src/misc.c' ! -ipath './VasEBoot-core/lib/libgcrypt/src/global.c' ! -ipath './VasEBoot-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/VasEBoot-gen-widthspec.c' ! -ipath './util/VasEBoot-gen-asciih.c' |sort > po/POTFILES.in
|
|
find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
|
|
|
|
echo "Importing unicode..."
|
|
${PYTHON} util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt VasEBoot-core/unidata.c
|
|
|
|
echo "Importing libgcrypt..."
|
|
${PYTHON} util/import_gcry.py VasEBoot-core/lib/libgcrypt/ VasEBoot-core
|
|
sed -n -f util/import_gcrypth.sed < VasEBoot-core/lib/libgcrypt/src/gcrypt.h.in > include/VasEBoot/gcrypt/gcrypt.h
|
|
if [ -f include/VasEBoot/gcrypt/g10lib.h ]; then
|
|
rm include/VasEBoot/gcrypt/g10lib.h
|
|
fi
|
|
if [ -d VasEBoot-core/lib/libgcrypt-VasEBoot/mpi/generic ]; then
|
|
rm -rf VasEBoot-core/lib/libgcrypt-VasEBoot/mpi/generic
|
|
fi
|
|
cp VasEBoot-core/lib/libgcrypt-VasEBoot/src/g10lib.h include/VasEBoot/gcrypt/g10lib.h
|
|
cp -R VasEBoot-core/lib/libgcrypt/mpi/generic VasEBoot-core/lib/libgcrypt-VasEBoot/mpi/generic
|
|
|
|
for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul3.c mpih-lshift.c mpih-rshift.c; do
|
|
if [ -h VasEBoot-core/lib/libgcrypt-VasEBoot/mpi/"$x" ] || [ -f VasEBoot-core/lib/libgcrypt-VasEBoot/mpi/"$x" ]; then
|
|
rm VasEBoot-core/lib/libgcrypt-VasEBoot/mpi/"$x"
|
|
fi
|
|
cp VasEBoot-core/lib/libgcrypt-VasEBoot/mpi/generic/"$x" VasEBoot-core/lib/libgcrypt-VasEBoot/mpi/"$x"
|
|
done
|
|
|
|
echo "Generating Automake input..."
|
|
|
|
# Automake doesn't like including files from a path outside the project.
|
|
rm -f contrib VasEBoot-core/contrib
|
|
if [ "x${VasEBoot_CONTRIB}" != x ]; then
|
|
[ "${VasEBoot_CONTRIB}" = contrib ] || ln -s "${VasEBoot_CONTRIB}" contrib
|
|
[ "${VasEBoot_CONTRIB}" = VasEBoot-core/contrib ] || ln -s ../contrib VasEBoot-core/contrib
|
|
fi
|
|
|
|
UTIL_DEFS='Makefile.util.def Makefile.utilgcry.def'
|
|
CORE_DEFS='VasEBoot-core/Makefile.core.def VasEBoot-core/Makefile.gcry.def'
|
|
|
|
for extra in contrib/*/Makefile.util.def; do
|
|
if test -e "$extra"; then
|
|
UTIL_DEFS="$UTIL_DEFS $extra"
|
|
fi
|
|
done
|
|
|
|
for extra in contrib/*/Makefile.core.def; do
|
|
if test -e "$extra"; then
|
|
CORE_DEFS="$CORE_DEFS $extra"
|
|
fi
|
|
done
|
|
|
|
${PYTHON} gentpl.py $UTIL_DEFS > Makefile.util.am
|
|
${PYTHON} gentpl.py $CORE_DEFS > VasEBoot-core/Makefile.core.am
|
|
|
|
for extra in contrib/*/Makefile.common; do
|
|
if test -e "$extra"; then
|
|
echo "include $extra" >> Makefile.util.am
|
|
echo "include $extra" >> VasEBoot-core/Makefile.core.am
|
|
fi
|
|
done
|
|
|
|
for extra in contrib/*/Makefile.util.common; do
|
|
if test -e "$extra"; then
|
|
echo "include $extra" >> Makefile.util.am
|
|
fi
|
|
done
|
|
|
|
for extra in contrib/*/Makefile.core.common; do
|
|
if test -e "$extra"; then
|
|
echo "include $extra" >> VasEBoot-core/Makefile.core.am
|
|
fi
|
|
done
|
|
|
|
echo "Saving timestamps..."
|
|
echo timestamp > stamp-h.in
|
|
|
|
echo "Running autoreconf..."
|
|
autoreconf -vi
|
|
exit 0
|