summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 134e74323..9d83dbaa3 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -15,5 +15,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-include ./Makefile
-include $(srcdir)/syntax-checks.mk
+# If the user runs GNU make but has not yet run ./configure,
+# give them an helpful diagnostic instead of a cryptic error.
+am--Makefile := $(wildcard Makefile)
+ifeq ($(am--Makefile),)
+ $(warning There seems to be no Makefile in this directory.)
+ $(warning You must run ./configure before running 'make'.)
+ $(error Fatal Error)
+else
+ include ./Makefile
+ include $(srcdir)/syntax-checks.mk
+endif