[clutter/clutter-1.22] build: Skip gitignore files when not building from git



commit f43e6294bb354686f71a6adf61fe9dd4ff00d824
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Apr 23 21:33:30 2015 +0100

    build: Skip gitignore files when not building from git
    
    There's really no point in going through the motions there.

 build/autotools/Makefile.am.gitignore |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/build/autotools/Makefile.am.gitignore b/build/autotools/Makefile.am.gitignore
index b019a3e..ec3f3c7 100644
--- a/build/autotools/Makefile.am.gitignore
+++ b/build/autotools/Makefile.am.gitignore
@@ -6,13 +6,14 @@
 GIT_IGNORE_FILES = $(noinst_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS) $(GIT_IGNORE_EXTRA)
 
 .gitignore: Makefile.am
-       $(QUIET_GEN)( \
-         echo "*.o" ; \
-         echo ".gitignore" ; \
-       ) > .gitignore ; \
-       for p in $(GIT_IGNORE_FILES); do \
-               echo "/$$p" >> .gitignore ; \
-       done
+       $(QUIET_GEN)if test -d "$(top_srcdir)/.git"; then \
+               ( echo "*.o" ; \
+                 echo ".gitignore" ; \
+               ) > .gitignore ; \
+               for p in $(GIT_IGNORE_FILES); do \
+                       echo "/$$p" >> .gitignore ; \
+               done \
+       fi
 
 gitignore: .gitignore
 


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