#!/bin/sh CC=gcc AS=as LD=ld OBJCOPY=objcopy STRIP=strip # build info WHO=$(whoami) WHERE=$(hostname) ARCH=$(uname -m) OS=$(uname -o) if test "${ARCH}" != "m68k" ; then M68K_CROSS_COMPILE=${M68K_CROSS_COMPILE:-m68k-linux-} if ! type "${M68K_CROSS_COMPILE}${CC}" > /dev/null 2>&1 then M68K_CROSS_COMPILE=m68k-linux-gnu- if ! type "${M68K_CROSS_COMPILE}${CC}" > /dev/null 2>&1 then echo "Cannot find m68k cross-compiler" 1>&2 unset M68K_CROSS_COMPILE fi fi fi if test "${ARCH}" != "ppc" ; then PPC_CROSS_COMPILE=${PPC_CROSS_COMPILE:-powerpc-linux-} if ! type "${PPC_CROSS_COMPILE}${CC}" > /dev/null 2>&1 then PPC_CROSS_COMPILE=powerpc-linux-gnu- if ! type "${PPC_CROSS_COMPILE}${CC}" > /dev/null 2>&1 then echo "Cannot find powerpc cross-compiler" 1>&2 unset PPC_CROSS_COMPILE fi fi fi exec 5> tools.mk.tmp cat 1>&5 < /dev/null) echo "cross-compiler is ${M68K_CROSS_COMPILE}${CC} ${M68K_GCC_VERSION}" 1>&2 fi if [ "${PPC_CROSS_COMPILE}" != "" ] ; then PPC_GCC_VERSION=$(${PPC_CROSS_COMPILE}${CC} -dumpversion 2> /dev/null) echo "cross-compiler is ${PPC_CROSS_COMPILE}${CC} ${PPC_GCC_VERSION}" 1>&2 cat 1>&5 <&5 <&5 <&5 < /dev/null 2>&1 then cat 1>&5 < \$@ %.8: %.sgml docbook-to-man \$< > \$@ !EOF else if type docbook2man > /dev/null 2>&1 then cat 1>&5 < \$@ %.8: %.sgml docbook2man \$< > \$@ !EOF else cat 1>&5 <&2 && false %.8: %.sgml @echo "Missing tools to generate \$@ from \$<" >&2 && false !EOF fi fi mv tools.mk.tmp tools.mk