1 # Turn Makefile target and variable assignments into shell variable
3 # * For targets, define the variable `target_NAME' to "explicit".
4 # * For variables whose names are uppercase, perform the actual assignment.
5 # We only do this for all-upper variables to avoid conflict with variables
7 # * For other variables, define `var_NAME' to "explicit". Such variables
8 # can only be used as flags; any use of their values must be done
9 # later, in the generated Makefile.
12 /^ *\([a-zA-Z_.][-a-zA-Z0-9_.]*\):.*/{
13 s//target_\1=explicit/
17 s/^ *\([A-Z][A-Z0-9_]*\)[ ]*=[ ]*\(.*\)/\1='\2'/p
18 s/^ *\([A-Za-z][A-Za-z0-9_]*\)[ ]*=[ ]*\(.*\)/var_\1=explicit/p