[gthumb] Added automatic .gitignore generation



commit 547a8b54eff09ec3ab5c4f32556465feb827e74f
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Thu Apr 30 11:31:47 2009 -0400

    Added automatic .gitignore generation
---
 Makefile.am                               |    2 +
 data/Makefile.am                          |    2 +
 data/albumthemes/BestFit/Makefile.am      |    2 +
 data/albumthemes/Classic/Makefile.am      |    2 +
 data/albumthemes/ClassicClips/Makefile.am |    2 +
 data/albumthemes/Flicker/Makefile.am      |    2 +
 data/albumthemes/Makefile.am              |    2 +
 data/albumthemes/NeatRound/Makefile.am    |    2 +
 data/albumthemes/Wiki/Makefile.am         |    2 +
 data/glade/Makefile.am                    |    2 +
 data/icons/16x16/Makefile.am              |    2 +
 data/icons/16x16/apps/Makefile.am         |    2 +
 data/icons/22x22/Makefile.am              |    2 +
 data/icons/22x22/apps/Makefile.am         |    2 +
 data/icons/32x32/Makefile.am              |    2 +
 data/icons/32x32/apps/Makefile.am         |    2 +
 data/icons/48x48/Makefile.am              |    2 +
 data/icons/48x48/apps/Makefile.am         |    2 +
 data/icons/Makefile.am                    |    2 +
 data/icons/scalable/Makefile.am           |    2 +
 data/icons/scalable/apps/Makefile.am      |    2 +
 doc/C/Makefile.am                         |    2 +
 doc/Makefile.am                           |    2 +
 git.mk                                    |  178 +++++++++++++++++++++++++++++
 libgthumb/Makefile.am                     |    2 +
 libgthumb/cursors/Makefile.am             |    2 +
 libgthumb/icons/Makefile.am               |    2 +
 libgthumb/jpegutils/Makefile.am           |    2 +
 src/Makefile.am                           |    2 +
 src/icons/Makefile.am                     |    2 +
 30 files changed, 236 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 934fa2a..9b3d4be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,3 +32,5 @@ DISTCLEANFILES =                	\
 	gnome-doc-utils.make
 
 DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
