3

I am trying to setup android environment for the android source build. I think the make version on the system was causing problems with the android build. I am now trying to install make from the sources I downloaded from http://ftp.gnu.org/gnu/make/ . I frist configure it then run make which gives me this error. Been trying to debug this by changing things in the error line.

root@hali-desktop:/home/hali/Downloads/make-3.81# make
/bin/bash: -c: line 0: syntax error near unexpected token `;;'
/bin/bash: -c: line 0: `if test ! -f config.h; then  rm -f stamp-h1;  make stamph1;;      
else :; fi'
make: *** [config.h] Error 1

Here is the Makefile in the code that I am trying to compile.

    config.h: stamp-h1
    @if test ! -f $@; then \
      rm -f stamp-h1; \
      $(MAKE) stamp-h1; \
    else :; fi

I dont understand shell scripting much. Though did study a lil for the troubleshooting sake. I need help from here .

sraddhaj
  • 581
  • 1
  • 7
  • 17
  • I was unable to reproduce this problem with the 3.81 `make` package on my system. Did the `./configure` step throw any errors? – sarnold Mar 12 '12 at 08:30
  • How did `;;` get into your error output but not your source file? – sarnold Mar 12 '12 at 08:32
  • This answer is from the README Some systems' Make programs are broken and cannot process the Makefile for GNU Make. If you get errors from your system's Make when building GNU Make, try using `build.sh' instead. This worked. For Anyone who gets stuck compiling a make from gnu.org – sraddhaj Mar 12 '12 at 10:16

1 Answers1

1

It looks that you try to build 'make' with the help of a broken 'make'.

GNU make comes with a script to build make without the need for a (working) make. After unpacking do:

$ ./configure
$ bash build.sh

The GNU 'make' executable is placed in the current directory.

BTW: It would be helpful if you could also give some information about the host system - e.g. the system where you want to build make.

Andreas Florath
  • 4,418
  • 22
  • 32