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