forked from joshgiesbrecht/Glimpse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
157 lines (133 loc) · 4.11 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
if WITH_PDBGEN
PDB = pdb
endif
SUBDIRS = \
m4macros \
cursors \
themes \
po \
po-libgimp \
po-plug-ins \
po-python \
po-script-fu \
po-tips \
po-windows-installer \
data \
desktop \
menus \
libgimpbase \
tools \
$(PDB) \
icons \
libgimpcolor \
libgimpmath \
libgimpconfig \
libgimpmodule \
libgimpthumb \
libgimpwidgets \
libgimp \
app \
app-tools \
$(GIMP_MODULES) \
$(GIMP_PLUGINS) \
etc \
devel-docs \
docs \
build
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
gimp-@[email protected] \
gimpthumb-@[email protected] \
gimpui-@[email protected]
AUTHORS: authors.xml authors.xsl
if HAVE_XSLTPROC
$(XSLTPROC) -o $(@) $(top_srcdir)/authors.xsl $< || rm -f $(@)
endif
authors.md: authors.xml authors4glimpse-web.xsl
if HAVE_XSLTPROC
$(XSLTPROC) --stringparam today "`date --iso-8601=seconds`" -o $(@) $(top_srcdir)/authors4glimpse-web.xsl $< || rm -f $(@)
endif
EXTRA_DIST = \
AUTHORS \
COPYING \
HACKING \
INSTALL \
LICENSE \
NEWS \
README \
README.md \
README.i18n \
authors.dtd \
authors.xml \
authors.xsl \
config.h.win32 \
gimp-zip.in \
git-version.h \
gtk-doc.make
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
check-defs:
@$(PYTHON) $(top_srcdir)/tools/defcheck.py $(top_srcdir) || \
( echo "*** .def files inconsistent ***"; exit 1; )
validate-authors:
if HAVE_XMLLINT
@cd $(srcdir); \
$(XMLLINT) --noout --valid authors.xml || \
( echo "*** authors.xml INVALID ***"; exit 1; )
endif
all-local: AUTHORS
dist-hook: check-defs validate-authors
CHANGELOG_START = 74424325abb54620b370f2595445b2b2a19fe5e7
ChangeLog: $(srcdir)/ChangeLog
$(srcdir)/ChangeLog:
@echo Creating $@ based on git log
@if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run \
git log $(CHANGELOG_START)^.. --stat) | fmt --split-only > [email protected] \
&& mv -f [email protected] $@ \
|| ($(RM) [email protected]; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi
.PHONY: $(srcdir)/ChangeLog
generated_sources = \
git-version.h
# Build git-version.h before anything in the subdirs as this is needed
# in the about and debug dialog (app/) and in the debug tool (tools/).
BUILT_SOURCES = $(generated_sources)
CLEANFILES = $(generated_sources)
# If git is available, always check if git-version.h should be
# updated. If git is not available, don't do anything if git-version.h
# already exists because then we are probably working with a tarball
# in which case the git-version.h we ship is correct.
git-version.h: update-git-version-header
@if test -e "$(top_srcdir)/.git"; then \
git_version="`git --git-dir=$(top_srcdir)/.git describe --always`"; \
git_version_abbrev="`git --git-dir=$(top_srcdir)/.git rev-parse --short HEAD`"; \
git_last_commit_year="`git --git-dir=$(top_srcdir)/.git log -n1 --reverse --pretty=%ci | cut -b 1-4`"; \
elif test ! -f "$@"; then \
git_version="Unknown, shouldn't happen"; \
git_version_abbrev="$$git_version"; \
git_last_commit_timestamp=-1; \
git_last_commit_year="`date -u '+%Y'`"; \
fi; \
if test -n "$$git_version"; then \
echo "#ifndef __GIT_VERSION_H__" > "[email protected]"; \
echo "#define __GIT_VERSION_H__" >> "[email protected]"; \
echo "#define GIMP_GIT_VERSION \"$$git_version\"" >> "[email protected]"; \
echo "#define GIMP_GIT_VERSION_ABBREV \"$$git_version_abbrev\"" >> "[email protected]"; \
echo "#define GIMP_GIT_LAST_COMMIT_YEAR \"$$git_last_commit_year\"" >> "[email protected]"; \
echo "#endif /* __GIT_VERSION_H__ */" >> "[email protected]"; \
fi
@if ( test -f "[email protected]" && test -f "$@" && cmp "[email protected]" "$@" > /dev/null ); then \
rm -f "[email protected]"; \
elif test -f "[email protected]"; then \
mv "[email protected]" "$@"; \
echo " git HEAD changed: $@ regenerated"; \
fi
.PHONY: update-git-version-header