[json-glib] build: Update gitignore generation rule



commit f0dfe4f84c924953585db3d53c568cfe7813226a
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Mar 1 16:18:24 2016 +0000

    build: Update gitignore generation rule

 build/autotools/Makefile.am.gitignore |   29 +++++++++++++----------------
 1 files changed, 13 insertions(+), 16 deletions(-)
---
diff --git a/build/autotools/Makefile.am.gitignore b/build/autotools/Makefile.am.gitignore
index 01611a8..ec3f3c7 100644
--- a/build/autotools/Makefile.am.gitignore
+++ b/build/autotools/Makefile.am.gitignore
@@ -3,28 +3,25 @@
 # generator of Git ignore files, and it's not meant to be used as
 # the top-level Git ignore file generator.
 
-$(srcdir)/.gitignore: Makefile.am
-       $(AM_V_GEN)( \
-         echo "*.o" ; \
-         echo ".gitignore" ; \
-         echo "*.trs" ; \
-         echo "*.log" ; \
-       ) > $(srcdir)/.gitignore ; \
-       for p in $(noinst_PROGRAMS); do \
-               echo "/$$p" >> $(srcdir)/.gitignore ; \
-       done ; \
-       for p in $(check_PROGRAMS); do \
-               echo "/$$p" >> $(srcdir)/.gitignore ; \
-       done
+GIT_IGNORE_FILES = $(noinst_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS) $(GIT_IGNORE_EXTRA)
 
+.gitignore: Makefile.am
+       $(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: $(srcdir)/.gitignore
+gitignore: .gitignore
 
 gitignore-clean:
-       @rm -f $(srcdir)/.gitignore
+       $(QUIET_RM)rm -f .gitignore
 
 .PHONY: gitignore gitignore-clean
 
-all: gitignore
+all-am: gitignore
 
 maintainer-clean: gitignore-clean


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