mirror of
https://github.com/PDP-10/klh10.git
synced 2026-01-13 15:27:10 +00:00
"Discourage" building directly in the source tree.
This commit is contained in:
parent
4e6ef5edb1
commit
dea8080818
15
autogen.sh
15
autogen.sh
@ -5,19 +5,28 @@
|
|||||||
# Usage: ../path/to/autogen.sh [args for configure]
|
# Usage: ../path/to/autogen.sh [args for configure]
|
||||||
#
|
#
|
||||||
# (Re)constructs the configure script using the appropriate invocations
|
# (Re)constructs the configure script using the appropriate invocations
|
||||||
# of autoconf etc, and runs configure with the given arguments.
|
# of autoconf etc.
|
||||||
#
|
#
|
||||||
# It is strongly recommended to build in a separate directory
|
# It is strongly recommended to build in a separate directory
|
||||||
# for easy cleanup.
|
# for easy cleanup.
|
||||||
|
#
|
||||||
|
# When this is done, it runs configure with the given arguments.
|
||||||
|
|
||||||
srcdir=$(dirname $0)
|
srcdir=$(dirname $0)
|
||||||
test -z "$srcdir" && srcdir=.
|
test -z "$srcdir" && srcdir=.
|
||||||
|
|
||||||
builddir=$(pwd)
|
builddir=$(pwd)
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
|
srcdir=$(pwd)
|
||||||
|
|
||||||
autoconf -I aclocal
|
autoconf # creates configure from configure.ac
|
||||||
autoheader
|
autoheader # creates src/config.h.in from configure.ac
|
||||||
|
|
||||||
|
if [ "$srcdir" != "$builddir" ]
|
||||||
|
then
|
||||||
|
echo "Now running configure $@ in $builddir"
|
||||||
cd "$builddir"
|
cd "$builddir"
|
||||||
$srcdir/configure "$@"
|
$srcdir/configure "$@"
|
||||||
|
else
|
||||||
|
echo "Not running configure in the source directory."
|
||||||
|
fi
|
||||||
|
|||||||
23
configure.ac
23
configure.ac
@ -10,6 +10,19 @@ AC_INIT([klh10], [2.0j-Rhialto], [https://github.com/Rhialto/klh10],
|
|||||||
AC_CONFIG_SRCDIR([src/klh10.h])
|
AC_CONFIG_SRCDIR([src/klh10.h])
|
||||||
AC_CONFIG_HEADERS([src/config.h])
|
AC_CONFIG_HEADERS([src/config.h])
|
||||||
|
|
||||||
|
# Check that we're using a build directory, and are not building in
|
||||||
|
# between the source. It is cleaner that way.
|
||||||
|
# Configure has already set up $srcdir to be equal to . if it detected
|
||||||
|
# an in-tree build.
|
||||||
|
|
||||||
|
if test "$srcdir" = "."
|
||||||
|
then
|
||||||
|
AC_MSG_ERROR(
|
||||||
|
[Please create a temporary (sub)directory to build in.
|
||||||
|
You can call this configure script using a absolute or relative
|
||||||
|
path from there.])
|
||||||
|
fi
|
||||||
|
|
||||||
# Filter CFLAGS; the default is something like -g -O2 and we want -g3 -O3.
|
# Filter CFLAGS; the default is something like -g -O2 and we want -g3 -O3.
|
||||||
NEWCFLAGS=""
|
NEWCFLAGS=""
|
||||||
for cf in $CFLAGS
|
for cf in $CFLAGS
|
||||||
@ -49,7 +62,7 @@ case "${enable_bridge}" in
|
|||||||
yes | "") ;;
|
yes | "") ;;
|
||||||
no) AC_DEFINE(KLH10_NET_BRIDGE, 0, [Set to 0 to disable bridge networking])
|
no) AC_DEFINE(KLH10_NET_BRIDGE, 0, [Set to 0 to disable bridge networking])
|
||||||
AC_MSG_NOTICE([Compiling without bridge support]) ;;
|
AC_MSG_NOTICE([Compiling without bridge support]) ;;
|
||||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-bridge]) ;;
|
*) AC_MSG_ERROR([bad value ${enable_bridge} for --enable-bridge]) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
@ -154,7 +167,7 @@ typedef char vaddr_t;
|
|||||||
])
|
])
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# Check how to replace strerror() if needed
|
# Check how to replace strerror() if needed.
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether sys_errlist exists])
|
AC_MSG_CHECKING([whether sys_errlist exists])
|
||||||
@ -201,7 +214,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|||||||
])
|
])
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# Check large file support and the sizes of related types
|
# Check large file support and the sizes of related types.
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
@ -217,7 +230,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# Output section. State which @VARIABLES@ are going to be substituted
|
# Output section. State which @VARIABLES@ are going to be substituted.
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
AH_TOP([
|
AH_TOP([
|
||||||
@ -240,7 +253,7 @@ AC_SUBST([MAKEFILE], [Makefile])
|
|||||||
AC_SUBST([CENVFLAGS])
|
AC_SUBST([CENVFLAGS])
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# Output section. State which files are going to be constructed
|
# Output section. State which files are going to be constructed.
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
AC_CONFIG_FILES([bld-kl/Makefile:mk/top.mk:mk/top-kl.mk:src/Makefile.mk
|
AC_CONFIG_FILES([bld-kl/Makefile:mk/top.mk:mk/top-kl.mk:src/Makefile.mk
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user