Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-19-2009, 11:45 PM   #1
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 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

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

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

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Check out the following link w.r.t Makefile rules and see if it helps !


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 12:55 AM
Is this makefile rule possible? markelo Programming 1 01-31-2007 08:26 AM
duplicated definition for a target in Makefile George2 Programming 2 05-07-2006 04:01 AM
What is wrong with this simple rule in makefile? George2 Programming 6 05-03-2006 01:53 AM and for makefile evenglist2005 Programming 1 09-21-2005 03:39 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:02 AM.

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