summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/varmodifiers.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correct $OpenBSD$ stuffespie2010-07-191-2/+1
|
* two small changes:espie2010-07-191-1/+1
| | | | | | | | | | | - allow variables in SysV modifiers, as requested by matthieu@ (since recursive variables are an extension, this just extends the extension) - variation on :Q called :QL (quote list), which does quote every character EXCEPT for whitespace. e.g., toto: @for i in ${VAR:QL} ...
* kill extra spaces at end of lineespie2007-09-171-4/+4
|
* remove dead code: #define RECHECK is always onespie2007-09-161-1/+1
|
* everywhere except in Var_Parse, we always add/append variables to theespie2007-07-301-1/+1
| | | | | | | | VAR_GLOBAL context, so make it the common case: rename the basic functions to Var_Set_with_ctxt/Var_Append_with_ctxt, define Var_Set and Var_Append as macros that specify VAR_GLOBAL, and use these. okay miod@
* simplify computations in the var module: instead of advancing a char *espie2007-07-241-4/+4
| | | | | | | | | | and keeping track of a length, we just advance the char *, and ditch the length. We can still get the length at the end of the top-level functions to satisfy existing interfaces. Much simpler code, less error-prone. Okay millert@
* move the code that grabs a value in Var_Parse in its own function,espie2007-07-241-1/+1
| | | | | | | | | get_expanded_value. Extend the code a bit to be much more thorough in case of a recursive expansion: shows exactly the cycle of variable names involved. okay millert@
* change Var_ParseSkip API to increment the position instead of returning aespie2007-07-241-1/+1
| | | | | | | | length, simplifies code. (warns a bit, symptom of some further issues to fix). okay millert@
* big clean-up patch:espie2007-07-201-3/+3
| | | | | | | | | | | | - rename a few functions in var.c to names that make more sense. - introduce Var_Deletei because it makes more sense. - rewrite .for loops to use a local LoopVar construct to avoid looking up more stuff. - reformat var.c to near K&R - rewrite most comments in var.c shown to a few people. millert@ gave me his okay since it passes through ports correctly.
* Mostly clean-up:espie2001-05-231-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - cut up those huge include files into separate interfaces for all modules. Put the interface documentation there, and not with the implementation. - light-weight includes for needed concrete types (lst_t.h, timestamp_t.h). - cut out some more logically separate parts: cmd_exec, varname, parsevar, timestamp. - put all error handling functions together, so that we will be able to clean them up. - more systematic naming: functioni to handle interval, function to handle string. - put the init/end code apart to minimize coupling. - kill weird types like ReturnStatus and Boolean. Use standard bool (with a fallback for non-iso systems) - better interface documentation for lots of subsystems. As a result, make compilation goes somewhat faster (5%, even considering the largish BSD copyrights to read). The corresponding preprocessed source goes down from 1,5M to 1M. A few minor code changes as well: Parse_DoVar is no longer destructive. Parse_IsVar functionality is folded into Parse_DoVar (as it knows what an assignment is), a few more interval handling functions. Avoid calling XXX_End when they do nothing, just #define XXX_End to nothing. Parse_DoVar is slightly more general: it will handle compound assignments as long as they make sense, e.g., VAR +!= cmd will work. As a side effect, VAR++=value now triggers an error (two + in assignment). - this stuff doesn't occur in portable Makefiles. - writing VAR++ = value or VAR+ +=value disambiguates it. - this is a good thing, it uncovered a bug in bsd.port.mk. Tested by naddy@. Okayed millert@. I'll handle the fallback if there is any. This went through a full make build anyways, including isakmpd (without mickey's custom binutils, as he didn't see fit to share it with me).
* Synch with my current work.espie2001-05-031-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Numerous changes: - generate can build several tables - style cleanup - statistics code - use variable names throughout (struct Name) - recursive variables everywhere - faster parser (pass buffer along instead of allocating multiple copies) - correct parser. Handles comments everywhere, and ; correctly - more string intervals - simplified dir.c, less recursion. - extended for loops - sinclude() - finished removing extra junk from Lst_* - handles ${@D} and friends in a simpler way - cleaned up and modular VarModifiers handling. - recognizes some gnu Makefile usages and errors out about them. Additionally, some extra functionality is defined by FEATURES. The set of functionalities is currently hardcoded to OpenBSD defaults, but this may include support for some NetBSD extensions, like ODE modifiers. Backed by miod@ and millert@, who finally got sick of my endless patches...
* Major unobfuscation: split var modifiers handling to a separate file.espie2000-07-171-0/+35
This does finally make var handling somewhat readable.