Index: Makefile
===================================================================
--- Makefile	(revision 78714)
+++ Makefile	(working copy)
@@ -1,6 +1,6 @@
 #
 # Asterisk -- A telephony toolkit for Linux.
-# 
+#
 # Top level Makefile
 #
 # Copyright (C) 1999-2006, Digium, Inc.
@@ -96,7 +96,7 @@
 #DESTDIR?=/tmp/asterisk
 
 # Define standard directories for various platforms
-# These apply if they are not redefined in asterisk.conf 
+# These apply if they are not redefined in asterisk.conf
 ifeq ($(OSARCH),SunOS)
   ASTETCDIR=/var/etc/asterisk
   ASTLIBDIR=/opt/asterisk/lib
@@ -145,7 +145,7 @@
 
 # If the file .asterisk.makeopts is present in your home directory, you can
 # include all of your favorite menuselect options so that every time you download
-# a new version of Asterisk, you don't have to run menuselect to set them. 
+# a new version of Asterisk, you don't have to run menuselect to set them.
 # The file /etc/asterisk.makeopts will also be included but can be overridden
 # by the file in your home directory.
 
@@ -182,7 +182,7 @@
       ifeq ($(SUB_PROC),xscale)
         OPTIONS+=-fsigned-char -mcpu=xscale
       else
-        OPTIONS+=-fsigned-char 
+        OPTIONS+=-fsigned-char
       endif
     endif
   endif
@@ -277,18 +277,22 @@
 endif
 
 all: _all
-	@echo " +--------- Asterisk Build Complete ---------+"  
-	@echo " + Asterisk has successfully been built, and +"  
+	@echo " +--------- Asterisk Build Complete ---------+"
+	@echo " + Asterisk has successfully been built, and +"
 	@echo " + can be installed by running:              +"
 	@echo " +                                           +"
-	@echo " +               $(MAKE) install                +"  
-	@echo " +-------------------------------------------+"  
+ifeq ($(MAKE), gmake)
+	@echo " +               $(MAKE) install               +"
+else
+	@echo " +               $(MAKE) install                +"
+endif
+	@echo " +-------------------------------------------+"
 
 _all: cleantest $(SUBDIRS)
 
 makeopts: configure
 	@echo "****"
-	@echo "**** The configure script must be executed before running '$(MAKE)'." 
+	@echo "**** The configure script must be executed before running '$(MAKE)'."
 	@echo "****               Please run \"./configure\"."
 	@echo "****"
 	@exit 1
@@ -394,7 +398,7 @@
 	mkdir -p $(DESTDIR)$(AGI_DIR)
 	$(MAKE) -C sounds install
 
-update: 
+update:
 	@if [ -d .svn ]; then \
 		echo "Updating from Subversion..." ; \
 		svn update | tee update.out; \
@@ -481,23 +485,31 @@
 	@if [ -x /usr/sbin/asterisk-post-install ]; then \
 		/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
 	fi
-	@echo " +---- Asterisk Installation Complete -------+"  
+	@echo " +---- Asterisk Installation Complete -------+"
 	@echo " +                                           +"
 	@echo " +    YOU MUST READ THE SECURITY DOCUMENT    +"
 	@echo " +                                           +"
-	@echo " + Asterisk has successfully been installed. +"  
-	@echo " + If you would like to install the sample   +"  
+	@echo " + Asterisk has successfully been installed. +"
+	@echo " + If you would like to install the sample   +"
 	@echo " + configuration files (overwriting any      +"
-	@echo " + existing config files), run:              +"  
+	@echo " + existing config files), run:              +"
 	@echo " +                                           +"
+ifeq ($(MAKE), gmake)
+	@echo " +               $(MAKE) samples               +"
+else
 	@echo " +               $(MAKE) samples                +"
+endif
 	@echo " +                                           +"
 	@echo " +-----------------  or ---------------------+"
 	@echo " +                                           +"
 	@echo " + You can go ahead and install the asterisk +"
 	@echo " + program documentation now or later run:   +"
 	@echo " +                                           +"
+ifeq ($(MAKE), gmake)
+	@echo " +              $(MAKE) progdocs               +"
+else
 	@echo " +              $(MAKE) progdocs                +"
+endif
 	@echo " +                                           +"
 	@echo " + **Note** This requires that you have      +"
 	@echo " + doxygen installed on your local system    +"
@@ -568,7 +580,7 @@
 	for x in images/*.gif; do \
 		$(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \
 	done
-	@echo " +--------- Asterisk Web Voicemail ----------+"  
+	@echo " +--------- Asterisk Web Voicemail ----------+"
 	@echo " +                                           +"
 	@echo " + Asterisk Web Voicemail is installed in    +"
 	@echo " + your cgi-bin directory:                   +"
@@ -584,9 +596,9 @@
 	@echo " + in your Makefile of HTTP_CGIDIR and       +"
 	@echo " + HTTP_DOCSDIR                              +"
 	@echo " +                                           +"
-	@echo " +-------------------------------------------+"  
+	@echo " +-------------------------------------------+"
 
-spec: 
+spec:
 	sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > asterisk.spec ; \
 
 rpm: __rpm
@@ -602,7 +614,7 @@
 
 progdocs:
 	(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
-	echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen - 
+	echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen -
 
 config:
 	@if [ "${OSARCH}" = "linux-gnu" ]; then \
@@ -634,7 +646,7 @@
 	$(MAKE) -C sounds all
 
 # If the cleancount has been changed, force a make clean.
-# .cleancount is the global clean count, and .lastclean is the 
+# .cleancount is the global clean count, and .lastclean is the
 # last clean count we had
 
 cleantest:
@@ -659,18 +671,18 @@
 	$(MAKE) -C sounds uninstall
 
 uninstall: _uninstall
-	@echo " +--------- Asterisk Uninstall Complete -----+"  
-	@echo " + Asterisk binaries, sounds, man pages,     +"  
-	@echo " + headers, modules, and firmware builds,    +"  
-	@echo " + have all been uninstalled.                +"  
+	@echo " +--------- Asterisk Uninstall Complete -----+"
+	@echo " + Asterisk binaries, sounds, man pages,     +"
+	@echo " + headers, modules, and firmware builds,    +"
+	@echo " + have all been uninstalled.                +"
 	@echo " +                                           +"
 	@echo " + To remove ALL traces of Asterisk,         +"
 	@echo " + including configuration, spool            +"
 	@echo " + directories, and logs, run the following  +"
 	@echo " + command:                                  +"
 	@echo " +                                           +"
-	@echo " +            $(MAKE) uninstall-all             +"  
-	@echo " +-------------------------------------------+"  
+	@echo " +            $(MAKE) uninstall-all             +"
+	@echo " +-------------------------------------------+"
 
 uninstall-all: _uninstall
 	rm -rf $(DESTDIR)$(ASTLIBDIR)
