Mercurial > ~dholland > hg > ag > index.cgi
comparison lint/source-rules.sh @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 #!/bin/sh | |
2 # source-rules.sh - generate source-list make rules for lint dir | |
3 # usage: source-rules.sh > rules.mk | |
4 | |
5 if [ $# != 0 ]; then | |
6 echo "$0: usage: $0" 1>&2 | |
7 exit 1 | |
8 fi | |
9 | |
10 ( | |
11 echo tool -t | |
12 echo main -m | |
13 echo example -x | |
14 ) | awk ' | |
15 { | |
16 s = $1 ".srcs"; | |
17 t = $1 ".tmp"; | |
18 printf "%s: always\n", s; | |
19 printf "\t@$(TOP)/lint/get-sources.sh %s $(TOP) > %s\n", $2, t; | |
20 printf "\t@if diff %s %s >/dev/null 2>&1; then \\\n", s, t; | |
21 printf "\t rm -f %s;\\\n", t; | |
22 printf "\t else\\\n"; | |
23 printf "\t mv -f %s %s;\\\n", t, s; | |
24 printf "\t fi\n"; | |
25 printf "\n"; | |
26 } | |
27 ' |