diff --git a/Makefile b/Makefile
index 0ef81e26fb3d06a1581f08d3ab01eeee8e72a5e9..5253ac2ea1039ff86a63e80b12ee253f3e61eb40 100644
--- a/Makefile
+++ b/Makefile
@@ -101,8 +101,6 @@ export LDCONFIG_FLAGS
 export PYTHON
 
 -include makeopts
-# we want the MENUSELECT_EMBED var
--include menuselect.makeopts
 
 # start the primary CFLAGS and LDFLAGS with any that were provided
 # to the configure script
@@ -361,7 +359,7 @@ makeopts.embed_rules: menuselect.makeopts
 $(SUBDIRS): makeopts .lastclean main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
 
 ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
-  ifneq ($(MENUSELECT_EMBED),)
+  ifeq ($(shell grep ^MENUSELECT_EMBED=$$ menuselect.makeopts 2>/dev/null),)
     # Non-windows:
     # ensure that all module subdirectories are processed before 'main' during
     # a parallel build, since if there are modules selected to be embedded the