Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 1 | # git.mk |
| 2 | # |
| 3 | # Copyright 2009, Red Hat, Inc. |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 4 | # Copyright 2010,2011,2012,2013 Behdad Esfahbod |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 5 | # Written by Behdad Esfahbod |
| 6 | # |
| 7 | # Copying and distribution of this file, with or without modification, |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 8 | # is permitted in any medium without royalty provided the copyright |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 9 | # notice and this notice are preserved. |
| 10 | # |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 11 | # The latest version of this file can be downloaded from: |
| 12 | # https://raw.github.com/behdad/git.mk/master/git.mk |
| 13 | # Bugs, etc, should be reported upstream at: |
| 14 | # https://github.com/behdad/git.mk |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 15 | # |
| 16 | # To use in your project, import this file in your git repo's toplevel, |
| 17 | # then do "make -f git.mk". This modifies all Makefile.am files in |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 18 | # your project to -include git.mk. Remember to add that line to new |
| 19 | # Makefile.am files you create in your project, or just rerun the |
| 20 | # "make -f git.mk". |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 21 | # |
| 22 | # This enables automatic .gitignore generation. If you need to ignore |
| 23 | # more files, add them to the GITIGNOREFILES variable in your Makefile.am. |
| 24 | # But think twice before doing that. If a file has to be in .gitignore, |
| 25 | # chances are very high that it's a generated file and should be in one |
| 26 | # of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. |
| 27 | # |
| 28 | # The only case that you need to manually add a file to GITIGNOREFILES is |
| 29 | # when remove files in one of mostlyclean-local, clean-local, distclean-local, |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 30 | # or maintainer-clean-local make targets. |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 31 | # |
| 32 | # Note that for files like editor backup, etc, there are better places to |
| 33 | # ignore them. See "man gitignore". |
| 34 | # |
| 35 | # If "make maintainer-clean" removes the files but they are not recognized |
| 36 | # by this script (that is, if "git status" shows untracked files still), send |
| 37 | # me the output of "git status" as well as your Makefile.am and Makefile for |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 38 | # the directories involved and I'll diagnose. |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 39 | # |
| 40 | # For a list of toplevel files that should be in MAINTAINERCLEANFILES, see |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 41 | # Makefile.am.sample in the git.mk git repo. |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 42 | # |
| 43 | # Don't EXTRA_DIST this file. It is supposed to only live in git clones, |
| 44 | # not tarballs. It serves no useful purpose in tarballs and clutters the |
| 45 | # build dir. |
| 46 | # |
| 47 | # This file knows how to handle autoconf, automake, libtool, gtk-doc, |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 48 | # gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu. |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 49 | # |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 50 | # This makefile provides the following targets: |
| 51 | # |
| 52 | # - all: "make all" will build all gitignore files. |
| 53 | # - gitignore: makes all gitignore files in the current dir and subdirs. |
| 54 | # - .gitignore: make gitignore file for the current dir. |
| 55 | # - gitignore-recurse: makes all gitignore files in the subdirs. |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 56 | # |
| 57 | # KNOWN ISSUES: |
| 58 | # |
| 59 | # - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the |
| 60 | # submodule doesn't find us. If you have configure.{in,ac} files in |
| 61 | # subdirs, add a proxy git.mk file in those dirs that simply does: |
| 62 | # "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. |
| 63 | # And add those files to git. See vte/gnome-pty-helper/git.mk for |
| 64 | # example. |
| 65 | # |
| 66 | |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 67 | |
| 68 | |
| 69 | ############################################################################### |
| 70 | # Variables user modules may want to add to toplevel MAINTAINERCLEANFILES: |
| 71 | ############################################################################### |
| 72 | |
| 73 | # |
| 74 | # Most autotools-using modules should be fine including this variable in their |
| 75 | # toplevel MAINTAINERCLEANFILES: |
| 76 | GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ |
| 77 | $(srcdir)/aclocal.m4 \ |
| 78 | $(srcdir)/autoscan.log \ |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 79 | $(srcdir)/configure.scan \ |
Behdad Esfahbod | dddf990 | 2013-08-26 17:58:25 -0400 | [diff] [blame] | 80 | `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \ |
Behdad Esfahbod | 627af69 | 2013-08-06 16:53:56 -0400 | [diff] [blame] | 81 | test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \ |
| 82 | for x in \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 83 | ar-lib \ |
| 84 | compile \ |
| 85 | config.guess \ |
| 86 | config.sub \ |
| 87 | depcomp \ |
| 88 | install-sh \ |
| 89 | ltmain.sh \ |
| 90 | missing \ |
| 91 | mkinstalldirs \ |
Behdad Esfahbod | 6b4fdde | 2013-09-30 13:48:19 -0400 | [diff] [blame] | 92 | test-driver \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 93 | ; do echo "$$AUX_DIR/$$x"; done` \ |
Behdad Esfahbod | dddf990 | 2013-08-26 17:58:25 -0400 | [diff] [blame] | 94 | `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 95 | head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done` |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 96 | # |
| 97 | # All modules should also be fine including the following variable, which |
| 98 | # removes automake-generated Makefile.in files: |
| 99 | GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \ |
Behdad Esfahbod | dddf990 | 2013-08-26 17:58:25 -0400 | [diff] [blame] | 100 | `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \ |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 101 | while read f; do \ |
| 102 | case $$f in Makefile|*/Makefile) \ |
| 103 | test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \ |
| 104 | done` |
| 105 | # |
Behdad Esfahbod | 6b4fdde | 2013-09-30 13:48:19 -0400 | [diff] [blame] | 106 | # Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this, |
| 107 | # though it's harmless to include regardless. |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 108 | GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ |
Behdad Esfahbod | 6b4fdde | 2013-09-30 13:48:19 -0400 | [diff] [blame] | 109 | `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ |
| 110 | if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ |
| 111 | for x in \ |
| 112 | libtool.m4 \ |
| 113 | ltoptions.m4 \ |
| 114 | ltsugar.m4 \ |
| 115 | ltversion.m4 \ |
| 116 | lt~obsolete.m4 \ |
| 117 | ; do echo "$$MACRO_DIR/$$x"; done; \ |
| 118 | fi` |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 119 | |
| 120 | |
| 121 | |
| 122 | ############################################################################### |
| 123 | # Default rule is to install ourselves in all Makefile.am files: |
| 124 | ############################################################################### |
| 125 | |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 126 | git-all: git-mk-install |
| 127 | |
| 128 | git-mk-install: |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 129 | @echo "Installing git makefile" |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 130 | @any_failed=; \ |
| 131 | find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 132 | if grep 'include .*/git.mk' $$x >/dev/null; then \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 133 | echo "$$x already includes git.mk"; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 134 | else \ |
| 135 | failed=; \ |
| 136 | echo "Updating $$x"; \ |
| 137 | { cat $$x; \ |
| 138 | echo ''; \ |
| 139 | echo '-include $$(top_srcdir)/git.mk'; \ |
| 140 | } > $$x.tmp || failed=1; \ |
| 141 | if test x$$failed = x; then \ |
| 142 | mv $$x.tmp $$x || failed=1; \ |
| 143 | fi; \ |
| 144 | if test x$$failed = x; then : else \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 145 | echo "Failed updating $$x"; >&2 \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 146 | any_failed=1; \ |
| 147 | fi; \ |
| 148 | fi; done; test -z "$$any_failed" |
| 149 | |
| 150 | .PHONY: git-all git-mk-install |
| 151 | |
| 152 | |
Behdad Esfahbod | 22c625a | 2013-03-04 20:56:15 -0500 | [diff] [blame] | 153 | |
| 154 | ############################################################################### |
| 155 | # Actual .gitignore generation: |
| 156 | ############################################################################### |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 157 | |
| 158 | $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 159 | @echo "git.mk: Generating $@" |
| 160 | @{ \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 161 | if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ |
| 162 | for x in \ |
| 163 | $(DOC_MODULE)-decl-list.txt \ |
| 164 | $(DOC_MODULE)-decl.txt \ |
| 165 | tmpl/$(DOC_MODULE)-unused.sgml \ |
| 166 | "tmpl/*.bak" \ |
| 167 | xml html \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 168 | ; do echo "/$$x"; done; \ |
Behdad Esfahbod | dddf990 | 2013-08-26 17:58:25 -0400 | [diff] [blame] | 169 | FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \ |
| 170 | case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 171 | fi; \ |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 172 | if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 173 | for lc in $(DOC_LINGUAS); do \ |
| 174 | for x in \ |
| 175 | $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ |
| 176 | $(DOC_PAGES) \ |
| 177 | $(DOC_INCLUDES) \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 178 | ; do echo "/$$lc/$$x"; done; \ |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 179 | done; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 180 | for x in \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 181 | $(_DOC_OMF_ALL) \ |
| 182 | $(_DOC_DSK_ALL) \ |
| 183 | $(_DOC_HTML_ALL) \ |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 184 | $(_DOC_MOFILES) \ |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 185 | $(DOC_H_FILE) \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 186 | "*/.xml2po.mo" \ |
| 187 | "*/*.omf.out" \ |
| 188 | ; do echo /$$x; done; \ |
| 189 | fi; \ |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 190 | if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 191 | for lc in $(HELP_LINGUAS); do \ |
| 192 | for x in \ |
| 193 | $(HELP_FILES) \ |
| 194 | "$$lc.stamp" \ |
| 195 | "$$lc.mo" \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 196 | ; do echo "/$$lc/$$x"; done; \ |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 197 | done; \ |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 198 | fi; \ |
| 199 | if test "x$(gsettings_SCHEMAS)" = x; then :; else \ |
| 200 | for x in \ |
| 201 | $(gsettings_SCHEMAS:.xml=.valid) \ |
| 202 | $(gsettings__enum_file) \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 203 | ; do echo "/$$x"; done; \ |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 204 | fi; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 205 | if test -f $(srcdir)/po/Makefile.in.in; then \ |
| 206 | for x in \ |
| 207 | po/Makefile.in.in \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 208 | po/Makefile.in.in~ \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 209 | po/Makefile.in \ |
| 210 | po/Makefile \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 211 | po/Makevars.template \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 212 | po/POTFILES \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 213 | po/Rules-quot \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 214 | po/stamp-it \ |
| 215 | po/.intltool-merge-cache \ |
| 216 | "po/*.gmo" \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 217 | "po/*.header" \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 218 | "po/*.mo" \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 219 | "po/*.sed" \ |
| 220 | "po/*.sin" \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 221 | po/$(GETTEXT_PACKAGE).pot \ |
| 222 | intltool-extract.in \ |
| 223 | intltool-merge.in \ |
| 224 | intltool-update.in \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 225 | ; do echo "/$$x"; done; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 226 | fi; \ |
| 227 | if test -f $(srcdir)/configure; then \ |
| 228 | for x in \ |
| 229 | autom4te.cache \ |
| 230 | configure \ |
| 231 | config.h \ |
| 232 | stamp-h1 \ |
| 233 | libtool \ |
| 234 | config.lt \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 235 | ; do echo "/$$x"; done; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 236 | fi; \ |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 237 | if test "x$(DEJATOOL)" = x; then :; else \ |
| 238 | for x in \ |
| 239 | $(DEJATOOL) \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 240 | ; do echo "/$$x.sum"; echo "/$$x.log"; done; \ |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 241 | echo /site.exp; \ |
| 242 | fi; \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 243 | if test "x$(am__dirstamp)" = x; then :; else \ |
| 244 | echo "$(am__dirstamp)"; \ |
| 245 | fi; \ |
Behdad Esfahbod | dddf990 | 2013-08-26 17:58:25 -0400 | [diff] [blame] | 246 | if test "x$(LTCOMPILE)" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 247 | for x in \ |
| 248 | "*.lo" \ |
| 249 | ".libs" "_libs" \ |
| 250 | ; do echo "$$x"; done; \ |
| 251 | fi; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 252 | for x in \ |
| 253 | .gitignore \ |
| 254 | $(GITIGNOREFILES) \ |
| 255 | $(CLEANFILES) \ |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 256 | $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ |
| 257 | $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ |
| 258 | $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 259 | so_locations \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 260 | $(MOSTLYCLEANFILES) \ |
Behdad Esfahbod | dddf990 | 2013-08-26 17:58:25 -0400 | [diff] [blame] | 261 | $(TEST_LOGS) \ |
| 262 | $(TEST_LOGS:.log=.trs) \ |
| 263 | $(TEST_SUITE_LOG) \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 264 | "*.$(OBJEXT)" \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 265 | $(DISTCLEANFILES) \ |
| 266 | $(am__CONFIG_DISTCLEAN_FILES) \ |
| 267 | $(CONFIG_CLEAN_FILES) \ |
| 268 | TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ |
| 269 | "*.tab.c" \ |
| 270 | $(MAINTAINERCLEANFILES) \ |
| 271 | $(BUILT_SOURCES) \ |
| 272 | $(DEPDIR) \ |
Behdad Esfahbod | dddf990 | 2013-08-26 17:58:25 -0400 | [diff] [blame] | 273 | $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \ |
| 274 | $(filter %_vala.stamp,$(DIST_COMMON)) \ |
| 275 | $(filter %.vapi,$(DIST_COMMON)) \ |
Behdad Esfahbod | 95d18a7 | 2013-12-04 20:01:22 -0500 | [diff] [blame] | 276 | $(filter %$(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))),$(DIST_COMMON)) \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 277 | Makefile \ |
| 278 | Makefile.in \ |
| 279 | "*.orig" \ |
| 280 | "*.rej" \ |
| 281 | "*.bak" \ |
| 282 | "*~" \ |
| 283 | ".*.sw[nop]" \ |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 284 | ".dirstamp" \ |
Behdad Esfahbod | 36a661c | 2013-04-11 13:38:37 -0400 | [diff] [blame] | 285 | ; do echo "/$$x"; done; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 286 | } | \ |
| 287 | sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ |
| 288 | sed 's@/[.]/@/@g' | \ |
| 289 | LC_ALL=C sort | uniq > $@.tmp && \ |
| 290 | mv $@.tmp $@; |
| 291 | |
| 292 | all: $(srcdir)/.gitignore gitignore-recurse-maybe |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 293 | gitignore: $(srcdir)/.gitignore gitignore-recurse |
| 294 | |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 295 | gitignore-recurse-maybe: |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 296 | @for subdir in $(DIST_SUBDIRS); do \ |
| 297 | case " $(SUBDIRS) " in \ |
| 298 | *" $$subdir "*) :;; \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 299 | *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \ |
Behdad Esfahbod | bee74ef | 2012-01-27 02:14:08 -0500 | [diff] [blame] | 300 | esac; \ |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 301 | done |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 302 | gitignore-recurse: |
| 303 | @for subdir in $(DIST_SUBDIRS); do \ |
Behdad Esfahbod | 7222527 | 2013-08-06 15:19:23 -0400 | [diff] [blame] | 304 | test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \ |
Behdad Esfahbod | 6efe1ec | 2012-07-11 15:30:08 -0400 | [diff] [blame] | 305 | done |
Behdad Esfahbod | 29aa400 | 2009-11-02 16:28:39 -0500 | [diff] [blame] | 306 | |
| 307 | maintainer-clean: gitignore-clean |
| 308 | gitignore-clean: |
| 309 | -rm -f $(srcdir)/.gitignore |
| 310 | |
| 311 | .PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe |