[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] make check: avoid an error when no .git dir present.
From: |
Jim Meyering |
Subject: |
Re: [PATCH] make check: avoid an error when no .git dir present. |
Date: |
Mon, 26 Apr 2010 09:33:50 +0200 |
Ian Beckwith wrote:
> Attached is a trivial patch to the top-level Makefile
> to stop 'make check' generating an error when there is
> no .git directory present (which will happen with the
> stable snapshot tarball).
>
> I've already applied this patch in the just-released stable snapshot.
Thanks.
I've pushed the following in your name, even though I adjusted it
to work more portably when .git/ does not exist. Some shells
would make your failing "if" test cause "make check" to fail.
>From 3552ea714b8a640d547de5783b394f08be252ae0 Mon Sep 17 00:00:00 2001
From: Ian Beckwith <address@hidden>
Date: Mon, 26 Apr 2010 09:26:35 +0200
Subject: [PATCH] build: avoid "make check" failure without .git/ directory
* Makefile (sc_prefer_ac_check_funcs_once): Skip this test when
there is no .git/ directory.
---
ChangeLog | 6 ++++++
Makefile | 8 +++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9208e2f..8d6acc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-24 Ian Beckwith <address@hidden>
+
+ build: avoid "make check" failure without .git/ directory
+ * Makefile (sc_prefer_ac_check_funcs_once): Skip this test when
+ there is no .git/ directory.
+
2010-04-25 Bruno Haible <address@hidden>
ptsname: Fix misuse of ttyname_r.
diff --git a/Makefile b/Makefile
index d2878d6..0596ba6 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,11 @@ info html dvi pdf:
check: sc_prefer_ac_check_funcs_once
sc_prefer_ac_check_funcs_once:
- git grep -w -l AC_CHECK_FUNCS modules && \
- { echo use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/ 1>&2; \
- exit 1; } || :
+ if test -d .git; then \
+ git grep -w -l AC_CHECK_FUNCS modules
\
+ && { echo use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS \
+ in modules/ 1>&2; exit 1; } || : \
+ else :; fi
# Regenerate some files that are stored in the repository.
regen: MODULES.html
--
1.7.1.rc2.340.g38e7f