[gnome-power-manager] Autogenerate the .gitignore files using git.mk
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Autogenerate the .gitignore files using git.mk
- Date: Fri, 5 Aug 2011 10:12:48 +0000 (UTC)
commit 6b8d8cf33cba67dfd7d165f93f8b94f35b990aff
Author: Richard Hughes <richard hughsie com>
Date: Fri Aug 5 10:53:43 2011 +0100
Autogenerate the .gitignore files using git.mk
.gitignore | 31 -----
Makefile.am | 17 +++
data/.gitignore | 10 --
data/Makefile.am | 2 +
data/icons/16x16/Makefile.am | 1 +
data/icons/16x16/apps/Makefile.am | 2 +
data/icons/16x16/status/Makefile.am | 2 +-
data/icons/22x22/Makefile.am | 1 +
data/icons/22x22/apps/Makefile.am | 2 +
data/icons/22x22/status/Makefile.am | 2 +-
data/icons/24x24/Makefile.am | 1 +
data/icons/24x24/apps/Makefile.am | 2 +
data/icons/24x24/status/Makefile.am | 2 +-
data/icons/32x32/Makefile.am | 1 +
data/icons/32x32/apps/Makefile.am | 2 +
data/icons/32x32/status/Makefile.am | 2 +-
data/icons/48x48/Makefile.am | 1 +
data/icons/48x48/apps/Makefile.am | 2 +
data/icons/48x48/status/Makefile.am | 2 +-
data/icons/Makefile.am | 1 +
data/icons/scalable/Makefile.am | 1 +
data/icons/scalable/apps/Makefile.am | 2 +
data/icons/scalable/status/Makefile.am | 1 +
git.mk | 200 ++++++++++++++++++++++++++++++++
m4/.gitignore | 1 +
man/.gitignore | 6 -
man/Makefile.am | 7 +-
src/.gitignore | 13 --
src/Makefile.am | 1 +
29 files changed, 249 insertions(+), 69 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ec41bdb..e516db4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,21 @@ DISTCLEANFILES = \
intltool-update \
gnome-power-manager-*.tar.gz
+MAINTAINERCLEANFILES = \
+ aclocal.m4 \
+ compile \
+ config.guess \
+ config.h.in \
+ config.sub \
+ depcomp \
+ gnome-doc-utils.make \
+ install-sh \
+ ltmain.sh \
+ missing \
+ mkinstalldirs \
+ omf.make \
+ xmldocs.make
+
distclean-local:
if test $(srdcir) = .; then :; else \
rm -f ChangeLog; \
@@ -42,3 +57,5 @@ ChangeLog:
fi
.PHONY: ChangeLog
+
+-include $(top_srcdir)/git.mk
diff --git a/data/Makefile.am b/data/Makefile.am
index e85eb20..cad260e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -25,3 +25,5 @@ clean-local :
DISTCLEANFILES = \
gnome-power-statistics.desktop \
org.gnome.power-manager.gschema.xml
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am
index 3385c29..04a3e32 100644
--- a/data/icons/16x16/Makefile.am
+++ b/data/icons/16x16/Makefile.am
@@ -1,2 +1,3 @@
SUBDIRS = apps status
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/apps/Makefile.am b/data/icons/16x16/apps/Makefile.am
index 03c1dc1..2f34b5a 100644
--- a/data/icons/16x16/apps/Makefile.am
+++ b/data/icons/16x16/apps/Makefile.am
@@ -12,3 +12,5 @@ noinst_DATA =
EXTRA_DIST = \
$(icons_DATA) \
$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/status/Makefile.am b/data/icons/16x16/status/Makefile.am
index ec69a83..943ecc9 100644
--- a/data/icons/16x16/status/Makefile.am
+++ b/data/icons/16x16/status/Makefile.am
@@ -4,7 +4,6 @@ context = status
iconsdir = $(themedir)/$(size)/$(context)
-
icons_DATA = \
gpm-keyboard-000.png \
gpm-keyboard-020.png \
@@ -54,3 +53,4 @@ 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 3385c29..04a3e32 100644
--- a/data/icons/22x22/Makefile.am
+++ b/data/icons/22x22/Makefile.am
@@ -1,2 +1,3 @@
SUBDIRS = apps status
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/apps/Makefile.am b/data/icons/22x22/apps/Makefile.am
index 4232544..158646a 100644
--- a/data/icons/22x22/apps/Makefile.am
+++ b/data/icons/22x22/apps/Makefile.am
@@ -12,3 +12,5 @@ noinst_DATA =
EXTRA_DIST = \
$(icons_DATA) \
$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/status/Makefile.am b/data/icons/22x22/status/Makefile.am
index 17c54d9..9176619 100644
--- a/data/icons/22x22/status/Makefile.am
+++ b/data/icons/22x22/status/Makefile.am
@@ -4,7 +4,6 @@ context = status
iconsdir = $(themedir)/$(size)/$(context)
-
icons_DATA = \
gpm-keyboard-000.png \
gpm-keyboard-020.png \
@@ -54,3 +53,4 @@ EXTRA_DIST = \
$(icons_DATA) \
$(noinst_DATA)
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/24x24/Makefile.am b/data/icons/24x24/Makefile.am
index 3385c29..04a3e32 100644
--- a/data/icons/24x24/Makefile.am
+++ b/data/icons/24x24/Makefile.am
@@ -1,2 +1,3 @@
SUBDIRS = apps status
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/24x24/apps/Makefile.am b/data/icons/24x24/apps/Makefile.am
index b052794..2b42ea2 100644
--- a/data/icons/24x24/apps/Makefile.am
+++ b/data/icons/24x24/apps/Makefile.am
@@ -12,3 +12,5 @@ noinst_DATA =
EXTRA_DIST = \
$(icons_DATA) \
$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/24x24/status/Makefile.am b/data/icons/24x24/status/Makefile.am
index 96069b6..425a714 100644
--- a/data/icons/24x24/status/Makefile.am
+++ b/data/icons/24x24/status/Makefile.am
@@ -4,7 +4,6 @@ context = status
iconsdir = $(themedir)/$(size)/$(context)
-
icons_DATA = \
gpm-keyboard-000.png \
gpm-keyboard-020.png \
@@ -54,3 +53,4 @@ 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 3385c29..04a3e32 100644
--- a/data/icons/32x32/Makefile.am
+++ b/data/icons/32x32/Makefile.am
@@ -1,2 +1,3 @@
SUBDIRS = apps status
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/32x32/apps/Makefile.am b/data/icons/32x32/apps/Makefile.am
index 5dcd039..cb6fccd 100644
--- a/data/icons/32x32/apps/Makefile.am
+++ b/data/icons/32x32/apps/Makefile.am
@@ -12,3 +12,5 @@ noinst_DATA =
EXTRA_DIST = \
$(icons_DATA) \
$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/32x32/status/Makefile.am b/data/icons/32x32/status/Makefile.am
index 897fc0a..4e07fdc 100644
--- a/data/icons/32x32/status/Makefile.am
+++ b/data/icons/32x32/status/Makefile.am
@@ -4,7 +4,6 @@ context = status
iconsdir = $(themedir)/$(size)/$(context)
-
icons_DATA = \
gpm-keyboard-000.png \
gpm-keyboard-020.png \
@@ -54,3 +53,4 @@ 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 3385c29..04a3e32 100644
--- a/data/icons/48x48/Makefile.am
+++ b/data/icons/48x48/Makefile.am
@@ -1,2 +1,3 @@
SUBDIRS = apps status
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/48x48/apps/Makefile.am b/data/icons/48x48/apps/Makefile.am
index 39519ad..7953e03 100644
--- a/data/icons/48x48/apps/Makefile.am
+++ b/data/icons/48x48/apps/Makefile.am
@@ -12,3 +12,5 @@ noinst_DATA =
EXTRA_DIST = \
$(icons_DATA) \
$(noinst_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/48x48/status/Makefile.am b/data/icons/48x48/status/Makefile.am
index 208aef1..a149cab 100644
--- a/data/icons/48x48/status/Makefile.am
+++ b/data/icons/48x48/status/Makefile.am
@@ -4,7 +4,6 @@ context = status
iconsdir = $(themedir)/$(size)/$(context)
-
icons_DATA = \
gpm-monitor.png \
gpm-keyboard-000.png \
@@ -55,3 +54,4 @@ EXTRA_DIST = \
$(icons_DATA) \
$(noinst_DATA)
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 17dca13..3ebd12d 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -13,3 +13,4 @@ update-icon-cache:
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 3385c29..04a3e32 100644
--- a/data/icons/scalable/Makefile.am
+++ b/data/icons/scalable/Makefile.am
@@ -1,2 +1,3 @@
SUBDIRS = apps status
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/scalable/apps/Makefile.am b/data/icons/scalable/apps/Makefile.am
index 46da586..c71986f 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/data/icons/scalable/status/Makefile.am b/data/icons/scalable/status/Makefile.am
index c21203c..e4ccf1c 100644
--- a/data/icons/scalable/status/Makefile.am
+++ b/data/icons/scalable/status/Makefile.am
@@ -49,3 +49,4 @@ EXTRA_DIST = \
$(symicons_DATA) \
$(noinst_DATA)
+-include $(top_srcdir)/git.mk
diff --git a/git.mk b/git.mk
new file mode 100644
index 0000000..abd6c0a
--- /dev/null
+++ b/git.mk
@@ -0,0 +1,200 @@
+# 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, mallard, intltool, gsettings.
+#
+#
+# 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.
+#
+# ChangeLog
+#
+# - 2010-12-06 Add support for Mallard docs
+# - 2010-12-06 Start this change log
+
+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
+ $(AM_V_GEN) \
+ { \
+ 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)$(DOC_ID)" = 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_MOFILES) \
+ $(_DOC_POFILES) \
+ $(DOC_H_FILE) \
+ "*/.xml2po.mo" \
+ "*/*.omf.out" \
+ ; do echo /$$x; done; \
+ fi; \
+ if test "x$(gsettings_SCHEMAS)" = x; then :; else \
+ for x in \
+ $(gsettings_SCHEMAS:.xml=.valid) \
+ $(gsettings__enum_file) \
+ ; 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" \
+ po/$(GETTEXT_PACKAGE).pot \
+ 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) \
+ $(check_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]" \
+ ".dirstamp" \
+ ; do echo /$$x; done; \
+ } | \
+ sed "s ^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
+ sed 's@/[.]/@/@g' | \
+ LC_ALL=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:
+ @for subdir in $(DIST_SUBDIRS); do \
+ case " $(SUBDIRS) " in \
+ *" $$subdir "*) :;; \
+ *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \
+ esac; \
+ 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/m4/.gitignore b/m4/.gitignore
index e69de29..0f4126c 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -0,0 +1 @@
+*.m4
diff --git a/man/Makefile.am b/man/Makefile.am
index d9d8cb0..2ca28b6 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -11,7 +11,6 @@ gnome-power-statistics.1: gnome-power-statistics.sgml
docbook2man $? &> /dev/null
endif
-clean-local :
- rm -f *~
- rm -f *.1
- rm -f manpage.*
+CLEANFILES = *.1 manpage.*
+
+-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index ca022c1..3603d70 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -76,3 +76,4 @@ MAINTAINERCLEANFILES = \
*~ \
Makefile.in
+-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]