The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 07-06-2009
firetree firetree is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 4
3ks for your replies.
I'm using GNU make, under mac os x
here is the whole codes:

Code:
define parent
	echo "parent has two parameters: $1, $2"
	$(call child,$1)
endef

define child
	echo "child has one parameter: $1"
 	ifndef $2
		echo "but child can also see parent's second parameter: $2!"
	else
		echo "and child cannot see parent's second parameter !"
	endif
endef

scoping_issue:
	@$(call parent,one, two)


Last edited by otheus; 07-06-2009 at 02:53 AM.. Reason: add code tags