Check if we have been configured before running most of Make

This commit is contained in:
Hamish Coleman 2023-06-25 09:42:39 +01:00
parent a1bef636de
commit 4c0c173221
4 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,5 @@
# Our default make target
all:
export CC
export AR
@ -6,7 +8,13 @@ export LDFLAGS
export LDLIBS
export TOOLS_ADDITIONAL
include config.mak
-include config.mak
ifndef CONFIG_HOST
# TODO:
# dont error if we are installing build-deps or other non-compile action
$(error Please run ./configure)
endif
#Ultrasparc64 users experiencing SIGBUS should try the following gcc options
#(thanks to Robert Gibbon)

View File

@ -1,3 +1,7 @@
# Global configuration, included in top Makefile and exported from there.
# @configure_input@
CONFIG_HOST=@host@
PACKAGE_VERSION=@PACKAGE_VERSION@
CC=@CC@
AR=@AR@

View File

@ -4,6 +4,7 @@ dnl> Do not add anything above
AC_DEFINE([PACKAGE_BUILDDATE], "[m4_esyscmd([scripts/version.sh date | tr -d '\n'])]", [Last change date])
AC_CANONICAL_HOST
AC_PROG_CC
AC_CHECK_TOOL([AR], [ar], [false])
AC_CHECK_TOOL([WINDRES], [windres], [false])
@ -106,7 +107,7 @@ AS_IF([test "x$enable_pthread" != xno],
)
AC_SUBST(host)
AC_SUBST(WINDRES)
AC_SUBST(TOOLS_ADDITIONAL)
AC_CONFIG_HEADERS(include/config.h)

View File

@ -17,6 +17,7 @@ EOF
chmod a+x configure
cat >config.mak <<EOF
CONFIG_HOST=x86_64-w64-mingw32
CC=gcc
AR=ar
WINDRES=windres