summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2013-08-13 20:02:22 +0200
committerJuan A. Suarez Romero <jasuarez@igalia.com>2013-08-24 00:59:28 +0200
commit99d47217a1f543ae3ddc23788dfa673ecae7fd93 (patch)
tree98d83592fc19734fbd69b49639caf7da8a65e674
parent18da634b72c5670fb96bbbc4af70a868adb040a2 (diff)
downloadgrilo-99d47217a1f543ae3ddc23788dfa673ecae7fd93.tar.gz
build: Switch to git.mk to keep the .gitignore file updated
Fixing the *CLEANFILES lists where needed and having git.mk generate the .gitignore files automatically seemed more useful than manually updating those files. https://bugzilla.gnome.org/show_bug.cgi?id=706491
-rw-r--r--.gitignore27
-rw-r--r--Makefile.am25
-rw-r--r--bindings/Makefile.am2
-rw-r--r--bindings/vala/Makefile.am2
-rw-r--r--configure.ac4
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/grilo/.gitignore14
-rw-r--r--doc/grilo/grilo-overrides.txt0
-rw-r--r--examples/Makefile.am3
-rw-r--r--git.mk303
-rw-r--r--libs/Makefile.am6
-rw-r--r--libs/net/Makefile.am11
-rw-r--r--src/Makefile.am18
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/python/Makefile.am5
-rw-r--r--tools/Makefile.am11
-rw-r--r--tools/grilo-inspect/.gitignore1
-rw-r--r--tools/grilo-inspect/Makefile.am9
-rw-r--r--tools/grilo-test-ui/.gitignore1
-rw-r--r--tools/grilo-test-ui/Makefile.am6
-rw-r--r--tools/vala/Makefile.am9
22 files changed, 349 insertions, 115 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 487f72d..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,27 +0,0 @@
-Makefile
-Makefile.in
-TAGS
-aclocal.m4
-autom4te.cache
-compile
-config.*
-configure
-depcomp
-install-sh
-libtool
-ltmain.sh
-missing
-m4
-stamp-*
-*.exe
-*.make
-*.o
-*.la
-*.lo
-*.gir
-*.typelib
-*.pc
-*.sw?
-*~
-.libs
-.deps
diff --git a/Makefile.am b/Makefile.am
index 0fb95c9..c05000b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,21 +27,14 @@ endif
dist_man1_MANS = grl-inspect.1
MAINTAINERCLEANFILES = \
- aclocal.m4 \
- compile \
- config.guess \
- config.sub \
- configure \
- depcomp \
- install-sh \
- ltmain.sh \
- missing \
- libtool \
- stamp-h1 \
- Makefile.in \
- *.make \
- mkinstalldirs \
- *~
+ $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
+ $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
+ $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
+ $(srcdir)/gtk-doc.make \
+ $(srcdir)/m4/gtk-doc.m4 \
+ $(srcdir)/m4/intltool.m4 \
+ $(srcdir)/omf.make \
+ $(srcdir)/xmldocs.make
DISTCLEANFILES = $(MAINTAINERCLEANFILES)
@@ -64,3 +57,5 @@ dist-hook:
else \
echo A git clone is required to generate a ChangeLog >&2; \
fi
+
+-include $(top_srcdir)/git.mk
diff --git a/bindings/Makefile.am b/bindings/Makefile.am
index 8d6ac1c..50c92aa 100644
--- a/bindings/Makefile.am
+++ b/bindings/Makefile.am
@@ -3,3 +3,5 @@ SUBDIRS =
if HAVE_VALA
SUBDIRS += vala
endif
+
+-include $(top_srcdir)/git.mk
diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am
index b49c1e3..8c0fffe 100644
--- a/bindings/vala/Makefile.am
+++ b/bindings/vala/Makefile.am
@@ -74,3 +74,5 @@ all: $(vapifiles)
EXTRA_DIST = $(depsfiles) $(filesfiles_src) $(nsfiles_src) $(metadatafiles) $(vapifiles)
CLEANFILES = $(gifiles)
DISTCLEANFILES = $(vapifiles) $(filesfiles) $(nsfiles)
+
+-include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index 039bce7..a929a10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,9 +21,9 @@ AC_INIT([prj_name],
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_SRCDIR([src])
+AC_CONFIG_SRCDIR([src/grilo.h])
-AC_CONFIG_HEADERS([src/config.h])
+AC_CONFIG_HEADERS([config.h])
AC_PROG_AWK
AC_PROG_CC
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 90b17ef..1648c9d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -6,3 +6,5 @@
# Copyright (C) 2011 Igalia S.L. All rights reserved.
SUBDIRS = grilo
+
+-include $(top_srcdir)/git.mk
diff --git a/doc/grilo/.gitignore b/doc/grilo/.gitignore
deleted file mode 100644
index 047268c..0000000
--- a/doc/grilo/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-*.bak
-*.stamp
-.libs
-html
-xml
-*-un*.txt
-*.args
-*.hierarchy
-*.interfaces
-*.prerequisites
-*.signals
-*-decl-list.txt
-*-decl.txt
-*-overrides.txt
diff --git a/doc/grilo/grilo-overrides.txt b/doc/grilo/grilo-overrides.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/grilo/grilo-overrides.txt
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 6e8e8c7..2e95ff4 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -16,5 +16,4 @@ multivalues_SOURCES = multivalues.c
searching_SOURCES = searching.c
-MAINTAINERCLEANFILES = Makefile.in *~
-DISTCLEANFILES = $(MAINTAINERCLEANFILES)
+-include $(top_srcdir)/git.mk
diff --git a/git.mk b/git.mk
new file mode 100644
index 0000000..5467b86
--- /dev/null
+++ b/git.mk
@@ -0,0 +1,303 @@
+# git.mk
+#
+# Copyright 2009, Red Hat, Inc.
+# Copyright 2010,2011,2012,2013 Behdad Esfahbod
+# Written by Behdad Esfahbod
+#
+# Copying and distribution of this file, with or without modification,
+# is permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+#
+# The latest version of this file can be downloaded from:
+# https://raw.github.com/behdad/git.mk/master/git.mk
+# Bugs, etc, should be reported upstream at:
+# https://github.com/behdad/git.mk
+#
+# 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. Remember to add that line to new
+# Makefile.am files you create in your project, or just rerun the
+# "make -f 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 make targets.
+#
+# 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 and I'll diagnose.
+#
+# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
+# Makefile.am.sample in the git.mk git repo.
+#
+# 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, yelp.m4, mallard, intltool, gsettings, dejagnu.
+#
+# This makefile provides the following targets:
+#
+# - all: "make all" will build all gitignore files.
+# - gitignore: makes all gitignore files in the current dir and subdirs.
+# - .gitignore: make gitignore file for the current dir.
+# - gitignore-recurse: makes all gitignore files in the subdirs.
+#
+# 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.
+#
+
+
+
+###############################################################################
+# Variables user modules may want to add to toplevel MAINTAINERCLEANFILES:
+###############################################################################
+
+#
+# Most autotools-using modules should be fine including this variable in their
+# toplevel MAINTAINERCLEANFILES:
+GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/autoscan.log \
+ $(srcdir)/configure.scan \
+ `AUX_DIR=$(srcdir)/$$($(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' $(srcdir)/configure.ac); \
+ test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \
+ for x in \
+ ar-lib \
+ compile \
+ config.guess \
+ config.sub \
+ depcomp \
+ install-sh \
+ ltmain.sh \
+ missing \
+ mkinstalldirs \
+ ; do echo "$$AUX_DIR/$$x"; done` \
+ `$(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' $(srcdir)/configure.ac | \
+ head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done`
+#
+# All modules should also be fine including the following variable, which
+# removes automake-generated Makefile.in files:
+GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \
+ `$(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' $(srcdir)/configure.ac | \
+ while read f; do \
+ case $$f in Makefile|*/Makefile) \
+ test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \
+ done`
+#
+# Modules that use libtool /and/ use AC_CONFIG_MACRO_DIR([m4]) may also
+# include this:
+GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \
+ $(srcdir)/m4/libtool.m4 \
+ $(srcdir)/m4/ltoptions.m4 \
+ $(srcdir)/m4/ltsugar.m4 \
+ $(srcdir)/m4/ltversion.m4 \
+ $(srcdir)/m4/lt~obsolete.m4
+
+
+
+###############################################################################
+# Default rule is to install ourselves in all Makefile.am files:
+###############################################################################
+
+git-all: git-mk-install
+
+git-mk-install:
+ @echo "Installing git makefile"
+ @any_failed=; \
+ find "`test -z "$(top_srcdir)" && echo . || echo "$(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
+
+
+
+###############################################################################
+# Actual .gitignore generation:
+###############################################################################
+
+$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
+ @echo "git.mk: 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)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
+ for lc in $(DOC_LINGUAS); do \
+ for x in \
+ $(if $(DOC_MODULE),$(DOC_MODULE).xml) \
+ $(DOC_PAGES) \
+ $(DOC_INCLUDES) \
+ ; do echo "/$$lc/$$x"; done; \
+ done; \
+ for x in \
+ $(_DOC_OMF_ALL) \
+ $(_DOC_DSK_ALL) \
+ $(_DOC_HTML_ALL) \
+ $(_DOC_MOFILES) \
+ $(DOC_H_FILE) \
+ "*/.xml2po.mo" \
+ "*/*.omf.out" \
+ ; do echo /$$x; done; \
+ fi; \
+ if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \
+ for lc in $(HELP_LINGUAS); do \
+ for x in \
+ $(HELP_FILES) \
+ "$$lc.stamp" \
+ "$$lc.mo" \
+ ; do echo "/$$lc/$$x"; done; \
+ 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.in~ \
+ po/Makefile.in \
+ po/Makefile \
+ po/Makevars.template \
+ po/POTFILES \
+ po/Rules-quot \
+ po/stamp-it \
+ po/.intltool-merge-cache \
+ "po/*.gmo" \
+ "po/*.header" \
+ "po/*.mo" \
+ "po/*.sed" \
+ "po/*.sin" \
+ 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; \
+ if test "x$(DEJATOOL)" = x; then :; else \
+ for x in \
+ $(DEJATOOL) \
+ ; do echo "/$$x.sum"; echo "/$$x.log"; done; \
+ echo /site.exp; \
+ fi; \
+ if test "x$(am__dirstamp)" = x; then :; else \
+ echo "$(am__dirstamp)"; \
+ fi; \
+ if test "x$(LTCOMPILE)" = x; then :; else \
+ for x in \
+ "*.lo" \
+ ".libs" "_libs" \
+ ; do echo "$$x"; done; \
+ fi; \
+ for x in \
+ .gitignore \
+ $(GITIGNOREFILES) \
+ $(CLEANFILES) \
+ $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \
+ $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \
+ $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \
+ so_locations \
+ $(MOSTLYCLEANFILES) \
+ $(TEST_LOGS) \
+ $(TEST_LOGS:.log=.trs) \
+ $(TEST_SUITE_LOG) \
+ "*.$(OBJEXT)" \
+ $(DISTCLEANFILES) \
+ $(am__CONFIG_DISTCLEAN_FILES) \
+ $(CONFIG_CLEAN_FILES) \
+ TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
+ "*.tab.c" \
+ $(MAINTAINERCLEANFILES) \
+ $(BUILT_SOURCES) \
+ $(DEPDIR) \
+ $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \
+ $(filter %_vala.stamp,$(DIST_COMMON)) \
+ $(filter %.vapi,$(DIST_COMMON)) \
+ $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))) \
+ 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: $(srcdir)/.gitignore gitignore-recurse
+
+gitignore-recurse-maybe:
+ @for subdir in $(DIST_SUBDIRS); do \
+ case " $(SUBDIRS) " in \
+ *" $$subdir "*) :;; \
+ *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \
+ esac; \
+ done
+gitignore-recurse:
+ @for subdir in $(DIST_SUBDIRS); do \
+ test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \
+ done
+
+maintainer-clean: gitignore-clean
+gitignore-clean:
+ -rm -f $(srcdir)/.gitignore
+
+.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
diff --git a/libs/Makefile.am b/libs/Makefile.am
index 4f4da5f..1c70fbf 100644
--- a/libs/Makefile.am
+++ b/libs/Makefile.am
@@ -13,8 +13,4 @@ endif
DIST_SUBDIRS = net
-MAINTAINERCLEANFILES = \
- *.in \
- *~
-
-DISTCLEANFILES =$(MAINTAINERCLEANFILES)
+-include $(top_srcdir)/git.mk
diff --git a/libs/net/Makefile.am b/libs/net/Makefile.am
index 035477e..fcf64d4 100644
--- a/libs/net/Makefile.am
+++ b/libs/net/Makefile.am
@@ -46,14 +46,7 @@ libgrlnet_@GRL_MAJORMINOR@include_HEADERS = \
noinst_HEADERS = \
grl-net-mock-private.h
-MAINTAINERCLEANFILES = \
- *.in \
- *.gir \
- *~
-
-DISTCLEANFILES = $(MAINTAINERCLEANFILES)
-
-CLEANFILES =
+CLEANFILES = *.gir
# introspection support
if HAVE_INTROSPECTION
@@ -85,3 +78,5 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
endif
+
+-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index c277f93..f2e23d3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,6 +5,13 @@
#
# Copyright (C) 2010, 2011 Igalia S.L. All rights reserved.
+BUILT_SOURCES = \
+ grl-marshal.h \
+ grl-marshal.c \
+ grl-type-builtins.h \
+ grl-type-builtins.c \
+ $(NULL)
+
# autogenerated files
grl-marshal.h: grl-marshal.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix grl_marshal \
@@ -118,14 +125,7 @@ EXTRA_DIST = \
grl-type-builtins.h.template \
grl-type-builtins.c.template
-MAINTAINERCLEANFILES = \
- *.in \
- *.gir \
- *~
-
-DISTCLEANFILES = $(MAINTAINERCLEANFILES)
-
-CLEANFILES =
+CLEANFILES = *.gir
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
@@ -153,3 +153,5 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
endif
+
+-include $(top_srcdir)/git.mk
diff --git a/tests/.gitignore b/tests/.gitignore
deleted file mode 100644
index 615007e..0000000
--- a/tests/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-registry
-metadata_source
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 91d2bcd..be1f757 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -67,5 +67,4 @@ test-report perf-report full-report: ${TEST_PROGS}
# run make test as part of make check
check-local: test
-MAINTAINERCLEANFILES = \
- Makefile.in
+-include $(top_srcdir)/git.mk
diff --git a/tests/python/Makefile.am b/tests/python/Makefile.am
index 693ba6d..a8e91fd 100644
--- a/tests/python/Makefile.am
+++ b/tests/python/Makefile.am
@@ -21,5 +21,6 @@ endif
check-local: test
MAINTAINERCLEANFILES = \
- *.pyc \
- Makefile.in
+ *.pyc
+
+-include $(top_srcdir)/git.mk
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 788e8e4..0505c7b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -15,15 +15,6 @@ if HAVE_VALA
SUBDIRS += vala
endif
-
DIST_SUBDIRS = grilo-test-ui grilo-inspect vala
-MAINTAINERCLEANFILES = \
- *.in \
- *~
-
-DISTCLEANFILES = $(MAINTAINERCLEANFILES)
-
-
-
-
+-include $(top_srcdir)/git.mk
diff --git a/tools/grilo-inspect/.gitignore b/tools/grilo-inspect/.gitignore
deleted file mode 100644
index 35ef619..0000000
--- a/tools/grilo-inspect/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-grl-inspect
diff --git a/tools/grilo-inspect/Makefile.am b/tools/grilo-inspect/Makefile.am
index 7b93772..3ba94c8 100644
--- a/tools/grilo-inspect/Makefile.am
+++ b/tools/grilo-inspect/Makefile.am
@@ -5,6 +5,8 @@
#
# Copyright (C) 2010 Igalia S.L.
+BUILT_SOURCES = grl-core-keys.h
+
grl-inspect.c: grl-core-keys.h
grl-core-keys.h: $(top_builddir)/src/grl-metadata-key.h
@@ -31,9 +33,4 @@ grl_inspect_@GRL_MAJORMINOR@_LDADD = \
noinst_HEADERS = grl-core-keys.h
-MAINTAINERCLEANFILES = \
- grl-core-keys.h \
- *.in \
- *~
-
-DISTCLEANFILES = $(MAINTAINERCLEANFILES)
+-include $(top_srcdir)/git.mk
diff --git a/tools/grilo-test-ui/.gitignore b/tools/grilo-test-ui/.gitignore
deleted file mode 100644
index 7927fd6..0000000
--- a/tools/grilo-test-ui/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-grilo-test-ui
diff --git a/tools/grilo-test-ui/Makefile.am b/tools/grilo-test-ui/Makefile.am
index 952e2dc..353e3f9 100644
--- a/tools/grilo-test-ui/Makefile.am
+++ b/tools/grilo-test-ui/Makefile.am
@@ -39,8 +39,4 @@ grilo_test_ui_@GRL_MAJORMINOR@_LDADD += \
endif
-MAINTAINERCLEANFILES = \
- *.in \
- *~
-
-DISTCLEANFILES = $(MAINTAINERCLEANFILES)
+-include $(top_srcdir)/git.mk
diff --git a/tools/vala/Makefile.am b/tools/vala/Makefile.am
index bf83c67..20e3a70 100644
--- a/tools/vala/Makefile.am
+++ b/tools/vala/Makefile.am
@@ -33,12 +33,11 @@ grilo_simple_playlist_LDADD = \
EXTRA_DIST = $(grilo_simple_playlist_VALASOURCES) vala.stamp
-MAINTAINERCLEANFILES = \
- *.in \
- *~
-
-DISTCLEANFILES = $(MAINTAINERCLEANFILES)
+CLEANFILES = \
+ $(grilo_simple_playlist_VALASOURCES:.vala=.c)
VALA_V = $(VALA_V_$(V))
VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
VALA_V_0 = @echo " VALAC " $^;
+
+-include $(top_srcdir)/git.mk