diff options
| author | Christian Hesse <mail@eworm.de> | 2016-04-24 21:49:13 +0200 |
|---|---|---|
| committer | Christian Hesse <mail@eworm.de> | 2016-04-24 21:49:13 +0200 |
| commit | 73e6d7f0ade7747110dab5afa61f52d9e49af613 (patch) | |
| tree | 16dba1b33c0812ce5ddace2a26f344fb0323d4b2 | |
| parent | eb176b4928759f5b63bdf3cf62962db12196022e (diff) | |
| download | vis-73e6d7f0ade7747110dab5afa61f52d9e49af613.tar.gz vis-73e6d7f0ade7747110dab5afa61f52d9e49af613.tar.xz | |
build: run configure before building dependencies
We need some basic configuration before building dependencies. For
example useful CFLAGS have to be in place to prevent linker errors.
The configure script is run again later with some extra parameters.
| -rw-r--r-- | GNUmakefile | 2 | ||||
| -rwxr-xr-x | configure | 55 |
2 files changed, 39 insertions, 18 deletions
diff --git a/GNUmakefile b/GNUmakefile index 6dcdfd3..b2f6156 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -169,6 +169,7 @@ dependencies-local: $(MAKE) dependency/build/local local: clean + ./configure --environment-only $(MAKE) dependencies-local ./configure CFLAGS="-I$(DEPS_INC)" LDFLAGS="-L$(DEPS_LIB)" LD_LIBRARY_PATH="$(DEPS_LIB)" $(MAKE) @@ -176,6 +177,7 @@ local: clean standalone: clean [ ! -e dependency/build/local ] || $(MAKE) dependencies-clean + ./configure --environment-only $(MAKE) dependency/build/libmusl-install PATH=$(DEPS_BIN):$$PATH PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR= $(MAKE) \ CC=musl-gcc dependency/build/standalone @@ -12,6 +12,7 @@ Defaults for the options are specified in brackets. Configuration: --srcdir=DIR source directory [detected] + --environment-only check environment only, no system libraries Installation directories: --prefix=PREFIX main installation prefix [/usr/local] @@ -125,6 +126,7 @@ case "$arg" in --bindir=*) BINDIR=${arg#*=} ;; --sharedir=*) SHAREDIR=${arg#*=} ;; --mandir=*) MANDIR=${arg#*=} ;; +--environment-only) environmentonly=yes ;; --enable-lua|--enable-lua=yes) lua=yes ;; --disable-lua|--enable-lua=no) lua=no ;; --enable-selinux|--enable-selinux=yes) selinux=yes ;; @@ -225,6 +227,39 @@ tryldflag LDFLAGS_AUTO -Wl,-z,now tryldflag LDFLAGS_AUTO -Wl,-z,relro #tryldflag LDFLAGS_AUTO -pie +printf "creating config.mk... " + +cmdline=$(quote "$0") +for i ; do cmdline="$cmdline $(quote "$i")" ; done + +exec 3>&1 1>config.mk + +cat << EOF +# This version of config.mk was generated by: +# $cmdline +# Any changes made here will be lost if configure is re-run +SRCDIR = $SRCDIR +PREFIX = $PREFIX +EXEC_PREFIX = $EXEC_PREFIX +BINDIR = $BINDIR +MANPREFIX = $MANDIR +SHAREPREFIX = $SHAREDIR +CC = $CC +CFLAGS = $CFLAGS +LDFLAGS = $LDFLAGS +CFLAGS_STD = $CFLAGS_STD +LDFLAGS_STD = $LDFLAGS_STD +CFLAGS_AUTO = $CFLAGS_AUTO +LDFLAGS_AUTO = $LDFLAGS_AUTO +EOF +exec 1>&3 3>&- + +printf "done\n" + +if test "$environmentonly" = "yes"; then + exit 0 +fi + have_pkgconfig=no printf "checking for pkg-config... " cmdexists pkg-config && have_pkgconfig=yes @@ -430,30 +465,14 @@ EOF fi fi -printf "creating config.mk... " +printf "completing config.mk... " cmdline=$(quote "$0") for i ; do cmdline="$cmdline $(quote "$i")" ; done -exec 3>&1 1>config.mk +exec 3>&1 1>>config.mk cat << EOF -# This version of config.mk was generated by: -# $cmdline -# Any changes made here will be lost if configure is re-run -SRCDIR = $SRCDIR -PREFIX = $PREFIX -EXEC_PREFIX = $EXEC_PREFIX -BINDIR = $BINDIR -MANPREFIX = $MANDIR -SHAREPREFIX = $SHAREDIR -CC = $CC -CFLAGS = $CFLAGS -LDFLAGS = $LDFLAGS -CFLAGS_STD = $CFLAGS_STD -LDFLAGS_STD = $LDFLAGS_STD -CFLAGS_AUTO = $CFLAGS_AUTO -LDFLAGS_AUTO = $LDFLAGS_AUTO CFLAGS_CURSES = $CFLAGS_CURSES LDFLAGS_CURSES = $LDFLAGS_CURSES CFLAGS_TERMKEY = $CFLAGS_TERMKEY |
