You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
mkimage-profiles-kometa/bin/check-recipe

14 lines
510 B

#!/bin/sh
# missing "; @:" for recipeless rules makes SHELL payload useless
# (see also ../lib/report.mk); this results in broken target graphs
# (so REPORT=1 gets crippled)
sed 's/^[a-z]\+\/.*:.*$/\n&/' "$@" \
| grep -vE '^(#|export|if|else|endif|define|endef)' \
| sed ':loop /^[^#].*[^\\]\\$/N; s/\\\n//; t loop' \
| grep -vE ':=| = | ?= | += |^\$' \
| sed ':loop /^[a-z]\+\/.*:.*$/N; s/\n\t\+@*/\; /; t loop' \
| grep -vE ';|^$' && exit 1 ||:
# see also http://unix.stackexchange.com/questions/228547