[gnome-packagekit] Use git.mk



commit bcbb8abfe6696d5e06495a417c2fe4d41b7c77f8
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jul 19 10:24:22 2016 +0100

    Use git.mk

 .gitignore                                 |   39 ------
 Makefile.am                                |   24 ++++
 configure.ac                               |    4 -
 data/.gitignore                            |   19 ---
 data/Makefile.am                           |    1 +
 data/appdata/.gitignore                    |    1 -
 data/appdata/Makefile.am                   |    2 +-
 data/icons/16x16/Makefile.am               |    1 +
 data/icons/16x16/categories/Makefile.am    |    1 +
 data/icons/16x16/status/Makefile.am        |    2 +-
 data/icons/22x22/Makefile.am               |    1 +
 data/icons/22x22/categories/Makefile.am    |    1 +
 data/icons/22x22/status/Makefile.am        |    2 +
 data/icons/24x24/Makefile.am               |    1 +
 data/icons/24x24/categories/Makefile.am    |    2 +
 data/icons/24x24/status/Makefile.am        |    2 +-
 data/icons/48x48/Makefile.am               |    1 +
 data/icons/48x48/categories/Makefile.am    |    2 +
 data/icons/48x48/status/Makefile.am        |    2 +-
 data/icons/Makefile.am                     |    1 +
 data/icons/scalable/Makefile.am            |    1 +
 data/icons/scalable/categories/Makefile.am |    2 +
 data/icons/scalable/status/Makefile.am     |    2 +-
 git.mk                                     |  200 ++++++++++++++++++++++++++++
 m4/.gitignore                              |    1 +
 man/.gitignore                             |    5 -
 man/Makefile.am                            |    3 +
 src/.gitignore                             |   35 -----
 src/Makefile.am                            |    3 +-
 29 files changed, 252 insertions(+), 109 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 219dabb..59331a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,28 @@ DISTCLEANFILES =                                     \
 
 DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
 
+MAINTAINERCLEANFILES =                                 \
+       *~                                              \
+       aclocal.m4                                      \
+       compile                                         \
+       config.guess                                    \
+       config.h.*                                      \
+       config.sub                                      \
+       configure                                       \
+       depcomp                                         \
+       gtk-doc.make                                    \
+       INSTALL                                         \
+       install-sh                                      \
+       ltmain.sh                                       \
+       Makefile.in                                     \
+       missing                                         \
+       mkinstalldirs                                   \
+       NEWS                                            \
+       test-driver
+
+CLEANFILES =                                           \
+       ChangeLog
+
 distclean-local:
        if test $(srdcir) = .; then :; else \
                rm -f ChangeLog; \
