LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-29-2008, 02:05 PM   #1
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Why makefile doesn't accept plain spaces instead of tabulation


Hello,

I use make since many years now and it's a great tool for sure, but I can't understand why there's still a need for tabulation instead of simple spaces for command lines! If anybody know the reason I'll be happy if it can share it!

Cheers.
 
Old 10-29-2008, 02:32 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,333

Rep: Reputation: 6027Reputation: 6027Reputation: 6027Reputation: 6027Reputation: 6027Reputation: 6027Reputation: 6027Reputation: 6027Reputation: 6027Reputation: 6027Reputation: 6027
Quote:
Originally Posted by jf.argentino View Post
Hello,

I use make since many years now and it's a great tool for sure, but I can't understand why there's still a need for tabulation instead of simple spaces for command lines! If anybody know the reason I'll be happy if it can share it!

Cheers.
It's a way of delimiting commands versus other statements in a makefile. Commands in a makefile start with a tab, so

Code:
foobar: foobar.o
      gcc -c foobar.c
Says that in order to make the foobar (name, before the : ), foobar.o is used (spaces are used to delimit objects, since multiple objects can be used for one program). The next line that starts with a tab is the command that's run to produce the object(s), (gcc -c foobar.c).
 
  


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
Makefile issue: "Makefile.src: File not found" m3rkury Linux - Software 1 02-22-2007 11:15 PM
automake, makefile, makefile.in and makefile.am Fond_of_Opensource Linux - Newbie 1 09-12-2006 09:35 PM
what is the meaning of Makefile,Makefile.am,Makefile.in cynthia_thomas Linux - General 3 12-08-2005 06:00 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 04:57 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 01:23 PM

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

All times are GMT -5. The time now is 11:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration