diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-01-31 12:16:53 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-01-31 12:16:53 +0100 |
commit | 864293481e6a8b89c75591ba20288fda87808030 (patch) | |
tree | d34d0a7a30b2a3599f8d672ceb6ada23b393c6ab /Configure | |
parent | cc5b6bab038f02711e281f7281150d52ad1f2ab9 (diff) | |
download | perl-864293481e6a8b89c75591ba20288fda87808030.tar.gz |
Configure now aborts with a diagnostic if it detects a duplicate extension.
During the development process, if an extension module changes dual-life
status it can move between ext/, dist/ and cpan/. If one uses git pull in a
built tree across such a change, one can end up with the build tree in a
messy state from which the 'distclean' target can't recover. Configure will
spot both the old and new directories, and may wrongly categorise the
extension as non-XS, resulting in obscure build failures after miniperl is
build.
In the general case, the "old" directory might contain files the user wants
to keep, so it's not safe to automatically delete it. The only safe option
is to ask the user to resolve the problem, hence with this change, if
Configure detects such a situation it aborts with a diagnostic suggesting
what to do.
This isn't a problem that affects released tarballs.
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -22180,6 +22180,23 @@ find_extensions=' fi; fi; else + echo " $known_extensions $nonxs_extensions" > $$.tmp; + if $contains " $this_ext " $$.tmp; then + 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 "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"; |