@@ -56,3 +78,5 @@ NEWS: data/appdata/*.appdata.xml
        fi
 
 .PHONY: ChangeLog NEWS
+
+-include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index 5f743d5..015c992 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,16 +209,12 @@ data/icons/22x22/Makefile
 data/icons/24x24/Makefile
 data/icons/48x48/Makefile
 data/icons/scalable/Makefile
-data/icons/16x16/animations/Makefile
 data/icons/16x16/categories/Makefile
 data/icons/16x16/status/Makefile
-data/icons/22x22/animations/Makefile
 data/icons/22x22/categories/Makefile
 data/icons/22x22/status/Makefile
-data/icons/24x24/animations/Makefile
 data/icons/24x24/categories/Makefile
 data/icons/24x24/status/Makefile
-data/icons/48x48/animations/Makefile
 data/icons/48x48/categories/Makefile
 data/icons/48x48/status/Makefile
 data/icons/scalable/categories/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index e8ececa..78044a9 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -41,3 +41,4 @@ DISTCLEANFILES =                                      \
        org.gnome.PackageUpdater.desktop                \
        $(NULL)
 
+-include $(top_srcdir)/git.mk
diff --git a/data/appdata/Makefile.am b/data/appdata/Makefile.am
index a801816..26a5301 100644
--- a/data/appdata/Makefile.am
+++ b/data/appdata/Makefile.am
@@ -7,4 +7,4 @@ appdata_in_files =                                      \
 EXTRA_DIST = $(appdata_in_files)
 CLEANFILES = $(appdata_DATA)
 
-
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am
index ca8a905..44b30d4 100644
--- a/data/icons/16x16/Makefile.am
+++ b/data/icons/16x16/Makefile.am
@@ -1,2 +1,3 @@
 SUBDIRS = categories status
 
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/categories/Makefile.am b/data/icons/16x16/categories/Makefile.am
index eb10379..308ddc3 100644
--- a/data/icons/16x16/categories/Makefile.am
+++ b/data/icons/16x16/categories/Makefile.am
@@ -14,3 +14,4 @@ noinst_DATA =
 EXTRA_DIST =           \
        $(icons_DATA)
 
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/status/Makefile.am b/data/icons/16x16/status/Makefile.am
index b526e4f..9fd58e7 100644
--- a/data/icons/16x16/status/Makefile.am
+++ b/data/icons/16x16/status/Makefile.am
@@ -41,4 +41,4 @@ install-data-hook:
 EXTRA_DIST =                           \
        $(icons_DATA)
 
-
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/Makefile.am b/data/icons/22x22/Makefile.am
index ca8a905..44b30d4 100644
--- a/data/icons/22x22/Makefile.am
+++ b/data/icons/22x22/Makefile.am
@@ -1,2 +1,3 @@
 SUBDIRS = categories status
 
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/categories/Makefile.am b/data/icons/22x22/categories/Makefile.am
index d4bd804..4e5b37b 100644
--- a/data/icons/22x22/categories/Makefile.am
+++ b/data/icons/22x22/categories/Makefile.am
@@ -14,3 +14,4 @@ noinst_DATA =
 EXTRA_DIST =           \
        $(icons_DATA)
 
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/status/Makefile.am b/data/icons/22x22/status/Makefile.am
index 20925d8..a3e6940 100644
--- a/data/icons/22x22/status/Makefile.am
+++ b/data/icons/22x22/status/Makefile.am
@@ -41,4 +41,6 @@ install-data-hook:
 EXTRA_DIST =                           \
        $(icons_DATA)
 
+-include $(top_srcdir)/git.mk
+
 
diff --git a/data/icons/24x24/Makefile.am b/data/icons/24x24/Makefile.am
index ca8a905..44b30d4 100644
--- a/data/icons/24x24/Makefile.am
+++ b/data/icons/24x24/Makefile.am
@@ -1,2 +1,3 @@
 SUBDIRS = categories status
 
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/24x24/categories/Makefile.am b/data/icons/24x24/categories/Makefile.am
index aaa7666..6e2f825 100644
--- a/data/icons/24x24/categories/Makefile.am
+++ b/data/icons/24x24/categories/Makefile.am
@@ -14,3 +14,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 dfb2df8..2de1707 100644
--- a/data/icons/24x24/status/Makefile.am
+++ b/data/icons/24x24/status/Makefile.am
@@ -41,4 +41,4 @@ install-data-hook:
 EXTRA_DIST =                           \
        $(icons_DATA)
 
-
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/48x48/Makefile.am b/data/icons/48x48/Makefile.am
index ca8a905..44b30d4 100644
--- a/data/icons/48x48/Makefile.am
+++ b/data/icons/48x48/Makefile.am
@@ -1,2 +1,3 @@
 SUBDIRS = categories status
 
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/48x48/categories/Makefile.am b/data/icons/48x48/categories/Makefile.am
index 8b5fb33..31c0e19 100644
--- a/data/icons/48x48/categories/Makefile.am
+++ b/data/icons/48x48/categories/Makefile.am
@@ -14,3 +14,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 81de9ea..0e20caa 100644
--- a/data/icons/48x48/status/Makefile.am
+++ b/data/icons/48x48/status/Makefile.am
@@ -41,4 +41,4 @@ install-data-hook:
 EXTRA_DIST =                           \
        $(icons_DATA)
 
-
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 0d0c052..21fb3b5 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 ca8a905..44b30d4 100644
--- a/data/icons/scalable/Makefile.am
+++ b/data/icons/scalable/Makefile.am
@@ -1,2 +1,3 @@
 SUBDIRS = categories status
 
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/scalable/categories/Makefile.am b/data/icons/scalable/categories/Makefile.am
index dc436de..2cd35b7 100644
--- a/data/icons/scalable/categories/Makefile.am
+++ b/data/icons/scalable/categories/Makefile.am
@@ -14,3 +14,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 9fb357d..c401a0c 100644
--- a/data/icons/scalable/status/Makefile.am
+++ b/data/icons/scalable/status/Makefile.am
@@ -41,4 +41,4 @@ install-data-hook:
 EXTRA_DIST =                           \
        $(icons_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 6abdf1c..7df6b4a 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -27,8 +27,11 @@ gpk-log.1: gpk-log.sgml
        docbook2man $? > /dev/null
 endif
 
+CLEANFILES = $(man_MANS) *.links *.log *.refs
+
 clean-local :
        rm -f *~
        rm -f *.1
        rm -f manpage.*
 
+-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index ef4ad38..bc3f915 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -213,10 +213,11 @@ clean-local:
        rm -f gcov.txt
        rm -f gprof.txt
 
-CLEANFILES = *~ $(BUILT_SOURCES)
+CLEANFILES = *~ $(BUILT_SOURCES) $(noinst_LIBRARIES)
 
 MAINTAINERCLEANFILES =                                 \
        *~                                              \
        Makefile.in                                     \
        $(NULL)
 
+-include $(top_srcdir)/git.mk


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