summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index fce8e628..ec080d80 100644
--- a/Makefile
+++ b/Makefile
@@ -170,6 +170,17 @@ notconfigured:
$(V)exit 1
endif
+ifneq ($(top_srcdir),)
+ifneq ($(wildcard $(top_srcdir)/config.h $(top_srcdir)/y.tab.h),)
+.PHONY: tainted
+tainted:
+ $(V)echo "Source directory $(top_srcdir) is in a configured state."
+ $(V)echo "Generated files there with interfere with the build here."
+ $(V)echo "Please do a \"make distclean\" in $(top_srcdir) first."
+ $(V)exit 1
+endif
+endif
+
.PHONY: all
all: $(BUILD_TARGETS)