Config bugs in Makefiles?

Two issues in the Makefiles prevent trivially enabling the built-in Mersenne-Twister RNG (over the default system rand). Patch included.

metis-5.0.2/GKlib/Makefile: mistakenly uses "pcre" argument for GKREGEX and GKRAND defines
metis-5.0.2/Makefile: does not allow gkrand (as well as pcre, gkregex)

Patch:

diff -r 6f6cc2b5e699 -r b500a0092aaf metis-5.0.2/GKlib/Makefile
--- a/metis-5.0.2/GKlib/Makefile Tue Sep 18 15:43:15 2012 -0700
+++ b/metis-5.0.2/GKlib/Makefile Thu Sep 20 14:42:10 2012 -0700
@@ -41,10 +41,10 @@
CONFIG_FLAGS += -DPCRE=$(pcre)
endif
ifneq ($(gkregex), not-set)
- CONFIG_FLAGS += -DGKREGEX=$(pcre)
+ CONFIG_FLAGS += -DGKREGEX=$(gkregex)
endif
ifneq ($(gkrand), not-set)
- CONFIG_FLAGS += -DGKRAND=$(pcre)
+ CONFIG_FLAGS += -DGKRAND=$(gkrand)
endif
ifneq ($(prefix), not-set)
CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix)
diff -r 6f6cc2b5e699 -r b500a0092aaf metis-5.0.2/Makefile
--- a/metis-5.0.2/Makefile Tue Sep 18 15:43:15 2012 -0700
+++ b/metis-5.0.2/Makefile Thu Sep 20 14:42:10 2012 -0700
@@ -6,6 +6,9 @@
gprof = not-set
openmp = not-set
prefix = not-set
+pcre = not-set
+gkregex = not-set
+gkrand = not-set
gklib_path = not-set
shared = not-set
cc = not-set
@@ -42,6 +45,15 @@
ifneq ($(openmp), not-set)
CONFIG_FLAGS += -DOPENMP=$(openmp)
endif
+ifneq ($(pcre), not-set)
+ CONFIG_FLAGS += -DPCRE=$(pcre)
+endif
+ifneq ($(gkregex), not-set)
+ CONFIG_FLAGS += -DGKREGEX=$(gkregex)
+endif
+ifneq ($(gkrand), not-set)
+ CONFIG_FLAGS += -DGKRAND=$(gkrand)
+endif
ifneq ($(prefix), not-set)
CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix)
endif