[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint: use a wildcard to include all syntax check exceptions
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] maint: use a wildcard to include all syntax check exceptions in dist |
Date: |
Mon, 8 Jun 2009 09:38:36 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Jim Meyering wrote:
> Pádraig Brady wrote:
>> I noticed a couple of syntax check exception files
>> missing from the distribution tarball. Specifically
>> .x-sc_require_config_h_first and .x-sc_error_message_uppercase
>>
>> The attached patch changes things so we don't have to
>> maintain the list.
>
> Good catch.
> I've suspected there were a few like that, but
> didn't really care, since it's not very useful to run
> "make syntax-check" from an unpacked-tarball directory.
>
> However, using a wildcard there would violate a pretty important rule:
>
> - don't distribute wildcard-selected file names
>
> Otherwise, you can accidentally distribute .x-sc_foo~,
> or .x-sc_some-experimental-or-rejected-change
>
> I haven't looked closely enough to say yet, but
> consider two alternatives:
>
> - stop distributing those .x-sc_ files altogether, or
>
> - add a check to ensure that all version-controlled
> .x-sc_ names are in that list
Attached is a new syntax-check rule to ensure the list for
distribution stays in sync with the repository.
cheers,
Pádraig.
>From bc3bd51ca902ba18c887e6eb35e68b526746d0d2 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
Date: Mon, 8 Jun 2009 08:42:00 +0100
Subject: [PATCH] maint: Add a syntax-check to ensure all .x-sc_ files are
distributed
* Makefile.am: Add a couple of missing entries to
syntax_check_exceptions for distribution.
* cfg.mk: Add a rule to ensure the syntax_check_exceptions variable
stays in sync with the .x-sc_* files in the repository.
---
Makefile.am | 2 ++
cfg.mk | 11 +++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 7670cd6..97be46a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,7 @@ changelog_etc = \
syntax_check_exceptions = \
.x-sc_GPL_version \
+ .x-sc_error_message_uppercase \
.x-sc_file_system \
.x-sc_obsolete_symbols \
.x-sc_po_check \
@@ -48,6 +49,7 @@ syntax_check_exceptions = \
.x-sc_prohibit_stat_st_blocks \
.x-sc_prohibit_strcmp \
.x-sc_require_config_h \
+ .x-sc_require_config_h_first \
.x-sc_space_tab \
.x-sc_sun_os_names \
.x-sc_trailing_blank \
diff --git a/cfg.mk b/cfg.mk
index 393d4cb..5ad76b7 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -99,6 +99,17 @@ sc_root_tests:
exit 1; } || :; \
fi
+sc_x_sc_dist_check:
+ @sce=syntax_check_exceptions; \
+ test "$$(($(VC_LIST) | sed -n '/^.x-sc_/p'; \
+ sed -n "/^$$sce =[ ]*\\\\$$/,/[^\]$$/p" \
+ $(srcdir)/Makefile.am \
+ | sed "s/^ *//;/^$$sce =/d" \
+ | tr -s '\012\\' ' ' | fmt -1 \
+ ) | sort | uniq -u)" \
+ && { echo "Makefile.am: $$sce mismatch" >&2; exit 1; } \
+ || :;
+
headers_with_interesting_macro_defs = \
exit.h \
fcntl_.h \
--
1.5.3.6