Browse Source

Check if we have been configured before running most of Make

pull/1127/head
Hamish Coleman 1 year ago
parent
commit
4c0c173221
  1. 10
      Makefile
  2. 4
      config.mak.in
  3. 3
      configure.ac
  4. 1
      scripts/hack_fakeautoconf.sh

10
Makefile

@ -1,3 +1,5 @@
# Our default make target
all:
export CC export CC
export AR export AR
@ -6,7 +8,13 @@ export LDFLAGS
export LDLIBS export LDLIBS
export TOOLS_ADDITIONAL 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 #Ultrasparc64 users experiencing SIGBUS should try the following gcc options
#(thanks to Robert Gibbon) #(thanks to Robert Gibbon)

4
config.mak.in

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

3
configure.ac

@ -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_DEFINE([PACKAGE_BUILDDATE], "[m4_esyscmd([scripts/version.sh date | tr -d '\n'])]", [Last change date])
AC_CANONICAL_HOST
AC_PROG_CC AC_PROG_CC
AC_CHECK_TOOL([AR], [ar], [false]) AC_CHECK_TOOL([AR], [ar], [false])
AC_CHECK_TOOL([WINDRES], [windres], [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(WINDRES)
AC_SUBST(TOOLS_ADDITIONAL) AC_SUBST(TOOLS_ADDITIONAL)
AC_CONFIG_HEADERS(include/config.h) AC_CONFIG_HEADERS(include/config.h)

1
scripts/hack_fakeautoconf.sh

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

Loading…
Cancel
Save