fix bug #135723
[platform/upstream/glib.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 AUTOMAKE_OPTIONS = 1.7
4
5 SUBDIRS = . m4macros glib gobject gmodule gthread tests build po docs
6
7 bin_SCRIPTS = glib-gettextize
8
9 INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \
10         -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION
11
12 EXTRA_DIST =                    \
13         ChangeLog.pre-2-2       \
14         ChangeLog.pre-2-0       \
15         ChangeLog.pre-1-2       \
16         glib-zip.in             \
17         NEWS.pre-1-3            \
18         acglib.m4               \
19         sanity_check            \
20         README.in               \
21         INSTALL.in              \
22         README.win32            \
23         makefile.msc            \
24         makefile.mingw          \
25         glibconfig.h.win32.in   \
26         msvc_recommended_pragmas.h \
27         config.h.win32.in       \
28         po/po2tbl.sed.in        \
29         glib-2.0.pc.in          \
30         gobject-2.0.pc.in       \
31         gmodule-2.0.pc.in       \
32         gthread-2.0.pc.in       \
33         glib-2.0-uninstalled.pc.in      \
34         gobject-2.0-uninstalled.pc.in   \
35         gmodule-2.0-uninstalled.pc.in   \
36         gthread-2.0-uninstalled.pc.in   \
37         gtk-doc.make
38
39 # These may be in the builddir too
40 BUILT_EXTRA_DIST =              \
41         README                  \
42         INSTALL                 \
43         glibconfig.h.win32      \
44         config.h.win32
45
46
47 configexecincludedir = $(libdir)/glib-2.0/include
48 #configexecinclude_DATA = glibconfig.h
49
50 install-exec-local: glibconfig.h
51         $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
52         file=$(DESTDIR)$(configexecincludedir)/glibconfig.h; \
53         if test -r $$file && cmp -s glibconfig.h $$file; then :; \
54         else $(INSTALL_DATA) glibconfig.h $$file; fi
55
56 uninstall-local:
57         rm -f $(DESTDIR)$(configexecincludedir)/glibconfig.h
58
59 CONFIGURE_DEPENDENCIES = acglib.m4
60
61 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
62 glibconfig.h: stamp-gc-h
63         @if test -f glibconfig.h; then :; \
64         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
65 stamp-gc-h: config.status
66         cd $(top_builddir) && $(SHELL) ./config.status glibconfig.h
67         echo timestamp > stamp-gc-h
68
69 pkgconfigdir = $(libdir)/pkgconfig
70 pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc
71
72 $(pkgconfig_DATA): config.status
73
74 # build documentation when doing distcheck
75 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
76
77 DISTCLEANFILES = glibconfig-sysdefs.h glibconfig.h stamp-gc-h
78
79 distclean-local:
80         if test $(srcdir) = .; then :; else \
81             rm -f $(BUILT_EXTRA_DIST); \
82         fi
83
84 .PHONY: files release sanity snapshot
85
86 files:
87         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
88           echo $$p; \
89         done
90
91 release:
92         rm -rf .deps */.deps
93         cd docs && make glib.html
94         $(MAKE) distcheck
95
96 sanity:
97         ./sanity_check $(VERSION)
98
99 snapshot:
100         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
101
102 snapcheck:
103         $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
104
105 dist-hook: $(BUILT_EXTRA_DIST)
106         files='$(BUILT_EXTRA_DIST)'; \
107         for f in $$files; do \
108           if test -f $$f; then d=.; else d=$(srcdir); fi; \
109           rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done