guix-commits
[Top][All Lists]
Advanced

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

04/04: Makefile.am: Only auto-configure Git when available.


From: guix-commits
Subject: 04/04: Makefile.am: Only auto-configure Git when available.
Date: Sat, 6 May 2023 23:28:56 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit ed0f0204b2c901be006a8441ea4d392a89aba77e
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu May 4 09:45:57 2023 -0400

    Makefile.am: Only auto-configure Git when available.
    
    * Makefile.am (.git/hooks/pre-push): Only run recipe if the '.git' directory
    exists.  Make it silent.
    (.git/config): Likewise, and also check if the 'git' command is available.
    
    Reported-by: Brian Cully <bjc@spork.org>
---
 Makefile.am | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index b71109ca18..8af69f88ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1115,10 +1115,14 @@ cuirass-jobs: $(GOBJECTS)
 
 # Git auto-configuration.
 .git/hooks/pre-push: etc/git/pre-push
-       -cp etc/git/pre-push .git/hooks/pre-push
+       $(AM_V_at)if test -d .git; then \
+       cp etc/git/pre-push .git/hooks/pre-push; \
+       fi
 
 .git/config: etc/git/gitconfig
-       -git config include.path ../etc/git/gitconfig
+       $(AM_V_at)if command -v git >/dev/null && test -d .git; then \
+       git config include.path ../etc/git/gitconfig; \
+       fi
 
 nodist_noinst_DATA = .git/hooks/pre-push .git/config
 



reply via email to

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