LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] ksh question

[ILUG] ksh question

Darragh Bailey felix at compsoc.nuigalway.ie
Fri May 9 11:01:47 IST 2008


On Thu, May 08, 2008 at 03:38:00PM +0200, Brian Foster wrote:
>   | Date: Thu, 8 May 2008 14:11:26 +0100
>   | From: "Braun Brelin" <bbrelin at gmail.com>
>   | Someone sent me the following lines in a Makefile:
>   | 
>   | XML_RULE = @echo " xml-rule $< xml2hpp.xsl $@" && \
>   | $(JAVA_BIN) -cp $(XT_DIR)/xp.jar:$(XT_DIR)/xt.jar \
>   | com.jclark.xsl.sax.Driver \
>   | $< $(CMKCMK)/xml2hpp.xsl $@
>   | 
>   | They wanted to know what the "$<" and "$@" symbols mean.
>   |[ ... ]
>   | Anyone else know what $< is in KSH?
> 
>  AFAICR, there is $< in ksh(1).
> 
>  ‘make’ has truely awful syntax, and the semantics
>  can be rather daunting at times as well.

"info make" and look at the quick reference is an easy way to checkup
what any of the syntax in make does.

keep in mind that $< resolves in fact to the "first" dependency of the
rule it is used under. That might not have been clear from the example
sent previously.

A clearer example would be

monday: tuesday wednesday
		@echo $< $@

'make monday' would print
tuesday monday

ignoring wednesday

-- 
Darragh

"Nothing is foolproof to a sufficiently talented fool."



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell