Not picking up the GNU version of make

Hi team,

I am new to unix,and need your advice on the below.
I am using aix5.3 and have installed make-3.82 on the server.
I need to use gmake for configuring and installing a package ,but it is giving error at the below

root@sapsrp:/usr/tmp/xymon-4.3.2
# ./configure.server

Configuration script for Xymon

This script asks a few questions and builds a Makefile to compile Xymon

Checking your make-utility
GNU make is required to build Xymon.
If it is available as "gmake", run configure as: 'MAKE=gmake ./configure.server'

I checked the code where its causing the error and tee the output

if test "$MAKE" = ""; then
        MAKE=make
fi
echo "Checking your make-utility"
MAKEVER=`$MAKE -version 2>&1 | head -n 1 | awk '{print $1 " " $2}'`
if test "$MAKEVER" != "GNU Make"
then
        echo "GNU make is required to build Xymon."
        echo "If it is available as \"gmake\", run configure as: 'MAKE=gmake $0'"
        exit 1

TEE OUTPUT
/usr/bin/gmake: Not a recognized flag: v
usage: make [-einqrst] [-k|-S] [-d[A|adg[1|2]mstv]] [-D variable] [-f makefile ] [-j [jobs]] [variable=value ...] [target ...# which gmake

Its not picking up the GNU version of make,I have alreadys set the gmake environment variable etc..

export MAKE=/usr/bin/gmake

root@sapsrp:/usr/bin
# which gmake
/usr/bin/gmake
root@sapsrp:/usr/bin
# ls -lrta *make*
-rwxr-xr-x    1 bin      bin           10318 Nov 23 2004  makedev
lrwxrwxrwx    1 bin      bin              20 Mar 01 2009  makekey -> /usr/ccs/bin/makekey
lrwxrwxrwx    1 root     system           36 Apr 08 14:43 automake-1.11 -> ../../opt/freeware/bin/automake-1.11
lrwxrwxrwx    1 root     system           31 Apr 08 14:43 automake -> ../../opt/freeware/bin/automake
-r-xr-xr-x    1 root     system       106350 Apr 21 09:45 make
-r-xr-xr-x    1 root     system       106350 Apr 21 09:47 gmake


# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.0/lto-wrapper
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../gcc-4.6.0/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-threads --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --host=powerpc-ibm-aix5.3.0.0
Thread model: aix
gcc version 4.6.0 (GCC)

Please suggest on the above,Let me know if u need anymore info

those *make files look to be the same to me.

what says:

# gmake --version
# make --version

Hi,

both the commands are not working.:frowning:

root@sapsrp:/
# gmake --version
gmake: Not a recognized flag: -
usage: make [-einqrst] [-k|-S] [-d[A|adg[1|2]mstv]] [-D variable] [-f makefile ]                                                                              [-j [jobs]] [variable=value ...] [target ...]
root@sapsrp:/

# make --version
make: Not a recognized flag: -
usage: make [-einqrst] [-k|-S] [-d[A|adg[1|2]mstv]] [-D variable] [-f makefile ] [-j [jobs]] [variable=value ...] [target ...]
root@sapsrp:/
#

---------- Post updated 04-22-11 at 12:33 AM ---------- Previous update was 04-21-11 at 08:03 AM ----------

Hi,

Could anyone help me on the above,and suggest something which i might have done wrong.:confused:

Sonal - in your OP you say that you have "installed" make 3.82.....could you please ellaborate on how you installed it.?

pakage / source? where did you get it from? AIX cd?

The GNU version of make responds to the --version flag, so it looks (to me at least) like the make you have installed is a propriatry AIX version thats simply been renamed to gmake.

i'm just trying to understand your process so far.

hi,
regarding the make installation.i downloaded make-3.82.tar.gz package from site gnu.org/gnu/make
then after doing gunzip and untar, i gave ./configure then make ,then make install

any suggestions ...

Please don't bump up threads if your questions aren't answered immediately.

Did you receive any errors during any of the compilation steps? Also, did you change any of the configuration options? I'm asking this because GNU software by defaults installs to /usr/local/bin, instead of /usr/bin/

Hi,
thanks a lot for correcting my mistake,i see that make is also availabe in /usr/local/bin and went through the make install screens ..which also shows same

Target "install-data-am" is up to date.
Target "install" is up to date.
        test -z "/usr/local/bin" || config/install-sh -c -d "/usr/local/bin"
  config/install-sh -c make '/usr/local/bin'
chgrp system /usr/local/bin/make && chmod g+s /usr/local/bin/make
Target "install-exec-am" is up to date.T

well now I corrected the make variable and set it as

export MAKE=/usr/local/bin/make

and in the package which i m installing ,I made below changes in /build/Makefile.AIX

# vi Makefile.AIX
"Makefile.AIX" 23 lines, 616 characters
# Xymon compile-time settings for a AIX system
#

OSDEF = -DAIX

# NETLIBS: You may need to add -lresolv or similar to pick up network libraries
NETLIBS =

# Compile flags for normal build with gcc
CC = gcc
CFLAGS = -O -D_REENTRANT $(OSDEF)

# Compile flags for normal build with IBM compiler
#CC = cc
#CFLAGS = -g -O3 -qstrict -qcpluscmt -D_REENTRANT $(LFSDEF) $(OSDEF)

and it worked fine,