From c32d04659ac3f8c8bc613395a0c7b91aec31ae9f Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 2 Mar 2016 16:27:07 +0000 Subject: [PATCH] Allow passing custom configure flags and make command Patch by Greg Troxel. Closes #3165 git-svn-id: http://svn.osgeo.org/postgis/trunk@14734 b70326c6-7e19-0410-871a-916f4a2858ee --- make_dist.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/make_dist.sh b/make_dist.sh index c267ad5db..5b3a3021f 100755 --- a/make_dist.sh +++ b/make_dist.sh @@ -14,12 +14,26 @@ # # NOTE: will not work prior to 1.1.0 # +# ENVIRONMENT VARIABLES: +# +# CONFIGURE_ARGS passed to ./configure call +# MAKE useed for builds (defaults to "make") +# # tag=trunk version=dev git=no +# Define in environment if necessary to get postgis to configure, +# which is only done to build comments. +#CONFIGURE_ARGS= + +# Define in environment if Gnu make is not make (e.g., gmake). +if [ "$MAKE" = "" ]; then + MAKE=make +fi + [ -d ".git" ] && git=yes [ "$git" = "yes" ] && tag=svn-$tag @@ -66,7 +80,7 @@ echo "Running autogen.sh; ./configure" owd="$PWD" cd "$outdir" ./autogen.sh -./configure +./configure ${CONFIGURE_ARGS} # generating postgis_svn_revision.h for >= 2.0.0 tags if test -f utils/svn_repo_revision.pl; then echo "Generating postgis_svn_revision.h" @@ -79,18 +93,18 @@ cd "$owd" echo "Generating documentation" owd="$PWD" cd "$outdir"/doc -make comments +${MAKE} comments if [ $? -gt 0 ]; then exit 1 fi -make clean # won't drop the comment files +${MAKE} clean # won't drop the comment files cd "$owd" # Run make distclean echo "Running make distclean" owd="$PWD" cd "$outdir" -make distclean +${MAKE} distclean if [ "$git" = "yes" ]; then echo "Removing .git dir" rm -rf .git -- 2.40.0