X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/61ec970df30325dbcd8c9d0f0e431dc793126656..8769407d774157072e36d23bc6cc831cadacb6bb:/src/scripts/Configure-config.h diff --git a/src/scripts/Configure-config.h b/src/scripts/Configure-config.h index 2ec437276..6744755f7 100755 --- a/src/scripts/Configure-config.h +++ b/src/scripts/Configure-config.h @@ -1,5 +1,6 @@ #! /bin/sh -# $Cambridge: exim/src/scripts/Configure-config.h,v 1.1 2004/10/06 15:07:40 ph10 Exp $ +# Copyright (c) The Exim Maintainters 2022 +# SPDX-License-Identifier: GPL-2.0-or-later # Build the config.h file, using the buildconfig program, first ensuring that # it exists. @@ -18,7 +19,13 @@ # space. Oddly, the pattern previously read ^\([A-Z which didn't seem to # cause a problem (but did when the new bit was put in). -make buildconfig || exit 1 +# 04-May-2005: if $1 is set, copy it into $MAKE, and then use $MAKE, if set, +# instead of "make" so that if gmake is used, it is used consistently. + +if [ "$1" != "" ] ; then MAKE=$1 ; fi +if [ "$MAKE" = "" ] ; then MAKE=make ; fi + +$MAKE buildconfig || exit 1 # BEWARE: tab characters needed in the following sed command. They have had # a nasty tendency to get lost in the past, causing a problem if a tab has @@ -29,7 +36,7 @@ make buildconfig || exit 1 st=' ' (sed -n \ - "/\\\$/d;s/#.*\$//;s/^[$st]*\\([A-Z][^:$st]*\\)[$st]*=[$st]*\\([^$st]*\\)[$st]*\$/\\1=\\2 export \\1/p" \ + "/\\\$/d;s/#.*\$//;s/^[$st]*\\([A-Z][^:!+$st]*\\)[$st]*=[$st]*\\([^$st]*\\)[$st]*\$/\\1=\\2 export \\1/p" \ < Makefile ; echo "./buildconfig") | /bin/sh # If buildconfig ends with an error code, it will have output an error @@ -51,4 +58,5 @@ fi echo ">>> config.h built" echo "" +# vim: set ft=sh : # End of Configure-config.h