URL: <http://savannah.gnu.org/bugs/?35063>
Summary: Suggest conventional $(%XX) syntax for special characters Project: make Submitted by: boyski Submitted on: Wed 14 Dec 2011 02:27:53 AM GMT Severity: 3 - Normal Item Group: Enhancement Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: CVS Operating System: Any Fixed Release: None Triage Status: None _______________________________________________________ Details: This idea seems too obvious to not have been brought up before but I haven't seen it and it seems both helpful and easy to implement so here goes. There's a lot of clever trickery around for inserting special characters in make syntax, e.g. the famous _empty := _space := $(_empty) $(_empty) So why not support a special syntax for "predefined" variables which uses URL encoding? With this feature, a space would be $(%20) and a backslash $(%5C), etc. The "." namespace is already reserved for internal variables, e.g. $(.DEFAULT_GOAL), so the same could be done for the "%" namespace with a low likelihood of breaking anything. Or, to be perfectly safe, it could be placed in the "." namespace as in $(.%20). Just to be clear, what I'm suggesting here would be a simple token replacement which requires no actual use of the symbol table. Whenever the sequence "$(%XX)" is encountered while doing variable evaluation it's replaced by its character equivalent. The primary use would be for single characters but I see no reason url-encoded strings couldn't be allowed. As long as the variable string starts with % (or .%), the whole thing is replaced by its url-decoded equivalent. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?35063> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make