Find the answer to your Linux question:
Results 1 to 6 of 6
I am unable to write a simeple Makefile Though I know the concept am facing this error Makefile:2: *** missing separator (did you mean TAB instead of 8 spaces?). Stop. ...
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    8

    Smile Makefile:2: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.

    I am unable to write a simeple Makefile
    Though I know the concept am facing this error

    Makefile:2: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.

    so should I give a tab or spaces not able to conitue please ...............help

  2. #2
    Linux Enthusiast Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    717
    I know that makefiles are rather spicy about the tab or spaces issue. I can remember that at university times I always used single tabs and no spaces and it all was fine for me.

  3. #3
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    150
    Yes, Makefiles absolutely require a leading tab to start the action clause. It may be that you press the tab key in your editor, but it replaces that with a series of space characters. Use vi, to be sure this doesn't happen. You can view the true content of your Makefile with
    Code:
    od -t c Makefile
    If you see '\t' in all the places preceding the commands in your makefile, then you are okay. Even one leading non-tab will cause make to fail, so inspect thoroughly.
    --- rod.
    Stuff happens. Then stays happened.

  4. #4
    Linux Enthusiast Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    717
    have you ever understood why make is such pedantic on the tab / spaces issue? in the end whitespace is whitespace and it would be no real big deal to implement it?

  5. #5
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    150
    There have been numerous debates over this, and none of them involved me. The one common argument seems to be, 'If it bugs you that much, then change it, and if it catches on, everyone who uses it will be happy'. It has never bugged me that much, and I will assume that the origianl author had his reasons for doing it that way, so...

    --- rod.
    Stuff happens. Then stays happened.

  6. #6
    Just Joined!
    Join Date
    Jun 2010
    Posts
    8
    thanks for the response

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...