Index: Makefile =================================================================== --- Makefile (revision 315439) +++ Makefile (working copy) @@ -80,15 +80,15 @@ else \ return 1; \ fi - @${ECHO_MSG} Checking for space/tab... - @unexpand "${VUXML_FILE}" | ${SED} -E 's,[[:space:]]*$$,,g' > "${VUXML_FILE}.unexpanded" - @if ${DIFF} -u "${VUXML_FILE}" "${VUXML_FILE}.unexpanded"; \ + @${ECHO_MSG} Checking for whitespace inconsistencies... + @${SH} ${FILESDIR}/validate-whitespace.sh ${SED} < "${VUXML_FILE}" > "${VUXML_FILE}.whitespace" + @if ${DIFF} -u "${VUXML_FILE}" "${VUXML_FILE}.whitespace"; \ then \ ${ECHO_MSG} ... seems okay; \ - ${RM} "${VUXML_FILE}.unexpanded"; \ + ${RM} "${VUXML_FILE}.whitespace"; \ else \ ${ECHO_MSG} ... see above; \ - ${ECHO_CMD} Consider using ${VUXML_FILE}.unexpanded for final commit; \ + ${ECHO_CMD} Consider fixing ${VUXML_FILE}.whitespace and using it for final commit; \ return 1; \ fi Index: files/validate-whitespace.sh =================================================================== --- files/validate-whitespace.sh (revision 0) +++ files/validate-whitespace.sh (working copy) @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Arguments are sed command and its flags. + +exec "$@" -e '/[[:space:]]\{1,\}$/{ +p +i \ +^--- FIXME: trailing whitespace +d +}' -e '/^[[:space:]]* /{ +p +i \ +^--- FIXME: mixed space/tab +d +}' -e '/^[[:space:]]* \{8,\}/{ +p +i \ +^--- FIXME: 8 consecutive spaces not converted to tab +d +}' Property changes on: files/validate-whitespace.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property