0

Trying to compile a Makefile gives me the following error:

 Makefile:248: *** missing separator.  Stop.

The relevant lines in the Makefile (line 248 and nearby lines) are:

tar :
    @if test -f espresso.tar.gz ; then /bin/rm espresso.tar.gz ; fi
    # do not include unneeded stuff 
    find ./ -type f | grep -v -e /.svn/ -e'/\.' -e'\.o$$' \
             -e'\.mod$$' -e'\.a$$' -e'\.d$$' -e'\.i$$' -e'\.F90$$' -e'\.x$$' \
         -e'~$$' -e'\./GUI' -e '\./tempdir' | xargs tar rvf espresso.tar
    gzip espresso.tar

Where the third line of the command find ending with espresso.tar is line 248. I tried following the debug procedure listed here and issued the command cat -e -t -v Makefile, which gave me the following code:

tar :$
^I@if test -f espresso.tar.gz ; then /bin/rm espresso.tar.gz ; fi$
^I# do not include unneeded stuff $
^Ifind ./ -type f | grep -v -e /.svn/ -e'/\.' -e'\.o$$' \$
         -e'\.mod$$' -e'\.a$$' -e'\.d$$' -e'\.i$$' -e'\.F90$$' -e'\.x$$' \$
^I     -e'~$$' -e'\./GUI' -e '\./tempdir' | xargs tar rvf espresso.tar$
^Igzip espresso.tar$
$

Sure enough, the ^I character was missing, but from line 247 (weird). So I edited the file to include the tab character and now it says:

tar :$
^I@if test -f espresso.tar.gz ; then /bin/rm espresso.tar.gz ; fi$
^I# do not include unneeded stuff $
^Ifind ./ -type f | grep -v -e /.svn/ -e'/\.' -e'\.o$$' \$
^I     -e'\.mod$$' -e'\.a$$' -e'\.d$$' -e'\.i$$' -e'\.F90$$' -e'\.x$$' \$
^I     -e'~$$' -e'\./GUI' -e '\./tempdir' | xargs tar rvf espresso.tar$
^Igzip espresso.tar$
$

However the error still persists, which I somewhat expected since the problem wasn't with that line in the first place. I even tried removing all the whitespace from the relevant lines but the error is still there. Not sure if there's a problem with the ^I character. Any help in solving this issue would be appreciated. Thanks!

The full Makefile can be found in the main folder of the download file (direct link to the file here)

pyroscepter
  • 205
  • 1
  • 3
  • 9
  • There must be some mistake here. There's nothing wrong with that recipe. I downloaded your tarball but line 248 of the root makefile is NOT a line in that rule, in that version. I also ran `make -n` but I got no error message, so the root makefile is not a problem. So then I ran `make -n` on all the Makefiles in the tarball and got no missing separator errors on any of them. – MadScientist May 24 '18 at 20:33
  • You've been told before about [minimal complete examples](https://stackoverflow.com/help/mcve). – Beta May 24 '18 at 20:43

0 Answers0