diff options
author | Christian Heimes <christian@python.org> | 2022-04-01 15:23:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 15:23:12 (GMT) |
commit | abdd69c95c1711c2dc75be4e784c6d6c80a409b9 (patch) | |
tree | cf8281ea1bce19ff1aeee6c12aae9a580bcb4a28 /Modules/makesetup | |
parent | 079143df7e40c4d336cb5c385b166aa91058d050 (diff) | |
download | cpython-abdd69c95c1711c2dc75be4e784c6d6c80a409b9.zip cpython-abdd69c95c1711c2dc75be4e784c6d6c80a409b9.tar.gz cpython-abdd69c95c1711c2dc75be4e784c6d6c80a409b9.tar.bz2 |
bpo-46023: makesetup: skip all duplicate modules (GH-32234)
Diffstat (limited to 'Modules/makesetup')
-rwxr-xr-x | Modules/makesetup | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Modules/makesetup b/Modules/makesetup index 3909650..9b20e3c 100755 --- a/Modules/makesetup +++ b/Modules/makesetup @@ -117,6 +117,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | BUILT= BUILT_SHARED= DISABLED= + CONFIGURED= MODS= SHAREDMODS= OBJS= @@ -206,12 +207,17 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | cpps="\$(MODULE_${mods_upper}_CFLAGS)" libs="\$(MODULE_${mods_upper}_LDFLAGS)" fi - case $DISABLED in - *$mods*) - # disabled by previous rule / Setup file - continue - ;; - esac + for mod in $mods + do + case $CONFIGURED in + *,${mod},*) + # Detected multiple rules for a module, first rule wins. This + # allows users to disable modules in Setup.local. + echo 1>&2 "maksetup: '$mod' was handled by previous rule." + continue 2;; + esac + CONFIGURED="$CONFIGURED,${mod}," + done case $doconfig in yes) LIBS="$LIBS $libs" |