[gnome-video-arcade] Use Behdad's git.mk to generate .gitignore files.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-video-arcade] Use Behdad's git.mk to generate .gitignore files.
- Date: Tue, 2 Jun 2009 12:48:29 -0400 (EDT)
commit ca04038c8f819f97eb0db4acdcda8f6ebf375930
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jun 2 12:44:55 2009 -0400
Use Behdad's git.mk to generate .gitignore files.
Also, add several generated build files to MAINTAINERCLEANFILES.
---
.gitignore | 26 -----
INSTALL | 236 --------------------------------------------
Makefile.am | 26 ++++-
data/.gitignore | 1 -
data/Makefile.am | 2 +
docs/Makefile.am | 2 +
docs/reference/.gitignore | 15 ---
docs/reference/Makefile.am | 2 +
git.mk | 178 +++++++++++++++++++++++++++++++++
help/.gitignore | 1 -
help/Makefile.am | 2 +
maint/Makefile.am | 2 +
po/.gitignore | 4 -
src/.gitignore | 1 -
src/Makefile.am | 2 +
15 files changed, 211 insertions(+), 289 deletions(-)
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 82a293b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,26 +0,0 @@
-# for all subdirectories
-Makefile.in
-Makefile
-.libs
-.deps
-*.o
-*.lo
-*.la
-.*.swp
-
-# autofoo stuff here
-aclocal.m4
-autom4te.cache
-compile
-config.*
-configure
-depcomp
-gnome-doc-utils.make
-gtk-doc.make
-install-sh
-intltool-*.in
-libtool
-ltmain.sh
-missing
-mkinstalldirs
-stamp-*
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 23e5f25..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,236 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-These are generic installation instructions.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. (Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.)
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
-
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
- 4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-Compilers and Options
-=====================
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory. After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
-
-Installation Names
-==================
-
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script). Here is a another example:
-
- /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
-
-`configure' Invocation
-======================
-
-`configure' recognizes the following options to control how it operates.
-
-`--help'
-`-h'
- Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
-
diff --git a/Makefile.am b/Makefile.am
index 2572a34..fa0d6fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,12 +14,28 @@ EXTRA_DIST = \
intltool-update.in \
mkinstalldirs
-DISTCLEANFILES = \
- gnome-doc-utils.make \
- intltool-extract \
- intltool-merge \
- intltool-update
+MAINTAINERCLEANFILES = \
+ $(srcdir)/INSTALL \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/autoscan.log \
+ $(srcdir)/compile \
+ $(srcdir)/config.guess \
+ $(srcdir)/config.h.in \
+ $(srcdir)/config.sub \
+ $(srcdir)/configure.scan \
+ $(srcdir)/depcomp \
+ $(srcdir)/install-sh \
+ $(srcdir)/ltmain.sh \
+ $(srcdir)/missing \
+ $(srcdir)/mkinstalldirs \
+ $(srcdir)/omf.make \
+ $(srcdir)/xmldocs.make \
+ $(srcdir)/gtk-doc.make \
+ $(srcdir)/gnome-doc-utils.make \
+ `find "$(srcdir)" -type -f -name Makefile.in -print`
DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc \
--disable-scrollkeeper
+
+-include $(top_srcdir)/git.mk
diff --git a/data/.gitignore b/data/.gitignore
deleted file mode 100644
index 81a5236..0000000
--- a/data/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-gnome-video-arcade.desktop
diff --git a/data/Makefile.am b/data/Makefile.am
index 3b1ee29..0154b9a 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -49,3 +49,5 @@ DISTCLEANFILES = \
MAINTAINERCLEANFILES = \
gnome-video-arcade.glade.bak \
gnome-video-arcade.gladep.bak
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/Makefile.am b/docs/Makefile.am
index a521678..c269f10 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -5,3 +5,5 @@ SUBDIRS = reference
man_MANS = gnome-video-arcade.1
EXTRA_DIST = $(man_MANS)
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/reference/.gitignore b/docs/reference/.gitignore
deleted file mode 100644
index 45c18bb..0000000
--- a/docs/reference/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-*-decl-list.txt
-*-decl.txt
-*-unused.txt
-*-undocumented.txt
-*-undeclared.txt
-*.args
-*.hierarchy
-*.interfaces
-*.prerequisites
-*.signals
-*.stamp
-html
-xml
-*.bak
-version.xml
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 9b053d1..f8d016b 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -126,3 +126,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..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/help/.gitignore b/help/.gitignore
deleted file mode 100644
index e8a71e0..0000000
--- a/help/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.omf
diff --git a/help/Makefile.am b/help/Makefile.am
index 249da97..6706110 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -16,3 +16,5 @@ DOC_FIGURES = \
figures/gva_search_window.png
DOC_LINGUAS = de sv
+
+-include $(top_srcdir)/git.mk
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index e69de29..0000000
diff --git a/maint/Makefile.am b/maint/Makefile.am
index 1fe5612..ff7a80f 100644
--- a/maint/Makefile.am
+++ b/maint/Makefile.am
@@ -31,3 +31,5 @@ libgladegva_la_LIBADD = \
EXTRA_DIST = \
$(gladecatalog_DATA) \
$(gladepixmap_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/po/.gitignore b/po/.gitignore
deleted file mode 100644
index 98ea2e1..0000000
--- a/po/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-POTFILES
-*.gmo
-.intltool-merge-cache
-Makefile.in.in
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 06e8b18..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-gnome-video-arcade
diff --git a/src/Makefile.am b/src/Makefile.am
index 2126b7a..d952351 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -95,3 +95,5 @@ gnome_video_arcade_LDADD = \
gnome_video_arcade_DEPENDENCIES = \
@MAME_BACKEND@
+
+-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]