make/InitSupport.gmk
changeset 29663 74ff65003536
parent 29662 78c47f0002c3
child 29788 b581a3d9db41
--- a/make/InitSupport.gmk	Thu Mar 26 16:17:30 2015 +0100
+++ b/make/InitSupport.gmk	Fri Mar 27 14:11:26 2015 +0100
@@ -264,8 +264,17 @@
   # Sanity check the spec file, so it matches this source code
   define CheckSpecSanity
     ifneq ($$(topdir), $$(TOPDIR))
-      $$(info Error: SPEC mismatch. $$$$(TOPDIR) does not match current directory.)
-      $$(error Cannot continue)
+      ifneq ($$(topdir), $$(ORIGINAL_TOPDIR))
+        ifneq ($$(topdir), $$(CANONICAL_TOPDIR))
+          $$(info Error: SPEC mismatch! Current working directory)
+          $$(info $$(topdir))
+          $$(info does not match either TOPDIR, ORIGINAL_TOPDIR or CANONICAL_TOPDIR)
+          $$(info $$(TOPDIR))
+          $$(info $$(ORIGINAL_TOPDIR))
+          $$(info $$(CANONICAL_TOPDIR))
+          $$(error Cannot continue)
+        endif
+      endif
     endif
   endef