diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-05-04 09:45:57 -0400 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-05-06 23:21:11 -0400 |
| commit | ed0f0204b2c901be006a8441ea4d392a89aba77e (patch) | |
| tree | 30209f08c73e33151c9fbc502b284492709a8aed /Makefile.am | |
| parent | 8af2865896ddc130df08af2b17b77adc2dd7d81a (diff) | |
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>
Diffstat (limited to 'Makefile.am')
| -rw-r--r-- | Makefile.am | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index b71109ca180..8af69f88acb 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -1115,10 +1115,14 @@ cuirass-jobs: $(GOBJECTS) | |||
| 1115 | 1115 | ||
| 1116 | # Git auto-configuration. | 1116 | # Git auto-configuration. |
| 1117 | .git/hooks/pre-push: etc/git/pre-push | 1117 | .git/hooks/pre-push: etc/git/pre-push |
| 1118 | -cp etc/git/pre-push .git/hooks/pre-push | 1118 | $(AM_V_at)if test -d .git; then \ |
| 1119 | cp etc/git/pre-push .git/hooks/pre-push; \ | ||
| 1120 | fi | ||
| 1119 | 1121 | ||
| 1120 | .git/config: etc/git/gitconfig | 1122 | .git/config: etc/git/gitconfig |
| 1121 | -git config include.path ../etc/git/gitconfig | 1123 | $(AM_V_at)if command -v git >/dev/null && test -d .git; then \ |
| 1124 | git config include.path ../etc/git/gitconfig; \ | ||
| 1125 | fi | ||
| 1122 | 1126 | ||
| 1123 | nodist_noinst_DATA = .git/hooks/pre-push .git/config | 1127 | nodist_noinst_DATA = .git/hooks/pre-push .git/config |
| 1124 | 1128 | ||
