Mercurial > ~dholland > hg > ag > index.cgi
view lint/source-rules.sh @ 8:ec2b657edf13
Add explicit lint-comment-style fallthrough annotations.
GCC now assumes that if you don't have these you're making a mistake,
which is annoying.
XXX: This changeset updates the AG output files only (by hand) and is
XXX: abusive - rebuilding them will erase the change. However, I need
XXX: to get things to build before I can try to get AG to issue the
XXX: annotations itself, so this seems like a reasonable expedient.
author | David A. Holland |
---|---|
date | Mon, 30 May 2022 23:51:43 -0400 |
parents | 13d2b8934445 |
children |
line wrap: on
line source
#!/bin/sh # source-rules.sh - generate source-list make rules for lint dir # usage: source-rules.sh > rules.mk if [ $# != 0 ]; then echo "$0: usage: $0" 1>&2 exit 1 fi ( echo tool -t echo main -m echo example -x ) | awk ' { s = $1 ".srcs"; t = $1 ".tmp"; printf "%s: always\n", s; printf "\t@$(TOP)/lint/get-sources.sh %s $(TOP) > %s\n", $2, t; printf "\t@if diff %s %s >/dev/null 2>&1; then \\\n", s, t; printf "\t rm -f %s;\\\n", t; printf "\t else\\\n"; printf "\t mv -f %s %s;\\\n", t, s; printf "\t fi\n"; printf "\n"; } '