*** empty log message ***
[automake.git] / hack-make.sed
blob4de5ebbca1a76763d412c144e6c042484c493e12
1 # Turn Makefile target and variable assignments into shell variable
2 # assignments:
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
6 #   used in automake.
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.
10 s/(/{/g
11 s/)/}/g
12 /^ *\([a-zA-Z_.][-a-zA-Z0-9_.]*\):.*/{
13 s//target_\1=explicit/
14 s/[.-]/_/g
17 s/^ *\([A-Z][A-Z0-9_]*\)[        ]*=[    ]*\(.*\)/\1='\2'/p
18 s/^ *\([A-Za-z][A-Za-z0-9_]*\)[         ]*=[    ]*\(.*\)/var_\1=explicit/p