LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-12-2009, 10:48 AM   #1
Jayse66
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
Question gnu make separator problem with commands only


Hi,

This is my first post on these forums, usually my questions are answered before i post but not this one, so hopefully someone can shed some light on this for me.

everything on the pc has been installed from kubuntu repositories, no others, and is the current release for 9.04 with all updates applied.

Code:
jayse@mercury:~$ echo "echo \"hello.\"" > newfile
jayse@mercury:~$ cat newfile
echo "hello."
jayse@mercury:~$ make -f newfile
newfile:1: *** missing separator. Stop.

jayse@mercury:~$ nano newfile
ayse@mercury:~$ cat newfile
DUMMY="HELLO"
echo "hello."
jayse@mercury:~$ make -f newfile
newfile:2: *** missing separator. Stop.
It does that with all commands in my makefile, including ifeq statements, but blank lines and assignments are fine.

I've seen threads suggesting issues with cr/lf pairs but i think my example rules that out. i've also seen a couple of posts showing LANG to be the issue, but mine appear to be ok.

Code:
jayse@mercury:~$ make -p | grep LANG
make: *** No targets specified and no makefile found. Stop.
LANGUAGE =
LANG = en_GB.UTF-8
jayse@mercury:~$ echo $LANG
en_GB.UTF-8

You are my last hope obi-wan.


Jayse




Code:
jayse@mercury:~$ uname -a
Linux mercury 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 19:25:34 UTC 2009 x86_64 GNU/Linux

jayse@mercury:~$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
 
Old 09-12-2009, 11:08 AM   #2
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
You need a target and, most of all, you need tabs for indentation instead of spaces.
It does that for me with your code too, so it's not your make, it's your syntax.

Code:
atom@saturn /home/atom/dev $ cat dummymake
all:
echo "asdf"
atom@saturn /home/atom/dev $ cat Makefile
all:
        echo "asdf"
atom@saturn /home/atom/dev $ make -f Makefile
echo "asdf"
asdf
atom@saturn /home/atom/dev $ make -f dummymake
dummymake:2: *** missing separator.  Stop.
atom@saturn /home/atom/dev $
 
Old 09-12-2009, 11:23 AM   #3
Jayse66
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the superfast reply. I just tried the indentation and target bits and heres my results..

Code:
jayse@mercury:~$ cat dummymake
all:
echo "asdf"

jayse@mercury:~$ make -f dummymake
dummymake:2: *** missing separator. Stop.

Jayse
 
Old 09-12-2009, 11:27 AM   #4
Jayse66
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Ignore me, i boobed.

i NEED the tab. then it works as you already demonstrated.

thanks
 
Old 09-12-2009, 11:31 AM   #5
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
I'm glad you were able to resolve the issue.

And, in case you haven't noticed, there's a thanks button on the bottom right of posts of other people. If you click it, I get bragging rights .


Regards,

Gašper
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash command separator/arguments separator reverse Programming 11 12-02-2007 09:21 PM
Shell commands in GNU make MadCactus Programming 2 02-19-2004 04:36 AM
Shell commands in GNU make? MadCactus Linux - Software 0 02-17-2004 03:11 PM
make separator error robw Linux - Software 1 12-07-2003 03:08 PM
make separator error robw Linux - Newbie 0 12-06-2003 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration