1## Process this file with automake to produce Makefile.in
2include $(top_srcdir)/Makefile.decl
3
4AUTOMAKE_OPTIONS = 1.7
5
6SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
7DIST_SUBDIRS = $(SUBDIRS) build
8
9bin_SCRIPTS = glib-gettextize
10
11AM_CPPFLAGS = 					\
12	-DG_LOG_DOMAIN=g_log_domain_glib 	\
13	@GLIB_DEBUG_FLAGS@ 			\
14	-DG_DISABLE_DEPRECATED 			\
15	-DGLIB_COMPILATION
16
17EXTRA_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	glib-2.0-uninstalled.pc.in 	\
57	gobject-2.0-uninstalled.pc.in 	\
58	gmodule-2.0-uninstalled.pc.in	\
59	gthread-2.0-uninstalled.pc.in	\
60	gmodule-no-export-2.0-uninstalled.pc.in \
61	gio-2.0-uninstalled.pc.in		\
62	gio-unix-2.0-uninstalled.pc.in
63
64
65# These may be in the builddir too
66BUILT_EXTRA_DIST = 		\
67	README			\
68	INSTALL			\
69	ChangeLog		\
70	glibconfig.h.win32	\
71	config.h.win32		\
72	gtk-doc.make
73
74configexecincludedir = $(libdir)/glib-2.0/include
75configexecinclude_DATA = glibconfig.h
76
77uninstall-local:
78	rm -f $(DESTDIR)$(configexecincludedir)/glibconfig.h
79
80CONFIGURE_DEPENDENCIES = acglib.m4
81
82BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
83glibconfig.h: stamp-gc-h
84	@if test -f glibconfig.h; then :; \
85	else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
86stamp-gc-h: config.status
87	cd $(top_builddir) && $(SHELL) ./config.status glibconfig.h
88	echo timestamp > stamp-gc-h
89
90ChangeLog:
91	@echo Creating $@
92	@if test -d "$(srcdir)/.git"; then \
93	  (GIT_DIR=$(top_srcdir)/.git ./missing --run git log GLIB_2_20_0^^.. --stat) | fmt --split-only > $@.tmp \
94	  && mv -f $@.tmp $@ \
95	  || ($(RM) $@.tmp; \
96	      echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
97	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
98	else \
99	  test -f $@ || \
100	  (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
101	  echo A git checkout and git-log is required to generate this file >> $@); \
102	fi
103
104pkgconfigdir = $(libdir)/pkgconfig
105pkgconfig_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 gio-unix-2.0.pc
106
107$(pkgconfig_DATA): config.status
108
109# install mkinstalldirs for glib-gettextize's benefit
110gettextdir = $(datadir)/glib-2.0/gettext
111gettext_SCRIPTS = mkinstalldirs
112
113# build documentation when doing distcheck
114DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man
115
116DISTCLEANFILES = glibconfig-sysdefs.h glibconfig.h stamp-gc-h config.lt
117
118distclean-local:
119	if test $(srcdir) = .; then :; else \
120	    rm -f $(BUILT_EXTRA_DIST); \
121	fi
122
123.PHONY: files release sanity snapshot ChangeLog
124
125files:
126	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
127	  echo $$p; \
128	done
129
130release:
131	rm -rf .deps */.deps
132	cd docs && make glib.html
133	$(MAKE) distcheck
134
135sanity:
136	./sanity_check $(VERSION)
137
138snapshot:
139	$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
140
141snapcheck:
142	$(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
143
144dist-hook: $(BUILT_EXTRA_DIST)
145	files='$(BUILT_EXTRA_DIST)'; \
146	for f in $$files; do \
147	  if test -f $$f; then d=.; else d=$(srcdir); fi; \
148	  rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
149