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