summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/config/post.in5
-rw-r--r--src/include/Makefile.in3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/config/post.in b/src/config/post.in
index 6ac10b05ff..023fd47974 100644
--- a/src/config/post.in
+++ b/src/config/post.in
@@ -28,6 +28,11 @@ $(BUILDTOP)/.depend-verify-srcdir:
@if test "$(srcdir)" = "." ; then \
echo 1>&2 error: cannot build dependencies with srcdir=. ; \
echo 1>&2 "(can't distinguish generated files from source files)" ; \
+ echo 1>&2 "Run 'make distclean' and create a separate build dir" ; \
+ exit 1 ; \
+ elif test -f "$(top_srcdir)/include/autoconf.h"; then \
+ echo 1>&2 "error: generated headers found in source tree" ; \
+ echo 1>&2 "Run 'make distclean' in source tree first" ; \
exit 1 ; \
else \
if test -r $(BUILDTOP)/.depend-verify-srcdir; then :; \
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index 4c8ca59d49..ec6a3f25e0 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -130,6 +130,9 @@ clean-windows::
clean::
$(RM) osconf.new $(BUILT_HEADERS)
+distclean::
+ $(RM) autoconf.h
+
install-headers-unix install:: krb5/krb5.h profile.h
$(INSTALL_DATA) $(srcdir)/krb5.h $(DESTDIR)$(KRB5_INCDIR)$(S)krb5.h
$(INSTALL_DATA) $(srcdir)/kdb.h $(DESTDIR)$(KRB5_INCDIR)$(S)kdb.h