make - Support: sr #104353, Variables that must be defined
You are not allowed to post comments on this tracker with your current authentication level.
sr #104353: Variables that must be defined
Submitter: | None | ||
Submitted: | Thu 23 Jun 2005 07:23:38 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Severity: | 3 - Normal | Status: | None |
Privacy: | Public | Assigned to: | None |
Originator Email: | -email is unavailable- | Open/Closed: | Open |
Operating System: | None |
Sun 12 Mar 2006 01:57:08 PM UTC, comment #3: |
Alon Blayer-Gat <alonbg> |
Wed 08 Feb 2006 05:41:46 PM UTC, comment #2: I think you could make it slightly tidier, but the definition here seems to me to be the right way to go... but you need to decide whether you want to fail if a variable is empty, or only if it's not defined at all. The previous example shows how to check if it's defined at all; this one assumes an empty variable is still an error:
|
Paul D. Smith <psmith>![]() |
Tue 02 Aug 2005 12:42:11 AM UTC, comment #1: You may as well write:
|
Alon Blayer-Gat <alonbg> |
Thu 23 Jun 2005 07:23:38 PM UTC, original submission:
GNU Make currently has very little inherent support for debugging makefiles. One simple change could help a lot: adding a new type of variable reference that requires that the variable be defined. If the variable were not defined, make would stop with an informative error message. For example, if the syntax of a required reference were $(!varname), then one could write:
|
Anonymous |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
It seems a global behaviour is preferable. I think a make option which warns and possibly exists on undefined or empty variables is a better choice.
It lets you descover issues you didn't think about in the first place and may give a strict coding convention for users.
And you don't have the drag of treating parameters selectivly (also keeps the code cleaner).