scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

mkdep (275B)


      1 #!/bin/sh
      2 
      3 ed -s makefile <<EOF
      4 H
      5 /include/a
      6 `for i
      7  do
      8 	echo include $i/deps.mk
      9 done`
     10 .
     11 /OBJS/a
     12 `for i
     13  do
     14 	# Need to escape the single backlash to prevent ed
     15 	# from interperting it as escaping the newline
     16 	printf '\t$(%sOBJS)\\\\\\n' $(echo $i | tr a-z A-Z)
     17 done`
     18 .
     19 w
     20 EOF