Index: make.new/function.c
===================================================================
RCS file: /sources/make/make/function.c,v
retrieving revision 1.98
diff -p -u -r1.98 function.c
--- make.new/function.c	9 Apr 2006 22:09:24 -0000	1.98
+++ make.new/function.c	6 Nov 2006 02:45:12 -0000
@@ -1076,6 +1076,50 @@ func_strip (char *o, char **argv, const 
 }
 
 /*
+  $(upper text)
+
+  Returns TEXT entirely converted to upper-case.
+*/
+static char *
+func_upper (char *o, char **argv, const char *funcname UNUSED)
+{
+  char *new_o;
+
+  /* Input is covered by EXPAND_ARGS flag in func table. */
+  new_o = variable_buffer_output (o, argv[0], strlen (argv[0]));
+
+  while (o != new_o)
+    {
+      *o = toupper (*o);
+      o++;
+    }
+
+  return new_o;
+}
+
+/*
+  $(lower text)
+
+  Returns TEXT entirely converted to lower-case.
+*/
+static char *
+func_lower (char *o, char **argv, const char *funcname UNUSED)
+{
+  char *new_o;
+
+  /* Input is covered by EXPAND_ARGS flag in func table. */
+  new_o = variable_buffer_output (o, argv[0], strlen (argv[0]));
+
+  while (o != new_o)
+    {
+      *o = tolower (*o);
+      o++;
+    }
+
+  return new_o;
+}
+
+/*
   Print a warning or fatal message.
 */
 static char *
@@ -2064,7 +2108,9 @@ static struct function_table_entry funct
   { STRING_SIZE_TUPLE("realpath"),      0,  1,  1,  func_realpath},
   { STRING_SIZE_TUPLE("shell"),         0,  1,  1,  func_shell},
   { STRING_SIZE_TUPLE("sort"),          0,  1,  1,  func_sort},
+  { STRING_SIZE_TUPLE("lower"),         0,  1,  1,  func_lower},
   { STRING_SIZE_TUPLE("strip"),         0,  1,  1,  func_strip},
+  { STRING_SIZE_TUPLE("upper"),         0,  1,  1,  func_upper},
   { STRING_SIZE_TUPLE("wildcard"),      0,  1,  1,  func_wildcard},
   { STRING_SIZE_TUPLE("word"),          2,  2,  1,  func_word},
   { STRING_SIZE_TUPLE("wordlist"),      3,  3,  1,  func_wordlist},
Index: make.new/doc/make.texi
===================================================================
RCS file: /sources/make/make/doc/make.texi,v
retrieving revision 1.46
diff -p -u -r1.46 make.texi
--- make.new/doc/make.texi	1 Oct 2006 05:38:38 -0000	1.46
+++ make.new/doc/make.texi	6 Nov 2006 02:45:14 -0000
@@ -6448,6 +6448,16 @@ Replacing the variable reference @w{@sam
 function call @w{@samp{$(strip $(needs_made))}} in the @code{ifneq}
 directive would make it more robust.@refill
 
+@item $(upper @var{string})
+@cindex character case manipulation
+@findex upper
+Converts all alphabetic characters in @var{string} to upper case.
+
+@item $(lower @var{string})
+@cindex character case manipulation
+@findex lower
+Converts all alphabetic characters in @var{string} to lower case.
+
 @item $(findstring @var{find},@var{in})
 @findex findstring
 @cindex searching for strings
Index: make.new/tests/scripts/functions/charcase
===================================================================
RCS file: make.new/tests/scripts/functions/charcase
diff -N make.new/tests/scripts/functions/charcase
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ make.new/tests/scripts/functions/charcase	6 Nov 2006 02:45:14 -0000
@@ -0,0 +1,45 @@
+#                                                                    -*-perl-*-
+#$id$
+$description = "Test the abspath functions.";
+
+$details = "";
+
+run_make_test('
+
+FOO= This is  a TEST stRiNG with RAndomCapS  IN IT.  1234567890!@%^&*()_;
+
+all:
+	@echo "$(FOO)"
+	@echo "$(lower $(FOO))"
+	@echo "$(upper $(FOO))"
+
+	@echo "$(upper $(foO))"
+	@echo "$(lower $(FOo))"
+	@echo "$($(upper $(foO)))"
+	@echo "$($(lower $(FOo)))"
+	@echo "$($(upper foO))"
+	@echo "$($(lower FOo))"
+	@echo "$(upper $($(upper foO)))"
+	@echo "$(lower $($(upper foO)))"
+
+	@echo "$(value $(upper foO))"
+
+
+','',
+'This is  a TEST stRiNG with RAndomCapS  IN IT.  1234567890!@%^&*()_;
+this is  a test string with randomcaps  in it.  1234567890!@%^&*()_;
+THIS IS  A TEST STRING WITH RANDOMCAPS  IN IT.  1234567890!@%^&*()_;
+
+
+
+
+This is  a TEST stRiNG with RAndomCapS  IN IT.  1234567890!@%^&*()_;
+
+THIS IS  A TEST STRING WITH RANDOMCAPS  IN IT.  1234567890!@%^&*()_;
+this is  a test string with randomcaps  in it.  1234567890!@%^&*()_;
+This is  a TEST stRiNG with RAndomCapS  IN IT.  1234567890!@%^&*()_;
+');
+
+
+# This tells the test driver that the perl test script executed properly.
+1;
