bug-gnulib
[Top][All Lists]
Advanced

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

Re: string.h uses restrict


From: Jim Meyering
Subject: Re: string.h uses restrict
Date: Wed, 15 Apr 2009 20:20:06 +0200

Hi Simon,

Simon Josefsson wrote:
> Jim Meyering <address@hidden> writes:
...
>> I'm using coreutils' maint.mk in 3 or 4 other projects,
>> nearly verbatim.  As such, I'm reluctant to remove rules, since
>> that would mean migrating them out to each cfg.mk, which is maintained
>> separately, and thus harder to keep in sync.  Besides, unwanted rules
>> are easy to disable.
>
> I don't follow -- if you maintain your copies of maint.mk which are
> similar but not identical in some way today, can't you use the same
> strategy for cfg.mk?

Sure I *could*.
But I want to have less manual maintenance work, not more.
If I find a rule useful in 3 projects, yet it must reside in cfg.mk
(which has less shared code) then it's more work (riskier) to
propagate changes as the rules evolve.

I could always start a new file with just those rules, but
that's more work, too.  I'd prefer to keep them all in maint.mk.

> However, ideally I think all of what's in coreutils maint.mk should go
> into gnulib maint.mk.  So the stuff you need to maintain in cfg.mk will
> be minimal and project-specific.  If it isn't project specific, it is
> something that should go into gnulib's maint.mk.

Some(most?) of the things in coreutils' maint.mk represent my personal
policies.  I don't expect everyone to have exactly the same views,
or the time/energy to make their code conform right away, so there's
a mechanism for disabling selected rules.
FYI, it's a variable called local-checks-to-skip,
and it would normally be set in cfg.mk.

Looking at what's in coreutils now, I see this:

    local-checks-to-skip = changelog-check strftime-check

    local-checks-to-skip += patch-check

strftime-check is already in cfg.mk, but the other two need to go:

  - changelog-check is no longer relevant to coreutils at all,
  since ChangeLog files are long gone.

  - patch-check is not relevant, since I no longer maintain the
  c99-to-c89 patch.  So i'm about to remove that rule from maint.mk.
  Besides, that one is definitely too coreutils-centric.

So I'll apply something like this (in coreutils) shortly:

>From a46c077467e8b9eac3b875ac0ebab8ff9e713d24 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 15 Apr 2009 20:18:24 +0200
Subject: [PATCH] maint: clean up skipped syntax-check rules

* cfg.mk (local-checks-to-skip): Remove patch-check and changelog-check.
* maint.mk (patch-check): Remove rule.
(local-checks-available): Remove patch-check.
(changelog-check): Remove rule.
---
 cfg.mk   |    7 +------
 maint.mk |   38 +-------------------------------------
 2 files changed, 2 insertions(+), 43 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 7f4cdd2..b356e1a 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -31,12 +31,7 @@ url_dir_list = \
 gpg_key_ID = B9AB9A16

 # Tests not to run as part of "make distcheck".
-# Exclude changelog-check here so that there's less churn in ChangeLog
-# files -- otherwise, you'd need to have the upcoming version number
-# at the top of the file for each `make distcheck' run.
-local-checks-to-skip = changelog-check strftime-check
-
-local-checks-to-skip += patch-check
+local-checks-to-skip = strftime-check

 # The local directory containing the checked-out copy of gnulib used in this
 # release.  Used solely to get gnulib's SHA1 for the "announcement" target.
diff --git a/maint.mk b/maint.mk
index 1e6b13f..8777a99 100644
--- a/maint.mk
+++ b/maint.mk
@@ -72,7 +72,7 @@ syntax-check-rules := $(shell sed -n 
's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
 .PHONY: $(syntax-check-rules)

 local-checks-available = \
-  patch-check $(syntax-check-rules) \
+  $(syntax-check-rules) \
   makefile-check check-AUTHORS
 .PHONY: $(local-checks-available)

@@ -483,33 +483,6 @@ update-NEWS-hash: NEWS
        perl -pi -e 's/^(old_NEWS_hash = ).*/$${1}'"$(NEWS_hash)/" \
          $(srcdir)/cfg.mk

-epoch_date = 1970-01-01 00:00:00.000000000 +0000
-ALL_RECURSIVE_TARGETS += patch-check
-# Ensure that the c99-to-c89 patch applies cleanly.
-patch-check:
-       rm -rf src-c89 address@hidden address@hidden
-       cp -a $(srcdir)/src src-c89
-       if test "x$(srcdir)" != x.; then \
-         cp -a src/* src-c89; \
-         dotfiles=`ls src/.[!.]* 2>/dev/null`; \
-         test -z "$$dotfiles" || cp -a src/.[!.]* src-c89; \
-       fi
-       (cd src-c89; patch -p1 -V never --fuzz=0) < 
$(srcdir)/src/c99-to-c89.diff \
-         > address@hidden 2>&1
-       if test "$(REGEN_PATCH)" = yes; then                    \
-         diff -upr $(srcdir)/src src-c89 | sed 's,$(srcdir)/src-c89/,src/,'    
\
-           | grep -vE '^(Only in|File )'                       \
-           | perl -pe 's/^((?:\+\+\+|---) \S+\t).*/$${1}$(epoch_date)/;' \
-              -e 's/^ $$//'                                    \
-           > new-diff || : ; fi
-       grep -v '^patching file ' address@hidden > address@hidden || :
-       msg=ok; test -s address@hidden && msg='fuzzy patch' || : ;      \
-       rm -f src-c89/*.o || msg='rm failed';                   \
-       $(MAKE) -C src-c89 CFLAGS='-Wdeclaration-after-statement -Werror' \
-         || msg='compile failure with extra options';          \
-       test "$$msg" = ok && rm -rf src-c89 address@hidden address@hidden || 
echo "$$msg" 1>&2; \
-       test "$$msg" = ok
-
 ALL_RECURSIVE_TARGETS += check-AUTHORS
 check-AUTHORS:
        $(MAKE) -C src $@
@@ -535,15 +508,6 @@ news-date-check: NEWS
          exit 1;                                                       \
        fi

-changelog-check:
-       if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$'        \
-           >/dev/null; then                                            \
-         :;                                                            \
-       else                                                            \
-         echo "$(VERSION) not in ChangeLog" 1>&2;                      \
-         exit 1;                                                       \
-       fi
-
 sc_makefile_TAB_only_indentation:
        @grep -nE '^    [ ]{8}'                                         \
            $$($(VC_LIST_EXCEPT) | grep -E 'akefile|\.mk$$')            \
--
1.6.3.rc0.154.g06890




reply via email to

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