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