help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about :: sign and % sign problems


From: John Graham-Cumming
Subject: Re: about :: sign and % sign problems
Date: Wed, 26 Apr 2006 14:52:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

Lin George wrote:
What means "::" (I read related parts from GNU make and still confused)? What is the difference between "::" and ":"?

I doubt that I can do much better than the explanation in the GNU Make manual. The reality is that :: rules are very rarely used or needed in Makefiles, you probably don't need to use anything other than normal : rules.

Essentially, :: rules allow the same target to be built in different ways by different rules. With : rules there's one rule per target. :: are only used in very odd and special cases.

Another question, ";" means do nothing, why sometimes we still add some commands after ;? (I mean, if do nothing, we should not add any commands after ";").

No, ; doesn't mean do nothing. ; means after this semicolon are commands that should be executed for this rule. If there are no commands then there are no commands to execute.

John.
--
John Graham-Cumming
address@hidden

Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/

POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/

Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]