Don't descend into build/. (#500875)
[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 gobject gmodule gthread 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-14      \
19         ChangeLog.pre-2-12      \
20         ChangeLog.pre-2-10      \
21         ChangeLog.pre-2-8       \
22         ChangeLog.pre-2-6       \
23         ChangeLog.pre-2-4       \
24         ChangeLog.pre-2-2       \
25         ChangeLog.pre-2-0       \
26         ChangeLog.pre-1-2       \
27         glib-zip.in             \
28         NEWS.pre-1-3            \
29         acglib.m4               \
30         sanity_check            \
31         README.in               \
32         INSTALL.in              \
33         README.win32            \
34         HACKING                 \
35         MAINTAINERS             \
36         autogen.sh              \
37         mkinstalldirs           \
38         makefile.msc            \
39         glibconfig.h.win32.in   \
40         msvc_recommended_pragmas.h \
41         config.h.win32.in       \
42         po/po2tbl.sed.in        \
43         glib-2.0.pc.in          \
44         gobject-2.0.pc.in       \
45         gmodule-2.0.pc.in       \
46         gmodule-export-2.0.pc.in        \
47         gmodule-no-export-2.0.pc.in     \
48         gthread-2.0.pc.in       \
49         gio-2.0.pc.in           \
50         gio-unix-2.0.pc.in      \
51         glib-2.0-uninstalled.pc.in      \
52         gobject-2.0-uninstalled.pc.in   \
53         gmodule-2.0-uninstalled.pc.in   \
54         gthread-2.0-uninstalled.pc.in   \
55         gmodule-no-export-2.0-uninstalled.pc.in \
56         gio-2.0-uninstalled.pc.in               \
57         gio-unix-2.0-uninstalled.pc.in  
58
59
60 # These may be in the builddir too
61 BUILT_EXTRA_DIST =              \
62         README                  \
63         INSTALL                 \
64         glibconfig.h.win32      \
65         config.h.win32          \
66         gtk-doc.make
67
68 configexecincludedir = $(libdir)/glib-2.0/include
69 configexecinclude_DATA = glibconfig.h
70
71 uninstall-local:
72         rm -f $(DESTDIR)$(configexecincludedir)/glibconfig.h
73
74 CONFIGURE_DEPENDENCIES = acglib.m4
75
76 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
77 glibconfig.h: stamp-gc-h
78         @if test -f glibconfig.h; then :; \
79         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
80 stamp-gc-h: config.status
81         cd $(top_builddir) && $(SHELL) ./config.status glibconfig.h
82         echo timestamp > stamp-gc-h
83
84 pkgconfigdir = $(libdir)/pkgconfig
85 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 gio-unix-2.0.pc
86
87 $(pkgconfig_DATA): config.status
88
89 # install mkinstalldirs for glib-gettextize's benefit
90 gettextdir = $(datadir)/glib-2.0/gettext
91 gettext_SCRIPTS = mkinstalldirs
92
93 # build documentation when doing distcheck
94 DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man
95
96 DISTCLEANFILES = glibconfig-sysdefs.h glibconfig.h stamp-gc-h
97
98 distclean-local:
99         if test $(srcdir) = .; then :; else \
100             rm -f $(BUILT_EXTRA_DIST); \
101         fi
102
103 .PHONY: files release sanity snapshot
104
105 files:
106         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
107           echo $$p; \
108         done
109
110 release:
111         rm -rf .deps */.deps
112         cd docs && make glib.html
113         $(MAKE) distcheck
114
115 sanity:
116         ./sanity_check $(VERSION)
117
118 snapshot:
119         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
120
121 snapcheck:
122         $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
123
124 dist-hook: $(BUILT_EXTRA_DIST)
125         files='$(BUILT_EXTRA_DIST)'; \
126         for f in $$files; do \
127           if test -f $$f; then d=.; else d=$(srcdir); fi; \
128           rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done