From 832785c925cefdc5f629b449383ce659e492ce2e Mon Sep 17 00:00:00 2001 From: firewave Date: Fri, 29 Mar 2024 11:07:38 +0100 Subject: [PATCH] Makefile: bail out on invalid `HAVE_RULES` value --- Makefile | 2 ++ tools/dmake/dmake.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 23a15c49e54a..72a3ca7d6601 100644 --- a/Makefile +++ b/Makefile @@ -160,6 +160,8 @@ ifeq ($(HAVE_RULES),yes) else LIBS=$(shell $(PCRE_CONFIG) --libs) endif +else ifneq ($(HAVE_RULES),) + $(error invalid HAVE_RULES value '$(HAVE_RULES)') endif ifndef PREFIX diff --git a/tools/dmake/dmake.cpp b/tools/dmake/dmake.cpp index c74eeac69ef3..a6ecfe56094d 100644 --- a/tools/dmake/dmake.cpp +++ b/tools/dmake/dmake.cpp @@ -743,6 +743,8 @@ int main(int argc, char **argv) << " else\n" << " LIBS=$(shell $(PCRE_CONFIG) --libs)\n" << " endif\n" + << "else ifneq ($(HAVE_RULES),)\n" + << " $(error invalid HAVE_RULES value '$(HAVE_RULES)')\n" << "endif\n\n"; makeConditionalVariable(fout, "PREFIX", "/usr");