Skip to content

Commit

Permalink
Makefile: bail out on invalid HAVE_RULES value
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Mar 29, 2024
1 parent 058dced commit 5f12c26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ifndef VERBOSE
endif
# To compile with rules, use 'make HAVE_RULES=yes'
ifndef HAVE_RULES
HAVE_RULES=no
HAVE_RULES=
endif

ifndef MATCHCOMPILER
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tools/dmake/dmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 5f12c26

Please sign in to comment.