cpython/Lib/plat-linux/regen
doko@ubuntu.com 5553231b91 - Issue #23968: Rename the platform directory from plat-$(MACHDEP) to
plat-$(PLATFORM_TRIPLET).
  Rename the config directory (LIBPL) from config-$(LDVERSION) to
  config-$(LDVERSION)-$(PLATFORM_TRIPLET).
  Install the platform specifc _sysconfigdata module into the platform
  directory and rename it to include the ABIFLAGS.
2016-06-14 08:55:19 +02:00

33 lines
691 B
Bash
Executable file

#! /bin/sh
case `uname` in
Linux*|GNU*) ;;
*) echo Probably not on a Linux system 1>&2
exit 1;;
esac
if [ -z "$CC" ]; then
echo >&2 "$(basename $0): CC is not set"
exit 1
fi
headers="sys/types.h netinet/in.h dlfcn.h"
incdirs="$(echo $($CC -v -E - < /dev/null 2>&1|awk '/^#include/, /^End of search/' | grep '^ '))"
if [ -z "$incdirs" ]; then
incdirs="/usr/include"
fi
for h in $headers; do
absh=
for d in $incdirs; do
if [ -f "$d/$h" ]; then
absh="$d/$h"
break
fi
done
if [ -n "$absh" ]; then
absheaders="$absheaders $absh"
else
echo >&2 "$(basename $0): header $h not found"
exit 1
fi
done
set -x
${H2PY:-h2py} -i '(u_long)' $absheaders