[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automake patch to not assume egrep or fgrep
From: |
Paul Eggert |
Subject: |
Re: Automake patch to not assume egrep or fgrep |
Date: |
Thu, 30 May 2002 01:17:18 -0700 (PDT) |
> From: Alexandre Duret-Lutz <address@hidden>
> Date: Thu, 30 May 2002 09:57:44 +0200
> >> - @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; \
> >> + @if sed 15q $(srcdir)/NEWS | grep -F -e "$(VERSION)" >/dev/null; \
> Ralf> Hard-coded grep -F .
>
> I think only this one really matters. (The two others are in
> `maintainer-check' where portability is not important.)
I thought that this "distdir" action is only used by package
maintainers as well, as it uses other syntax like "cp -pR" and "chmod
a+r" that is not portable to arbitrarily ancient hosts. Hmm, but I
suppose those actions do work on Solaris 8, whereas "grep -E" doesn't,
so maybe this is worth fixing.
> What about escaping $(VERSION) using sed before passing it to grep?
Why not use shell pattern matching? It's simpler. Something like
this, perhaps?
*** lib/am/distdir.am Wed May 29 22:20:33 2002
--- /tmp/distdir.am Thu May 30 01:14:24 2002
***************
*** 42,52 ****
##
if %?TOPDIR_P%
if %?CK-NEWS%
! @if sed 15q $(srcdir)/NEWS | grep -F -e "$(VERSION)" >/dev/null; \
! then :; else \
echo "NEWS not updated; not releasing" 1>&2; \
! exit 1; \
! fi
endif %?CK-NEWS%
endif %?TOPDIR_P%
##
--- 42,53 ----
##
if %?TOPDIR_P%
if %?CK-NEWS%
! @case `sed 15q $(srcdir)/NEWS` in \
! *"$(VERSION)"*) : ;; \
! *) \
echo "NEWS not updated; not releasing" 1>&2; \
! exit 1;; \
! esac
endif %?CK-NEWS%
endif %?TOPDIR_P%
##