[libvtemm] Added git.mk



commit a7970b99ea01a5b1a46eb9aa88e70e9f982e665f
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Sun May 10 21:34:04 2009 +0200

    Added git.mk
    
    git.mk: added.
    */Makefile.am: automagically added git.mk inclusion.
---
 Makefile.am                         |    2 +
 docs/Makefile.am                    |    2 +
 docs/reference/Makefile.am          |    2 +
 examples/Makefile.am                |    2 +
 examples/simple/Makefile.am         |    2 +
 git.mk                              |  182 +++++++++++++++++++++++++++++++++++
 old_news_and_changelogs/Makefile.am |    2 +
 scripts/Makefile.am                 |    2 +
 src/Makefile.am                     |    2 +
 src/libvtemm/Makefile.am            |    2 +
 src/libvtemm/g/Makefile.am          |    2 +
 src/libvtemm/private/Makefile.am    |    2 +
 tools/Makefile.am                   |    2 +
 tools/extra_defs_gen/Makefile.am    |    2 +
 tools/m4/Makefile.am                |    2 +
 15 files changed, 210 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 182f26f..d3b1392 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,3 +26,5 @@ dist-hook:
 	echo "**********************************************************"; \
 	echo; echo
 
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 51570ee..cc87b63 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -7,3 +7,5 @@ if BUILD_REFERENCE
 SUBDIRS = reference
 endif
 DIST_SUBDIRS = reference
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index d3577b0..f3991b1 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -58,3 +58,5 @@ uninstall-local: uninstall-reference
 # In doxywizard, disable EXTRACT_ALL to get warnings about undocumented methods.
 doxygen-warnings: html-clean html/index.html
 
+
+-include $(top_srcdir)/git.mk
diff --git a/examples/Makefile.am b/examples/Makefile.am
index bee0dff..34252df 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -6,3 +6,5 @@ SUBDIRS = simple
 EXTRA_DIST = Makefile.am_fragment README
 
 
+
+-include $(top_srcdir)/git.mk
diff --git a/examples/simple/Makefile.am b/examples/simple/Makefile.am
index 66ea847..d135e16 100644
--- a/examples/simple/Makefile.am
+++ b/examples/simple/Makefile.am
@@ -6,3 +6,5 @@ noinst_PROGRAMS = example
 example_SOURCES = main.cc simple.cc simple.h
 
 
+
+-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/old_news_and_changelogs/Makefile.am b/old_news_and_changelogs/Makefile.am
index 820f47a..07dcd57 100644
--- a/old_news_and_changelogs/Makefile.am
+++ b/old_news_and_changelogs/Makefile.am
@@ -3,3 +3,5 @@
 
 EXTRA_DIST = NEWS-0.16 NEWS-0.17 NEWS-0.19 ChangeLog-0.16 ChangeLog-0.17
 	ChangeLog-0.19
+
+-include $(top_srcdir)/git.mk
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 8afa2a7..aec470d 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1 +1,3 @@
 EXTRA_DIST = macros.m4
+
+-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index 771a07a..9ee8605 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,3 +16,5 @@ libvtemm_config_DATA = $(sublib_name)config.h
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(sublib_libname).pc
 
+
+-include $(top_srcdir)/git.mk
diff --git a/src/libvtemm/Makefile.am b/src/libvtemm/Makefile.am
index cb9f796..a62919a 100644
--- a/src/libvtemm/Makefile.am
+++ b/src/libvtemm/Makefile.am
@@ -62,3 +62,5 @@ libvtemm_1_0_la_LIBADD = @LIBVTEMM_LIBS@
 #
 # end of "should be shared"
 # # # #
+
+-include $(top_srcdir)/git.mk
diff --git a/src/libvtemm/g/Makefile.am b/src/libvtemm/g/Makefile.am
index 3a53fe2..6648602 100644
--- a/src/libvtemm/g/Makefile.am
+++ b/src/libvtemm/g/Makefile.am
@@ -13,3 +13,5 @@ files_ccg = $(files_hg:.hg=.ccg)
 
 EXTRA_DIST = $(files_defs) $(files_hg) $(files_ccg) Makefile_defs.am_fragment \
 	Makefile_list_of_hg.am_fragment
+
+-include $(top_srcdir)/git.mk
diff --git a/src/libvtemm/private/Makefile.am b/src/libvtemm/private/Makefile.am
index 8afde68..a49e016 100644
--- a/src/libvtemm/private/Makefile.am
+++ b/src/libvtemm/private/Makefile.am
@@ -14,3 +14,5 @@ include $(top_srcdir)/src/Makefile_sublib.am_fragment
 private_includedir = $(includedir)/$(sublib_libname)/$(sublib_name)/private
 private_include_HEADERS = $(generated_sources_private)
 
+
+-include $(top_srcdir)/git.mk
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 135803e..d417e4d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -5,3 +5,5 @@ include $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment
 EXTRA_DIST = $(files_tools_perl) $(files_tools_pm) \
 	Makefile_list_of_sources.am_fragment
 
+
+-include $(top_srcdir)/git.mk
diff --git a/tools/extra_defs_gen/Makefile.am b/tools/extra_defs_gen/Makefile.am
index 67ce964..86d388a 100644
--- a/tools/extra_defs_gen/Makefile.am
+++ b/tools/extra_defs_gen/Makefile.am
@@ -6,3 +6,5 @@ LIBS = @LIBVTEMM_LIBS@ -lglibmm_generate_extra_defs-2.4
 
 noinst_PROGRAMS = generate_extra_defs
 generate_extra_defs_SOURCES = generate_defs_vte.cc
+
+-include $(top_srcdir)/git.mk
diff --git a/tools/m4/Makefile.am b/tools/m4/Makefile.am
index 0106908..285339a 100644
--- a/tools/m4/Makefile.am
+++ b/tools/m4/Makefile.am
@@ -6,3 +6,5 @@ EXTRA_DIST = $(files_tools_m4) Makefile_list_of_sources.am_fragment
 
 tools_m4_includedir = $(libdir)/@LIBVTEMM_PACKAGE_NAME -@LIBVTEMM_API_VERSION@/proc/m4
 tools_m4_include_HEADERS = $(files_tools_m4)
+
+-include $(top_srcdir)/git.mk



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