bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] top/maint.mk (sc_prohibit_backup_files): Prohibit checked in bac


From: Simon Josefsson
Subject: [PATCH] top/maint.mk (sc_prohibit_backup_files): Prohibit checked in backup files.
Date: Thu, 22 Apr 2010 11:06:25 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

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  <address@hidden>
+
+       * top/maint.mk (sc_prohibit_backup_files): Prohibit checked in
+       backup files.
+
 2010-04-21  Simon Josefsson  <address@hidden>
 
        * 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]