Merge branch 'upstream' into tizen
[platform/upstream/harfbuzz.git] / Makefile.am
1 # Process this file with automake to produce Makefile.in
2
3 NULL =
4
5 ACLOCAL_AMFLAGS = -I m4
6
7 SUBDIRS = src util test docs
8
9 EXTRA_DIST = \
10         autogen.sh \
11         harfbuzz.doap \
12         README.md \
13         README.mingw.md \
14         README.python.md \
15         BUILD.md \
16         CONFIG.md \
17         RELEASING.md \
18         TESTING.md \
19         CMakeLists.txt \
20         replace-enum-strings.cmake \
21         mingw-configure.sh \
22         mingw-ldd.py \
23         mingw32.sh \
24         mingw64.sh \
25         $(NULL)
26
27 MAINTAINERCLEANFILES = \
28         $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
29         $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
30         $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
31         $(srcdir)/INSTALL \
32         $(srcdir)/ChangeLog \
33         $(srcdir)/gtk-doc.make \
34         $(srcdir)/m4/gtk-doc.m4 \
35         $(NULL)
36
37
38 #
39 # ChangeLog generation
40 #
41 CHANGELOG_RANGE =
42 ChangeLog: $(srcdir)/ChangeLog
43 $(srcdir)/ChangeLog:
44         $(AM_V_GEN) if test -d "$(top_srcdir)/.git"; then \
45           (GIT_DIR=$(top_srcdir)/.git \
46            $(GIT) log $(CHANGELOG_RANGE) --stat) > $@.tmp \
47           && mv -f $@.tmp "$(srcdir)/ChangeLog" \
48           || ($(RM) $@.tmp; \
49               echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
50               (test -f $@ || echo git-log is required to generate this file >> "$(srcdir)/$@")); \
51         else \
52           test -f $@ || \
53           (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
54           echo A git checkout and git-log is required to generate this file >> "$(srcdir)/$@"); \
55         fi
56 .PHONY: ChangeLog $(srcdir)/ChangeLog
57
58
59 #
60 # Release engineering
61 #
62
63 DISTCHECK_CONFIGURE_FLAGS = \
64         --enable-gtk-doc \
65         --disable-doc-cross-references \
66         --with-gobject \
67         --enable-introspection \
68         $(NULL)
69
70 # TAR_OPTIONS is not set as env var for 'make dist'.  How to fix that?
71 TAR_OPTIONS = --owner=0 --group=0
72
73 dist-hook: dist-clear-sticky-bits
74 # Clean up any sticky bits we may inherit from parent dir
75 dist-clear-sticky-bits:
76         chmod -R a-s $(distdir)
77
78 tar_file = $(PACKAGE_TARNAME)-$(VERSION).tar.xz
79 sha256_file = $(tar_file).sha256
80 gpg_file = $(sha256_file).asc
81 $(sha256_file): $(tar_file)
82         sha256sum $^ > $@
83 $(gpg_file): $(sha256_file)
84         @echo "Please enter your GPG password to sign the checksum."
85         gpg --armor --sign $^
86
87 release-files: $(tar_file) $(sha256_file) $(gpg_file)
88
89 dist-win:
90         @case $(host_triplet) in *-w64-mingw32) ;; *) echo "Error: Requires mingw build. See README.mingw.md.">&2; exit 1 ;; esac
91         @DIR=$(PACKAGE_TARNAME)-$(VERSION)-win`case $(host_triplet) in i686-*) echo 32 ;; x86_64-*) echo 64 ;; esac`; \
92         $(RM) -r $$DIR; $(MKDIR_P) $$DIR || exit 1; \
93         cp util/.libs/hb-{shape,view,subset}.exe $$DIR && \
94         $(top_srcdir)/mingw-ldd.py $$DIR/hb-view.exe | grep -v 'not found' | cut -d '>' -f 2 | xargs cp -t $$DIR && \
95         cp src/.libs/libharfbuzz{,-subset}-0.dll $$DIR && \
96         chmod a+x $$DIR/*.{exe,dll} && \
97         $(STRIP) $$DIR/*.{exe,dll} && \
98         zip -r $$DIR.zip $$DIR && \
99         $(RM) -r $$DIR && \
100         echo "$$DIR.zip is ready."
101
102
103 -include $(top_srcdir)/git.mk