From: H.Merijn Brand Date: Mon, 13 Feb 2012 15:46:47 +0000 (+0100) Subject: Configure now aborts with a diagnostic if it detects a duplicate extension. X-Git-Tag: 5.26.1~193 X-Git-Url: https://perl5.git.perl.org/metaconfig.git/commitdiff_plain/6edba00b024337f59f18bc495868d7da38181e63 Configure now aborts with a diagnostic if it detects a duplicate extension. Backport of 864293481e6a8b8 + 01db32e2e6d17e --- diff --git a/U/perl/Extensions.U b/U/perl/Extensions.U index 0ae09be..d43c0d8 100644 --- a/U/perl/Extensions.U +++ b/U/perl/Extensions.U @@ -97,6 +97,25 @@ find_extensions=' fi; fi; else + echo " $known_extensions $nonxs_extensions" > $$.tmp; + if $contains " $this_ext " $$.tmp; then + echo >&4; + echo "Duplicate directories detected for extension $xxx" >&4; + echo "Configure cannot correctly recover from this - shall I abort?" >&4; + case "$knowitall" in + "") dflt=y;; + *) dflt=n;; + esac; + . ../UU/myread; + case "$ans" in + n*|N*) ;; + *) echo >&4; + echo "Ok. Stopping Configure." >&4; + echo "Please remove the duplicate directory (eg using git clean) and then re-run Configure" >&4; + exit 1;; + esac; + echo "Ok. You will need to correct config.sh before running make." >&4; + fi; $ls -1 $xxx > $$.tmp; if $contains "\.xs$" $$.tmp > /dev/null 2>&1; then known_extensions="$known_extensions $this_ext";