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