Merge branch 'upstream' into tizen
[platform/upstream/fribidi.git] / Makefile.am
1 ##                                               -*- Automake -*-
2 ## Process this file with automake to produce Makefile.in
3
4 ACLOCAL_AMFLAGS = -I m4
5
6 ## The order of subdirs is important, don't change without a reason.
7 SUBDIRS = gen.tab lib bin doc test
8
9 EXTRA_DIST = autogen.sh ChangeLog.old \
10         meson.build meson_options.txt bin/meson.build doc/meson.build \
11         gen.tab/meson.build lib/meson.build test/meson.build \
12         test/test-runner.py test/unicode-conformance/meson.build \
13         README.md
14
15 pkgconfigdir = $(libdir)/pkgconfig
16 pkgconfig_DATA = @PACKAGE@.pc
17
18 BUILT_SOURCES = lib/fribidi-unicode-version.h
19 lib/fribidi-unicode-version.h:
20         (cd lib && $(MAKE) $(AM_MAKEFLAGS) fribidi-unicode-version.h)
21
22 MAINTAINERCLEANFILES = \
23         INSTALL \
24         $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
25         $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
26         $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL)
27
28 # Indent all C source and header files, using indent(1):
29
30 indent: $(srcdir)/.indent.pro
31         cd "$(srcdir)" && \
32         find . -mindepth 2 -type f -name "*.[ch]" -print | \
33           xargs ./missing --run indent
34
35 .PHONY: indent
36
37 #
38 # ChangeLog generation
39 #
40 CHANGELOG_RANGE =
41 ChangeLog:
42         $(AM_V_GEN) if test -d "$(top_srcdir)/.git"; then \
43           (GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run \
44            git log $(CHANGELOG_RANGE) --stat) | fmt --split-only > $@.tmp \
45           && mv -f $@.tmp "$(srcdir)/ChangeLog" \
46           || ($(RM) $@.tmp; \
47               echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
48               (test -f $@ || echo git-log is required to generate this file >> "$(srcdir)/$@")); \
49         else \
50           test -f $@ || \
51           (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
52           echo A git checkout and git-log is required to generate this file >> "$(srcdir)/$@"); \
53         fi
54 .PHONY: $(srcdir)/ChangeLog
55
56 #
57 # Release engineering
58 #
59
60 TAR_OPTIONS = --owner=0 --group=0
61 dist-hook: dist-clear-sticky-bits
62 # Clean up any sticky bits we may inherit from parent dir
63 dist-clear-sticky-bits:
64         chmod -R a-s $(distdir)
65
66
67 tar_file = $(PACKAGE_TARNAME)-$(VERSION).tar.bz2
68 sha256_file = $(tar_file).sha256
69 gpg_file = $(sha256_file).asc
70 $(sha256_file): $(tar_file)
71         sha256sum $^ > $@
72 $(gpg_file): $(sha256_file)
73         @echo "Please enter your GPG password to sign the checksum."
74         gpg --armor --sign $^
75
76 release-files: $(tar_file) $(sha256_file) $(gpg_file)
77
78
79 -include $(top_srcdir)/git.mk