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 < "${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,12 @@ +#!/bin/sh + +exec sed -e '/[[:space:]]\{1,\}$/{ +i \ +### trailing whitespace ### +}' -e '/^[[:space:]]* /{ +i \ +### mixed space/tab ### +}' -e '/^[[:space:]]* \{8,\}/{ +i \ +### 8 consecutive spaces not converted to tab ### +}' "$@" Property changes on: files/validate-whitespace.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property