Google Answers Logo
View Question
 
Q: multiple mutually exclusive conditionals in make - C programming ( No Answer,   0 Comments )
Question  
Subject: multiple mutually exclusive conditionals in make - C programming
Category: Computers > Programming
Asked by: martinsz-ga
List Price: $10.00
Posted: 21 Feb 2005 15:45 PST
Expires: 23 Mar 2005 15:45 PST
Question ID: 478347
How does one do an

if (foo)
  yo
elseif (bar)
  ho
else
  hoe
end

construct in make?  A "case" construct would be even better.  I have
read some docs, and the answer is not immediately forthcoming;  I can
only see how to do a simple two-branch if-else conditional.

Request for Question Clarification by efn-ga on 21 Feb 2005 16:54 PST
The syntax of makefiles is not standardized.  What make program are you using?

Request for Question Clarification by maniac-ga on 21 Feb 2005 17:59 PST
Hello martinsz,

As noted previously, the Makefile syntax varies by make application.
GNU make tends to be most expressive but if the build must be done on
a variety of systems, other solutions may be better. A few
alternatives you may want to consider include:
 - using a shell script and/or application to set the conditions for
your (e.g., by environment variables)
 - using a broader configuration program such as automake or configure
It may be better if you describe the "real problem" you are trying to
solve more fully. Other solutions may be appropriate depending on the
real problem.

  --Maniac
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy