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