1380f76f00e74276df2d6cd808622b24ec5d058b
[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         glibconfig.h.win32.in   \
25         msvc_recommended_pragmas.h \
26         config.h.win32.in       \
27         po/po2tbl.sed.in        \
28         glib-2.0.pc.in          \
29         gobject-2.0.pc.in       \
30         gmodule-2.0.pc.in       \
31         gthread-2.0.pc.in       \
32         glib-2.0-uninstalled.pc.in      \
33         gobject-2.0-uninstalled.pc.in   \
34         gmodule-2.0-uninstalled.pc.in   \
35         gthread-2.0-uninstalled.pc.in
36
37 # These may be in the builddir too
38 BUILT_EXTRA_DIST =              \
39         README                  \
40         INSTALL                 \
41         glibconfig.h.win32      \
42         config.h.win32          \
43         gtk-doc.make
44
45 configexecincludedir = $(libdir)/glib-2.0/include
46 #configexecinclude_DATA = glibconfig.h
47
48 install-exec-local: glibconfig.h
49         $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
50         file=$(DESTDIR)$(configexecincludedir)/glibconfig.h; \
51         if test -r $$file && cmp -s glibconfig.h $$file; then :; \
52         else $(INSTALL_DATA) glibconfig.h $$file; fi
53
54 uninstall-local:
55         rm -f $(DESTDIR)$(configexecincludedir)/glibconfig.h
56
57 CONFIGURE_DEPENDENCIES = acglib.m4
58
59 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
60 glibconfig.h: stamp-gc-h
61         @if test -f glibconfig.h; then :; \
62         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
63 stamp-gc-h: config.status
64         cd $(top_builddir) && $(SHELL) ./config.status glibconfig.h
65         echo timestamp > stamp-gc-h
66
67 pkgconfigdir = $(libdir)/pkgconfig
68 pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc
69
70 $(pkgconfig_DATA): config.status
71
72 # install mkinstalldirs for glib-gettextize's benefit
73 gettextdir = $(datadir)/glib-2.0/gettext
74 gettext_SCRIPTS = mkinstalldirs
75
76 # build documentation when doing distcheck
77 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
78
79 DISTCLEANFILES = glibconfig-sysdefs.h glibconfig.h stamp-gc-h
80
81 distclean-local:
82         if test $(srcdir) = .; then :; else \
83             rm -f $(BUILT_EXTRA_DIST); \
84         fi
85
86 .PHONY: files release sanity snapshot
87
88 files:
89         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
90           echo $$p; \
91         done
92
93 release:
94         rm -rf .deps */.deps
95         cd docs && make glib.html
96         $(MAKE) distcheck
97
98 sanity:
99         ./sanity_check $(VERSION)
100
101 snapshot:
102         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
103
104 snapcheck:
105         $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
106
107 dist-hook: $(BUILT_EXTRA_DIST)
108         files='$(BUILT_EXTRA_DIST)'; \
109         for f in $$files; do \
110           if test -f $$f; then d=.; else d=$(srcdir); fi; \
111           rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done