668953e19499f6d66e04e680cf15b5cadf90b545
[platform/upstream/glib.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/Makefile.decl
3
4 AUTOMAKE_OPTIONS = 1.7
5
6 ACLOCAL_AMFLAGS = -I m4macros
7
8 SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
9 DIST_SUBDIRS = $(SUBDIRS) build
10
11 bin_SCRIPTS = glib-gettextize
12
13 AM_CPPFLAGS =                                   \
14         -DG_LOG_DOMAIN=g_log_domain_glib        \
15         @GLIB_DEBUG_FLAGS@                      \
16         -DG_DISABLE_DEPRECATED                  \
17         -DGLIB_COMPILATION
18
19 EXTRA_DIST +=                   \
20         ChangeLog.pre-2-20      \
21         ChangeLog.pre-2-18      \
22         ChangeLog.pre-2-16      \
23         ChangeLog.pre-2-14      \
24         ChangeLog.pre-2-12      \
25         ChangeLog.pre-2-10      \
26         ChangeLog.pre-2-8       \
27         ChangeLog.pre-2-6       \
28         ChangeLog.pre-2-4       \
29         ChangeLog.pre-2-2       \
30         ChangeLog.pre-2-0       \
31         ChangeLog.pre-1-2       \
32         glib-zip.in             \
33         NEWS.pre-1-3            \
34         acglib.m4               \
35         sanity_check            \
36         README.commits          \
37         README.in               \
38         INSTALL.in              \
39         README.win32            \
40         HACKING                 \
41         MAINTAINERS             \
42         autogen.sh              \
43         Makefile.decl           \
44         mkinstalldirs           \
45         makefile.msc            \
46         glibconfig.h.win32.in   \
47         msvc_recommended_pragmas.h \
48         config.h.win32.in       \
49         po/po2tbl.sed.in        \
50         glib-2.0.pc.in          \
51         gobject-2.0.pc.in       \
52         gmodule-2.0.pc.in       \
53         gmodule-export-2.0.pc.in        \
54         gmodule-no-export-2.0.pc.in     \
55         gthread-2.0.pc.in       \
56         gio-2.0.pc.in           \
57         gio-unix-2.0.pc.in      \
58         gio-windows-2.0.pc.in   \
59         glib-2.0-uninstalled.pc.in      \
60         gobject-2.0-uninstalled.pc.in   \
61         gmodule-2.0-uninstalled.pc.in   \
62         gthread-2.0-uninstalled.pc.in   \
63         gmodule-no-export-2.0-uninstalled.pc.in \
64         gio-2.0-uninstalled.pc.in               \
65         gio-unix-2.0-uninstalled.pc.in
66
67
68 # These may be in the builddir too
69 BUILT_EXTRA_DIST =              \
70         README                  \
71         INSTALL                 \
72         ChangeLog               \
73         glibconfig.h.win32      \
74         config.h.win32          \
75         gtk-doc.make
76
77 configexecincludedir = $(libdir)/glib-2.0/include
78 configexecinclude_DATA = glibconfig.h
79
80 uninstall-local:
81         rm -f $(DESTDIR)$(configexecincludedir)/glibconfig.h
82
83 CONFIGURE_DEPENDENCIES = acglib.m4
84
85 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
86 glibconfig.h: stamp-gc-h
87         $(AM_V_GEN) if test -f glibconfig.h; then :; \
88         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
89 stamp-gc-h: config.status
90         cd $(top_builddir) && $(SHELL) ./config.status glibconfig.h
91         echo timestamp > stamp-gc-h
92
93 ChangeLog:
94         $(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
95           (GIT_DIR=$(top_srcdir)/.git ./missing --run git log GLIB_2_20_0^^.. --stat) | fmt --split-only > $@.tmp \
96           && mv -f $@.tmp $@ \
97           || ($(RM) $@.tmp; \
98               echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
99               (test -f $@ || echo git-log is required to generate this file >> $@)); \
100         else \
101           test -f $@ || \
102           (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
103           echo A git checkout and git-log is required to generate this file >> $@); \
104         fi
105
106 pkgconfigdir = $(libdir)/pkgconfig
107 pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gmodule-export-2.0.pc gmodule-no-export-2.0.pc gthread-2.0.pc gio-2.0.pc
108
109 if OS_UNIX
110 pkgconfig_DATA += gio-unix-2.0.pc
111 endif
112
113 if OS_WIN32
114 pkgconfig_DATA += gio-windows-2.0.pc
115 endif
116
117 $(pkgconfig_DATA): config.status
118
119 # install mkinstalldirs for glib-gettextize's benefit
120 gettextdir = $(datadir)/glib-2.0/gettext
121 gettext_SCRIPTS = mkinstalldirs
122
123 # build documentation when doing distcheck
124 DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man
125
126 DISTCLEANFILES = glibconfig-sysdefs.h glibconfig.h stamp-gc-h config.lt
127
128 distclean-local: lcov-clean
129         if test $(srcdir) = .; then :; else \
130             rm -f $(BUILT_EXTRA_DIST); \
131         fi
132
133 .PHONY: files release sanity snapshot ChangeLog
134
135 files:
136         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
137           echo $$p; \
138         done
139
140 release:
141         rm -rf .deps */.deps
142         cd docs && make glib.html
143         $(MAKE) distcheck
144
145 sanity:
146         ./sanity_check $(VERSION)
147
148 snapshot:
149         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
150
151 snapcheck:
152         $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
153
154 dist-hook: $(BUILT_EXTRA_DIST)
155         files='$(BUILT_EXTRA_DIST)'; \
156         for f in $$files; do \
157           if test -f $$f; then d=.; else d=$(srcdir); fi; \
158           rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done