LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2009, 12:45 AM   #1
sahil.jammu
Member
 
Registered: Jun 2008
Distribution: Ubuntu
Posts: 83

Rep: Reputation: 15
Multifile Rule definition in Makefile


Hi All

I am not very clear with this definition. its defined in rules.mk and my makefile is internally calling this.
Can any1 please help out in elaborating more on this definition part, i have some understanding but want some more clarity.


# Multi-to-multi-file command
# $1 = tagfile
# $2 = target files
# $3 = source files
# $4 = prerequisites
# $5 = command
# $6 = message (optional)
#------------------------------------------------------------------------------
MSG.multi_cmd = $(if $6,$6,"MULTI-CMD $1")
define CMD.multi_cmd
trap '$(RM) $1 $2' ERR SIGINT SIGTERM ;\
$(RM) $1 $2 && \
( $5 ) && \
$(TOUCH) $1
endef

define MultiFileRule
$(call TimeStamp,$2,$1) \
$(call CreateRule,$1,$3,$4,$(if $5,$(call WRAP,.multi_cmd,$1,$2,$3,$4,$5,$6)))
endef



Regards
Sahil
 
Old 08-29-2010, 08:45 AM   #2
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Check out the following link w.r.t Makefile rules and see if it helps !
http://www.gnu.org/software/make/manual/make.html#Rules
 
  


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
Error in Makefile:No rule to make target `g++',needed by... stop karthik.c Programming 5 03-09-2009 01:55 AM
Is this makefile rule possible? markelo Programming 1 01-31-2007 09:26 AM
duplicated definition for a target in Makefile George2 Programming 2 05-07-2006 05:01 AM
What is wrong with this simple rule in makefile? George2 Programming 6 05-03-2006 02:53 AM
Rule.mk and make.mk for makefile evenglist2005 Programming 1 09-21-2005 04:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:31 AM.

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