[gtranslator] Add git.mk to generate the .gitignore.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtranslator] Add git.mk to generate the .gitignore.
- Date: Sun, 16 Aug 2009 19:24:39 +0000 (UTC)
commit 5c4c1b74ad02a937d431ecc368153874f0ce9538
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun Aug 16 21:08:43 2009 +0200
Add git.mk to generate the .gitignore.
Makefile.am | 3 +-
data/Makefile.am | 2 +
data/desktop/Makefile.am | 3 +-
data/pixmaps/Makefile.am | 2 +
doc/Makefile.am | 2 +
doc/UMTF/Makefile.am | 2 +
doc/reference/Makefile.am | 2 +
git.mk | 182 +++++++++++++++++++++++++++
help/Makefile.am | 2 +
man/Makefile.am | 2 +
plugins/Makefile.am | 2 +
plugins/alternate-language/Makefile.am | 2 +
plugins/charmap/Makefile.am | 2 +
plugins/dictionary/Makefile.am | 2 +
plugins/fullscreen/Makefile.am | 2 +
plugins/insert-params/Makefile.am | 2 +
plugins/insert-tags/Makefile.am | 2 +
plugins/open-tran/Makefile.am | 2 +
plugins/source-code-view/Makefile.am | 2 +
plugins/subversion/Makefile.am | 2 +
src/Makefile.am | 2 +
src/dialogs/Makefile.am | 2 +
src/plugin-system/Makefile.am | 2 +
src/toolbareditor/Makefile.am | 2 +
src/translation-memory/Makefile.am | 2 +
src/translation-memory/berkeley/Makefile.am | 2 +
26 files changed, 232 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1961d11..0f7b8e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,4 +14,5 @@ EXTRA_DIST= \
DISTCLEANFILES = \
gnome-doc-utils.make
-DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc
\ No newline at end of file
+DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc
+-include $(top_srcdir)/git.mk
diff --git a/data/Makefile.am b/data/Makefile.am
index f57357a..a7ddee0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -34,3 +34,5 @@ EXTRA_DIST = \
CLEANFILES = \
$(schemas_DATA) \
$(pkgconfig_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/desktop/Makefile.am b/data/desktop/Makefile.am
index 527b492..4a1b7f5 100644
--- a/data/desktop/Makefile.am
+++ b/data/desktop/Makefile.am
@@ -32,4 +32,5 @@ install-data-hook:
$(UPDATE_DESKTOP)
uninstall-hook:
- $(UPDATE_DESKTOP)
\ No newline at end of file
+ $(UPDATE_DESKTOP)
+-include $(top_srcdir)/git.mk
diff --git a/data/pixmaps/Makefile.am b/data/pixmaps/Makefile.am
index d53392b..6957132 100644
--- a/data/pixmaps/Makefile.am
+++ b/data/pixmaps/Makefile.am
@@ -10,3 +10,5 @@ icon_DATA = \
EXTRA_DIST = \
$(icon_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 57e04c2..92d7069 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1 +1,3 @@
SUBDIRS = reference UMTF
+
+-include $(top_srcdir)/git.mk
diff --git a/doc/UMTF/Makefile.am b/doc/UMTF/Makefile.am
index 0b34e61..20ee5e7 100644
--- a/doc/UMTF/Makefile.am
+++ b/doc/UMTF/Makefile.am
@@ -27,3 +27,5 @@ specpack: $(UMTF_SPEC_FILES)
clean:
rm -rf UMTF-$(UMTF_VERSION)
+
+-include $(top_srcdir)/git.mk
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index c4ccf08..e8765db 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -93,3 +93,5 @@ include $(top_srcdir)/gtk-doc.make
# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST += version.xml.in
+
+-include $(top_srcdir)/git.mk
diff --git a/git.mk b/git.mk
new file mode 100644
index 0000000..01bf288
--- /dev/null
+++ b/git.mk
@@ -0,0 +1,182 @@
+# 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 $@; \
+ { \
+ if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
+ for x in \
+ $(DOC_MODULE)-decl-list.txt \
+ $(DOC_MODULE)-decl.txt \
+ tmpl/$(DOC_MODULE)-unused.sgml \
+ "tmpl/*.bak" \
+ xml html \
+ ; do echo /$$x; done; \
+ fi; \
+ if test "x$(DOC_MODULE)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
+ for x in \
+ $(_DOC_C_DOCS) \
+ $(_DOC_LC_DOCS) \
+ $(_DOC_OMF_ALL) \
+ $(_DOC_DSK_ALL) \
+ $(_DOC_HTML_ALL) \
+ $(_DOC_POFILES) \
+ "*/.xml2po.mo" \
+ "*/*.omf.out" \
+ ; do echo /$$x; done; \
+ fi; \
+ if test -f $(srcdir)/po/Makefile.in.in; then \
+ for x in \
+ po/Makefile.in.in \
+ po/Makefile.in \
+ po/Makefile \
+ po/POTFILES \
+ po/stamp-it \
+ po/.intltool-merge-cache \
+ "po/*.gmo" \
+ "po/*.mo" \
+ intltool-extract.in \
+ intltool-merge.in \
+ intltool-update.in \
+ ; do echo /$$x; done; \
+ fi; \
+ if test -f $(srcdir)/configure; then \
+ for x in \
+ autom4te.cache \
+ configure \
+ config.h \
+ stamp-h1 \
+ libtool \
+ config.lt \
+ ; do echo /$$x; done; \
+ fi; \
+ for x in \
+ .gitignore \
+ $(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-maybe
+gitignore-recurse-maybe:
+ @if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \
+ fi;
+gitignore-recurse:
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir"); \
+ done
+gitignore: $(srcdir)/.gitignore gitignore-recurse
+
+maintainer-clean: gitignore-clean
+gitignore-clean:
+ -rm -f $(srcdir)/.gitignore
+
+.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
diff --git a/help/Makefile.am b/help/Makefile.am
index 9e38315..e337f9e 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -17,3 +17,5 @@ DOC_FIGURES = figures/mainwindow.png \
figures/prefs-interface.png \
figures/prefs-tm.png
DOC_LINGUAS = de el es th zh_CN
+
+-include $(top_srcdir)/git.mk
diff --git a/man/Makefile.am b/man/Makefile.am
index 51fe764..61b5d13 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -12,3 +12,5 @@ CLEANFILES = $(gtranslator_man__DATA)
EXTRA_DIST = \
gtranslator.1.in
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 72aacbd..2bee3b8 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -20,3 +20,5 @@ endif
if BUILD_SVN
SUBDIRS += subversion
endif
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/alternate-language/Makefile.am b/plugins/alternate-language/Makefile.am
index d9c54b2..a9fbc73 100644
--- a/plugins/alternate-language/Makefile.am
+++ b/plugins/alternate-language/Makefile.am
@@ -38,3 +38,5 @@ EXTRA_DIST = $(plugin_in_files)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/charmap/Makefile.am b/plugins/charmap/Makefile.am
index 3cdd3be..9a1b609 100644
--- a/plugins/charmap/Makefile.am
+++ b/plugins/charmap/Makefile.am
@@ -41,3 +41,5 @@ EXTRA_DIST = $(pixmaps__DATA) $(plugin_in_files)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/dictionary/Makefile.am b/plugins/dictionary/Makefile.am
index 892d2b8..a795242 100644
--- a/plugins/dictionary/Makefile.am
+++ b/plugins/dictionary/Makefile.am
@@ -45,3 +45,5 @@ EXTRA_DIST = $(pixmaps__DATA) $(plugin_in_files)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/fullscreen/Makefile.am b/plugins/fullscreen/Makefile.am
index 3af86f3..0bbdf13 100644
--- a/plugins/fullscreen/Makefile.am
+++ b/plugins/fullscreen/Makefile.am
@@ -36,3 +36,5 @@ EXTRA_DIST = $(plugin_in_files)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/insert-params/Makefile.am b/plugins/insert-params/Makefile.am
index 468f5cd..f697797 100644
--- a/plugins/insert-params/Makefile.am
+++ b/plugins/insert-params/Makefile.am
@@ -36,3 +36,5 @@ EXTRA_DIST = $(plugin_in_files)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/insert-tags/Makefile.am b/plugins/insert-tags/Makefile.am
index 2aa4fdd..94ad50c 100644
--- a/plugins/insert-tags/Makefile.am
+++ b/plugins/insert-tags/Makefile.am
@@ -36,3 +36,5 @@ EXTRA_DIST = $(plugin_in_files)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/open-tran/Makefile.am b/plugins/open-tran/Makefile.am
index baf3c56..4c19a06 100644
--- a/plugins/open-tran/Makefile.am
+++ b/plugins/open-tran/Makefile.am
@@ -58,3 +58,5 @@ EXTRA_DIST = $(ui_DATA) $(pixmaps__DATA) $(plugin_in_files)
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/source-code-view/Makefile.am b/plugins/source-code-view/Makefile.am
index 9b52b80..20d6f26 100644
--- a/plugins/source-code-view/Makefile.am
+++ b/plugins/source-code-view/Makefile.am
@@ -45,3 +45,5 @@ EXTRA_DIST = \
CLEANFILES = $(plugin_DATA)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/subversion/Makefile.am b/plugins/subversion/Makefile.am
index be2e768..71b182d 100644
--- a/plugins/subversion/Makefile.am
+++ b/plugins/subversion/Makefile.am
@@ -103,3 +103,5 @@ EXTRA_DIST = \
CLEANFILES = $(plugin_DATA) $(BUILT_SOURCES)
DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index a807ca5..ecf2340 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -157,3 +157,5 @@ EXTRA_DIST = \
gtranslator-enum-types.c.template
CLEANFILES = $(BUILT_SOURCES)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/dialogs/Makefile.am b/src/dialogs/Makefile.am
index 12e9d08..bd61b1e 100644
--- a/src/dialogs/Makefile.am
+++ b/src/dialogs/Makefile.am
@@ -45,3 +45,5 @@ ui_DATA = \
EXTRA_DIST = \
$(ui_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/plugin-system/Makefile.am b/src/plugin-system/Makefile.am
index afff7bd..fa9801c 100644
--- a/src/plugin-system/Makefile.am
+++ b/src/plugin-system/Makefile.am
@@ -47,3 +47,5 @@ libpluginsystem_la_LDFLAGS = \
EXTRA_DIST = $(pixmaps__DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/toolbareditor/Makefile.am b/src/toolbareditor/Makefile.am
index 003f260..fa66271 100644
--- a/src/toolbareditor/Makefile.am
+++ b/src/toolbareditor/Makefile.am
@@ -104,3 +104,5 @@ regenerate-built-sources:
CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
MAINTAINERCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/translation-memory/Makefile.am b/src/translation-memory/Makefile.am
index 2a97469..b46d2b4 100644
--- a/src/translation-memory/Makefile.am
+++ b/src/translation-memory/Makefile.am
@@ -43,3 +43,5 @@ libtranslationmemory_la_LIBADD = \
EXTRA_DIST = $(pixmaps__DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/translation-memory/berkeley/Makefile.am b/src/translation-memory/berkeley/Makefile.am
index 5f9adfb..75235b3 100644
--- a/src/translation-memory/berkeley/Makefile.am
+++ b/src/translation-memory/berkeley/Makefile.am
@@ -36,3 +36,5 @@ libberkeley_la_CFLAGS = \
EXTRA_DIST = $(pixmaps__DATA)
+
+-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]