Link to home
Start Free TrialLog in
Avatar of sctccomm
sctccomm

asked on

Variable expansion in makefiles question

Hi,

For the following command in Makefile, I want to find out when the variables and the call function are expanded:

  ifdef someDEF
      $(call someFUNC, $(someVAR))
  else
      $(call anotherFUNC)
  endif

I have read that " all instances of conditional syntax are parsed immediately at the point it was read (before execute specified targets) ".  So the call function expands immediately?
But I have also read that:
  define someDEF
      someFUNC
  endef
someDEF will expand immediately, but someFUNC in this case will not expand until someDEF is referenced.  So when does the call function expand?

Thank you in advance,
Jessica

ASKER CERTIFIED SOLUTION
Avatar of Jose Parrot
Jose Parrot
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial