I've pushed this -- I noticed I had some backup files in version control in more than one project, and adding a syntax-check to catch similar problems globally seemed useful to me.
/Simon --- ChangeLog | 5 +++++ top/maint.mk | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 64948d7..3f7a726 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-22 Simon Josefsson <[email protected]> + + * top/maint.mk (sc_prohibit_backup_files): Prohibit checked in + backup files. + 2010-04-21 Simon Josefsson <[email protected]> * tests/test-vasprintf.c: Test %08lx. diff --git a/top/maint.mk b/top/maint.mk index f646e43..33803f3 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -645,6 +645,12 @@ sc_useless_cpp_parens: halt='found useless parentheses in cpp directive' \ $(_sc_search_regexp) +# Prohibit checked in backup files. +sc_prohibit_backup_files: + @$(VC_LIST) | grep '~$$' && \ + { echo '$(ME): found version controlled backup file' 1>&2; \ + exit 1; } || : + # Require the latest GPL. sc_GPL_version: @prohibit='either ''version [^3]' \ -- 1.7.0.5
