diff --git a/Makefile b/Makefile
index 7bb9aaf82202861ceed453f57871b48f55d35c15..4c88c890b72d55a4023234a39ebb2a9afd80852d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
--include Makefile.conf
+ifneq ($(MAKECMDGOALS),clean)
+ -include Makefile.conf
+endif
 
 
 SRCDIRS := src test
diff --git a/developer-doc/Makefile b/developer-doc/Makefile
index da31eaa8b19dd25e539fe596f2748fbece96c3cd..f83e0c889bce44e5c2855d0ef65b9bfb847f8971 100644
--- a/developer-doc/Makefile
+++ b/developer-doc/Makefile
@@ -1,5 +1,7 @@
 # include the machine dependent configuration
--include ../Makefile.conf
+ifneq ($(MAKECMDGOALS),clean)
+  -include ../Makefile.conf
+endif
 
 .PHONY: all clean
 
diff --git a/src/config/Makefile b/src/config/Makefile
index 5fb978fe0e229da4c0b712766b786b4f1c5936e5..bdcddde9374f78c189d45469c4e9b9606e361db3 100644
--- a/src/config/Makefile
+++ b/src/config/Makefile
@@ -1,6 +1,8 @@
 
 # include the machine dependent configuration
--include ../../Makefile.conf
+ifneq ($(MAKECMDGOALS),clean)
+  -include ../../Makefile.conf
+endif
 
 # sed script to edit program name defaults to do nothing
 ifndef program_transform_name
diff --git a/src/imd/Makefile b/src/imd/Makefile
index 5968953fca5a6bb7920f6adacd8777f44fc17eb6..08656a8db26d3889898aa5f85f8b15f3c6f91953 100644
--- a/src/imd/Makefile
+++ b/src/imd/Makefile
@@ -1,4 +1,7 @@
--include ../../Makefile.conf
+# include the machine dependent configuration
+ifneq ($(MAKECMDGOALS),clean)
+  -include ../../Makefile.conf
+endif
 
 all: libimd.$(SOEXT)
 
diff --git a/src/lib/Makefile b/src/lib/Makefile
index 5dff9d08846a58a97b5c7b6b88564d55b5b736e2..89558a52ba5d5200810ae39f8e8c8ce9b10ba5a5 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -8,7 +8,9 @@ DIRS := $(sort ../config ../wrapper ../main  $(KERNEL_MODULES))
 DIRSLINKS:=$(addsuffix .links,$(DIRS))
 
 # include the machine dependent configuration
--include ../../Makefile.conf
+ifneq ($(MAKECMDGOALS),clean)
+  -include ../../Makefile.conf
+endif
 
 # if machine dependent configuration has been found:
 ifdef GCCDEP
diff --git a/src/maketools/make.module b/src/maketools/make.module
index bd77c32a3a30c49741947d368dc370920682887e..31771e44c39ed894e5080f5692b954a3d306719f 100644
--- a/src/maketools/make.module
+++ b/src/maketools/make.module
@@ -5,7 +5,9 @@
 # 
 
 # include the machine dependent configuration
--include ../../Makefile.conf
+ifneq ($(MAKECMDGOALS),clean)
+  -include ../../Makefile.conf
+endif
 
 # if machine dependent configuration has been found:
 ifdef GCCDEP
diff --git a/src/wrapper/Makefile b/src/wrapper/Makefile
index 9066d363551c13906daed0547a0a2cc33f5b3735..ce03b0b4da7716b534d150455f30547e8f8ddce3 100644
--- a/src/wrapper/Makefile
+++ b/src/wrapper/Makefile
@@ -1,6 +1,8 @@
 
 # include the machine dependent configuration
--include ../../Makefile.conf
+ifneq ($(MAKECMDGOALS),clean)
+  -include ../../Makefile.conf
+endif
 
 # openmp flags should not be used here
 ifdef CXXFLAGS_NOOPENMP
diff --git a/test/Makefile b/test/Makefile
index 5f83c1126003ea519e464952607aa1ace5d4add0..92d524ce29fd1e0146c860b3d9a67bfd556b37c7 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,4 +1,7 @@
--include ../Makefile.conf
+# include the machine dependent configuration
+ifneq ($(MAKECMDGOALS),clean)
+  -include ../Makefile.conf
+endif
 
 SUBDIRS = link
 
diff --git a/user-doc/Makefile b/user-doc/Makefile
index 604feb26259d1dc97b91fcf4f8b6767c0dc95e62..dfb3524d46c1500def1b803341286a7c43cb07cf 100644
--- a/user-doc/Makefile
+++ b/user-doc/Makefile
@@ -1,5 +1,7 @@
 # include the machine dependent configuration
--include ../Makefile.conf
+ifneq ($(MAKECMDGOALS),clean)
+  -include ../Makefile.conf
+endif
 
 .PHONY: all clean