1 ## Process this file with automake to produce Makefile.in
3 ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
19 po-windows-installer \
43 pkgconfigdir = $(libdir)/pkgconfig
45 gimp-@GIMP_PKGCONFIG_VERSION@.pc \
46 gimpthumb-@GIMP_PKGCONFIG_VERSION@.pc \
47 gimpui-@GIMP_PKGCONFIG_VERSION@.pc
50 AUTHORS: authors.xml authors.xsl
52 $(XSLTPROC) -o $(@) $(top_srcdir)/authors.xsl $< || rm -f $(@)
55 authors.md: authors.xml authors4gimp-web.xsl
57 $(XSLTPROC) --stringparam today "`date --iso-8601=seconds`" -o $(@) $(top_srcdir)/authors4gimp-web.xsl $< || rm -f $(@)
92 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
96 @$(PYTHON) $(top_srcdir)/tools/defcheck.py $(top_srcdir) || \
97 ( echo "*** .def files inconsistent ***"; exit 1; )
102 $(XMLLINT) --noout --valid authors.xml || \
103 ( echo "*** authors.xml INVALID ***"; exit 1; )
108 dist-hook: check-defs validate-authors
112 CHANGELOG_START = 74424325abb54620b370f2595445b2b2a19fe5e7
114 ChangeLog: $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-git
116 @echo Creating $@ based on git log
117 @if test -d "$(srcdir)/.git"; then \
118 (GIT_DIR=$(top_srcdir)/.git ./missing --run \
119 git log $(CHANGELOG_START)^.. --stat) | fmt --split-only > $@.tmp \
120 && mv -f $@.tmp $@ && echo Appending ChangeLog.pre-git && cat ChangeLog.pre-git >> $@ \
122 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
123 (test -f $@ || echo git-log is required to generate this file >> $@)); \
126 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
127 echo A git checkout and git-log is required to generate this file >> $@); \
129 .PHONY: $(srcdir)/ChangeLog
131 generated_sources = \
134 # Build git-version.h before anything in the subdirs as this is needed
135 # in the about and debug dialog (app/) and in the debug tool (tools/).
136 BUILT_SOURCES = $(generated_sources)
138 CLEANFILES = $(generated_sources)
140 # If git is available, always check if git-version.h should be
141 # updated. If git is not available, don't do anything if git-version.h
142 # already exists because then we are probably working with a tarball
143 # in which case the git-version.h we ship is correct.
144 git-version.h: update-git-version-header
145 @if test -e "$(top_srcdir)/.git"; then \
146 git_version="`git --git-dir=$(top_srcdir)/.git describe --always`"; \
147 git_version_abbrev="`git --git-dir=$(top_srcdir)/.git rev-parse --short HEAD`"; \
148 git_last_commit_year="`git --git-dir=$(top_srcdir)/.git log -n1 --reverse --pretty=%ci | cut -b 1-4`"; \
149 elif test ! -f "$@"; then \
150 git_version="Unknown, shouldn't happen"; \
151 git_version_abbrev="$$git_version"; \
152 git_last_commit_timestamp=-1; \
153 git_last_commit_year="`date -u '+%Y'`"; \
155 if test -n "$$git_version"; then \
156 echo "#ifndef __GIT_VERSION_H__" > "$@.tmp"; \
157 echo "#define __GIT_VERSION_H__" >> "$@.tmp"; \
158 echo "#define GIMP_GIT_VERSION \"$$git_version\"" >> "$@.tmp"; \
159 echo "#define GIMP_GIT_VERSION_ABBREV \"$$git_version_abbrev\"" >> "$@.tmp"; \
160 echo "#define GIMP_GIT_LAST_COMMIT_YEAR \"$$git_last_commit_year\"" >> "$@.tmp"; \
161 echo "#endif /* __GIT_VERSION_H__ */" >> "$@.tmp"; \
163 @if ( test -f "$@.tmp" && test -f "$@" && cmp "$@.tmp" "$@" > /dev/null ); then \
165 elif test -f "$@.tmp"; then \
167 echo " git HEAD changed: $@ regenerated"; \
170 .PHONY: update-git-version-header