+
+-include $(top_srcdir)/git.mk
diff --git a/data/Makefile.am b/data/Makefile.am
index b4da966..2c51277 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -33,3 +33,5 @@ EXTRA_DIST = 			\
 DISTCLEANFILES =                \
 	$(schema_DATA)		\
 	$(desktop_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/albumthemes/BestFit/Makefile.am b/data/albumthemes/BestFit/Makefile.am
index b875cdc..8668a6d 100644
--- a/data/albumthemes/BestFit/Makefile.am
+++ b/data/albumthemes/BestFit/Makefile.am
@@ -17,3 +17,5 @@ theme_DATA =			\
 	$(gthtml_files)
 
 EXTRA_DIST = $(theme_DATA) 
+
+-include $(top_srcdir)/git.mk
diff --git a/data/albumthemes/Classic/Makefile.am b/data/albumthemes/Classic/Makefile.am
index 5aeab0e..7266e2a 100644
--- a/data/albumthemes/Classic/Makefile.am
+++ b/data/albumthemes/Classic/Makefile.am
@@ -21,3 +21,5 @@ theme_DATA =			\
 	$(gthtml_files)
 
 EXTRA_DIST = $(theme_DATA) 
+
+-include $(top_srcdir)/git.mk
diff --git a/data/albumthemes/ClassicClips/Makefile.am b/data/albumthemes/ClassicClips/Makefile.am
index daa2e61..ae2de5c 100644
--- a/data/albumthemes/ClassicClips/Makefile.am
+++ b/data/albumthemes/ClassicClips/Makefile.am
@@ -22,3 +22,5 @@ theme_DATA =			\
 
 EXTRA_DIST = $(theme_DATA) 
 
+
+-include $(top_srcdir)/git.mk
diff --git a/data/albumthemes/Flicker/Makefile.am b/data/albumthemes/Flicker/Makefile.am
index 31224b9..f11697c 100644
--- a/data/albumthemes/Flicker/Makefile.am
+++ b/data/albumthemes/Flicker/Makefile.am
@@ -12,3 +12,5 @@ theme_DATA =			\
 	$(gthtml_files)
 
 EXTRA_DIST = $(theme_DATA) 
+
+-include $(top_srcdir)/git.mk
diff --git a/data/albumthemes/Makefile.am b/data/albumthemes/Makefile.am
index bcba82d..8aa3d60 100644
--- a/data/albumthemes/Makefile.am
+++ b/data/albumthemes/Makefile.am
@@ -1,2 +1,4 @@
 SUBDIRS = BestFit Classic ClassicClips Flicker NeatRound Wiki 
 EXTRA_DIST = text.h
+
+-include $(top_srcdir)/git.mk
diff --git a/data/albumthemes/NeatRound/Makefile.am b/data/albumthemes/NeatRound/Makefile.am
index 1b21e8d..4b5e5ce 100644
--- a/data/albumthemes/NeatRound/Makefile.am
+++ b/data/albumthemes/NeatRound/Makefile.am
@@ -21,3 +21,5 @@ theme_DATA =			\
 	$(gthtml_files)
 
 EXTRA_DIST = $(theme_DATA) 
+
+-include $(top_srcdir)/git.mk
diff --git a/data/albumthemes/Wiki/Makefile.am b/data/albumthemes/Wiki/Makefile.am
index 41866f8..0407944 100644
--- a/data/albumthemes/Wiki/Makefile.am
+++ b/data/albumthemes/Wiki/Makefile.am
@@ -12,3 +12,5 @@ theme_DATA =			\
 	$(gthtml_files)
 
 EXTRA_DIST = $(theme_DATA) 
+
+-include $(top_srcdir)/git.mk
diff --git a/data/glade/Makefile.am b/data/glade/Makefile.am
index 5173279..390d417 100644
--- a/data/glade/Makefile.am
+++ b/data/glade/Makefile.am
@@ -21,3 +21,5 @@ glade_DATA = 				\
 gladedir = $(datadir)/gthumb/glade
 
 EXTRA_DIST = $(glade_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am
index ebbd145..906a50e 100644
--- a/data/icons/16x16/Makefile.am
+++ b/data/icons/16x16/Makefile.am
@@ -1 +1,3 @@
 SUBDIRS = apps
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/apps/Makefile.am b/data/icons/16x16/apps/Makefile.am
index 79113bd..c645fac 100644
--- a/data/icons/16x16/apps/Makefile.am
+++ b/data/icons/16x16/apps/Makefile.am
@@ -13,3 +13,5 @@ noinst_DATA = \
 EXTRA_DIST =		\
 	$(icons_DATA)	\
 	$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/Makefile.am b/data/icons/22x22/Makefile.am
index ebbd145..906a50e 100644
--- a/data/icons/22x22/Makefile.am
+++ b/data/icons/22x22/Makefile.am
@@ -1 +1,3 @@
 SUBDIRS = apps
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/apps/Makefile.am b/data/icons/22x22/apps/Makefile.am
index fc56650..f0b6a9a 100644
--- a/data/icons/22x22/apps/Makefile.am
+++ b/data/icons/22x22/apps/Makefile.am
@@ -13,3 +13,5 @@ noinst_DATA = \
 EXTRA_DIST =		\
 	$(icons_DATA)	\
 	$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/32x32/Makefile.am b/data/icons/32x32/Makefile.am
index ebbd145..906a50e 100644
--- a/data/icons/32x32/Makefile.am
+++ b/data/icons/32x32/Makefile.am
@@ -1 +1,3 @@
 SUBDIRS = apps
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/32x32/apps/Makefile.am b/data/icons/32x32/apps/Makefile.am
index 3348778..5986ffe 100644
--- a/data/icons/32x32/apps/Makefile.am
+++ b/data/icons/32x32/apps/Makefile.am
@@ -13,3 +13,5 @@ noinst_DATA = \
 EXTRA_DIST =		\
 	$(icons_DATA)	\
 	$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/48x48/Makefile.am b/data/icons/48x48/Makefile.am
index ebbd145..906a50e 100644
--- a/data/icons/48x48/Makefile.am
+++ b/data/icons/48x48/Makefile.am
@@ -1 +1,3 @@
 SUBDIRS = apps
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/48x48/apps/Makefile.am b/data/icons/48x48/apps/Makefile.am
index 136c231..eba5f8c 100644
--- a/data/icons/48x48/apps/Makefile.am
+++ b/data/icons/48x48/apps/Makefile.am
@@ -13,3 +13,5 @@ noinst_DATA = \
 EXTRA_DIST =		\
 	$(icons_DATA)	\
 	$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 2f40035..cd6358a 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -12,3 +12,5 @@ update-icon-cache:
 		echo "*** Icon cache not updated.  After (un)install, run this:"; \
 		echo "***   $(gtk_update_icon_cache)"; \
 	fi
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/scalable/Makefile.am b/data/icons/scalable/Makefile.am
index ebbd145..906a50e 100644
--- a/data/icons/scalable/Makefile.am
+++ b/data/icons/scalable/Makefile.am
@@ -1 +1,3 @@
 SUBDIRS = apps
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/scalable/apps/Makefile.am b/data/icons/scalable/apps/Makefile.am
index 466deb6..54b4dce 100644
--- a/data/icons/scalable/apps/Makefile.am
+++ b/data/icons/scalable/apps/Makefile.am
@@ -12,3 +12,5 @@ noinst_DATA =
 EXTRA_DIST =		\
 	$(icons_DATA)	\
 	$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/doc/C/Makefile.am b/doc/C/Makefile.am
index f7f6595..b350f6b 100644
--- a/doc/C/Makefile.am
+++ b/doc/C/Makefile.am
@@ -5,3 +5,5 @@ omffile = gthumb-C.omf
 entities = legal.xml
 include $(top_srcdir)/xmldocs.make
 dist-hook: app-dist-hook
+
+-include $(top_srcdir)/git.mk
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 2041103..2492da5 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -12,3 +12,5 @@ DOC_FIGURES = 	figures/comment.png \
 DOC_LINGUAS = de el es fr oc sv
 
 EXTRA_DIST = theme-xml.txt
+
+-include $(top_srcdir)/git.mk
diff --git a/git.mk b/git.mk
new file mode 100644
index 0000000..739ba92
--- /dev/null
+++ b/git.mk
@@ -0,0 +1,178 @@
+# git.mk
+#
+# Copyright 2009, Red Hat, Inc.
+# Written by Behdad Esfahbod
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+#
+# The canonical source for this file is pango/git.mk, or whereever the
+# header of pango/git.mk suggests in the future.
+#
+# To use in your project, import this file in your git repo's toplevel,
+# then do "make -f git.mk".  This modifies all Makefile.am files in
+# your project to include git.mk.
+#
+# This enables automatic .gitignore generation.  If you need to ignore
+# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
+# But think twice before doing that.  If a file has to be in .gitignore,
+# chances are very high that it's a generated file and should be in one
+# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
+#
+# The only case that you need to manually add a file to GITIGNOREFILES is
+# when remove files in one of mostlyclean-local, clean-local, distclean-local,
+# or maintainer-clean-local.
+#
+# Note that for files like editor backup, etc, there are better places to
+# ignore them.  See "man gitignore".
+#
+# If "make maintainer-clean" removes the files but they are not recognized
+# by this script (that is, if "git status" shows untracked files still), send
+# me the output of "git status" as well as your Makefile.am and Makefile for
+# the directories involved.
+#
+# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
+# pango/Makefile.am.
+#
+# Don't EXTRA_DIST this file.  It is supposed to only live in git clones,
+# not tarballs.  It serves no useful purpose in tarballs and clutters the
+# build dir.
+#
+# This file knows how to handle autoconf, automake, libtool, gtk-doc,
+# gnome-doc-utils, intltool.
+#
+#
+# KNOWN ISSUES:
+#
+# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
+#   submodule doesn't find us.  If you have configure.{in,ac} files in
+#   subdirs, add a proxy git.mk file in those dirs that simply does:
+#   "include $(top_srcdir)/../git.mk".  Add more ..'s to your taste.
+#   And add those files to git.  See vte/gnome-pty-helper/git.mk for
+#   example.
+#
+
+git-all: git-mk-install
+
+git-mk-install:
+	@echo Installing git makefile
+	@any_failed=; find $(top_srcdir) -name Makefile.am | while read x; do \
+		if grep 'include .*/git.mk' $$x >/dev/null; then \
+			echo $$x already includes git.mk; \
+		else \
+			failed=; \
+			echo "Updating $$x"; \
+			{ cat $$x; \
+			  echo ''; \
+			  echo '-include $$(top_srcdir)/git.mk'; \
+			} > $$x.tmp || failed=1; \
+			if test x$$failed = x; then \
+				mv $$x.tmp $$x || failed=1; \
+			fi; \
+			if test x$$failed = x; then : else \
+				echo Failed updating $$x; >&2 \
+				any_failed=1; \
+			fi; \
+	fi; done; test -z "$$any_failed"
+
+.PHONY: git-all git-mk-install
+
+
+### .gitignore generation
+
+$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
+	@echo Generating $@; \
+	GTKDOCGITIGNOREFILES=; \
+	test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x || \
+	GTKDOCGITIGNOREFILES=" \
+		$(DOC_MODULE)-decl-list.txt \
+		$(DOC_MODULE)-decl.txt \
+		tmpl/$(DOC_MODULE)-unused.sgml \
+		tmpl/*.bak \
+		xml html \
+		"; \
+	GNOMEDOCUTILSGITIGNOREFILES=; \
+	test "x$(DOC_MODULE)" = x -o "x$(DOC_LINGUAS)" = x || \
+	GNOMEDOCUTILSGITIGNOREFILES=" \
+		$(_DOC_C_DOCS) \
+		$(_DOC_LC_DOCS) \
+		$(_DOC_OMF_ALL) \
+		$(_DOC_DSK_ALL) \
+		$(_DOC_HTML_ALL) \
+		$(_DOC_POFILES) \
+		*/.xml2po.mo \
+		*/*.omf.out \
+		"; \
+	INTLTOOLGITIGNOREFILES=; test -f $(srcdir)/po/Makefile.in.in && \
+	INTLTOOLGITIGNOREFILES=" \
+		po/Makefile.in.in \
+		po/Makefile.in \
+		po/Makefile \
+		po/*.gmo \
+		po/*.mo \
+		po/POTFILES \
+		po/stamp-it \
+		po/.intltool-merge-cache \
+		intltool-extract.in \
+		intltool-merge.in \
+		intltool-update.in \
+		"; \
+	AUTOCONFGITIGNOREFILES=; test -f $(srcdir)/configure && \
+	AUTOCONFGITIGNOREFILES=" \
+		autom4te.cache \
+		configure \
+		config.h \
+		stamp-h1 \
+		libtool \
+		config.lt \
+		"; \
+	for x in \
+		.gitignore \
+		$$GTKDOCGITIGNOREFILES \
+		$$GNOMEDOCUTILSGITIGNOREFILES \
+		$$INTLTOOLGITIGNOREFILES \
+		$$AUTOCONFGITIGNOREFILES \
+		$(GITIGNOREFILES) \
+		$(CLEANFILES) \
+		$(PROGRAMS) \
+		$(EXTRA_PROGRAMS) \
+		$(LTLIBRARIES) \
+		so_locations \
+		.libs _libs \
+		$(MOSTLYCLEANFILES) \
+		"*.$(OBJEXT)" \
+		"*.lo" \
+		$(DISTCLEANFILES) \
+		$(am__CONFIG_DISTCLEAN_FILES) \
+		$(CONFIG_CLEAN_FILES) \
+		TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
+		"*.tab.c" \
+		$(MAINTAINERCLEANFILES) \
+		$(BUILT_SOURCES) \
+		$(DEPDIR) \
+		Makefile \
+		Makefile.in \
+		"*.orig" \
+		"*.rej" \
+		"*.bak" \
+		"*~" \
+		".*.sw[nop]" \
+	; do echo /$$x; done | \
+	sed "s ^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
+	sed 's@/[.]/@/@g' | \
+	LANG=C sort | uniq > $  tmp && \
+	mv $  tmp $@;
+
+all: $(srcdir)/.gitignore gitignore-recurse
+gitignore-recurse:
+	@if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
+		list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+		  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore); \
+		done; \
+	fi;
+maintainer-clean: gitignore-clean
+gitignore-clean:
+	-rm -f $(srcdir)/.gitignore
+.PHONY: gitignore-clean gitignore-recurse
+
diff --git a/libgthumb/Makefile.am b/libgthumb/Makefile.am
index b66018a..1c74989 100644
--- a/libgthumb/Makefile.am
+++ b/libgthumb/Makefile.am
@@ -183,3 +183,5 @@ gthumb-enum-types.c: $(HEADER_FILES) gthumb-enum-types.h
 
 CLEANFILES = $(MARSHALLERS) $(ENUMS)
 EXTRA_DIST = gthumb-marshal.list
+
+-include $(top_srcdir)/git.mk
diff --git a/libgthumb/cursors/Makefile.am b/libgthumb/cursors/Makefile.am
index b29cec7..c5ed4e9 100644
--- a/libgthumb/cursors/Makefile.am
+++ b/libgthumb/cursors/Makefile.am
@@ -5,3 +5,5 @@ EXTRA_DIST =			\
 	hand-closed-mask.xbm	\
 	hand-open-data.xbm	\
 	hand-open-mask.xbm
+
+-include $(top_srcdir)/git.mk
diff --git a/libgthumb/icons/Makefile.am b/libgthumb/icons/Makefile.am
index 47e5849..5cef027 100644
--- a/libgthumb/icons/Makefile.am
+++ b/libgthumb/icons/Makefile.am
@@ -140,3 +140,5 @@ EXTRA_DIST = \
 	$(IMAGES)		\
 	$(XPM_IMAGES)		\
 	pixbufs.h
+
+-include $(top_srcdir)/git.mk
diff --git a/libgthumb/jpegutils/Makefile.am b/libgthumb/jpegutils/Makefile.am
index d9373d7..5cfe3c3 100644
--- a/libgthumb/jpegutils/Makefile.am
+++ b/libgthumb/jpegutils/Makefile.am
@@ -25,3 +25,5 @@ libgthumb_jpegutils_la_SOURCES =	\
 	transupp.h
 
 EXTRA_DIST = README
+
+-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index 3f2f0e5..247766e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -223,3 +223,5 @@ EXTRA_DIST = 			\
 CLEANFILES =				\
 	$(gnome_gthumb_idl_sources)	\
 	gnome_gthumb_idl_stamp
+
+-include $(top_srcdir)/git.mk
diff --git a/src/icons/Makefile.am b/src/icons/Makefile.am
index 13a7c2a..81878b2 100644
--- a/src/icons/Makefile.am
+++ b/src/icons/Makefile.am
@@ -6,3 +6,5 @@ XPM_IMAGES =			\
 	nav_button.xpm
 
 EXTRA_DIST = $(XPM_IMAGES)
+
+-include $(top_srcdir)/git.mk



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