6b21f7c483de95bae3fb26c45e6a6545f2c2c4a0
[platform/upstream/glib.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 AUTOMAKE_OPTIONS = 1.4
4
5 SUBDIRS = . m4macros glib gobject gmodule gthread docs tests build po
6
7 INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \
8         -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION
9
10 EXTRA_DIST =                    \
11         ChangeLog.pre-1-2       \
12         glib.spec.in            \
13         NEWS.pre-1-3            \
14         acglib.m4               \
15         sanity_check            \
16         README.win32            \
17         TODO.xml                \
18         makefile.msc            \
19         makefile.mingw          \
20         glibconfig.h.win32.in   \
21         config.h.win32.in       \
22         build-dll               \
23         glib-2.0.pc.in          \
24         gobject-2.0.pc.in       \
25         gmodule-2.0.pc.in       \
26         gthread-2.0.pc.in       \
27         glib-2.0-uninstalled.pc.in      \
28         gobject-2.0-uninstalled.pc.in   \
29         gmodule-2.0-uninstalled.pc.in   \
30         gthread-2.0-uninstalled.pc.in
31
32 # These may be in the builddir too
33 BUILT_EXTRA_DIST =              \
34         glibconfig.h.win32      \
35         config.h.win32          \
36         glib.rc                 \
37         glib.spec
38
39 configexecincludedir = $(libdir)/glib-2.0/include
40 #configexecinclude_DATA = glibconfig.h
41
42 install-exec-local: glibconfig.h
43         $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
44         file=$(DESTDIR)$(configexecincludedir)/glibconfig.h; \
45         if test -r $$file && cmp -s glibconfig.h $$file; then :; \
46         else $(INSTALL_DATA) glibconfig.h $$file; fi
47
48 CONFIGURE_DEPENDENCIES = acglib.m4
49
50 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
51 glibconfig.h: stamp-gc-h
52         @if test -f glibconfig.h; then :; \
53         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
54 stamp-gc-h: config.status
55         CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status
56         echo timestamp > stamp-gc-h
57
58
59 pkgconfigdir = $(libdir)/pkgconfig
60 pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc
61
62 $(pkgconfig_DATA): config.status
63
64 glibconfig.h.win32: $(top_builddir)/config.status $(top_srcdir)/glibconfig.h.win32.in
65         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
66
67 config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
68         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
69
70 glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
71         cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
72
73 .PHONY: files release sanity snapshot
74
75 files:
76         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
77           echo $$p; \
78         done
79
80 release:
81         rm -rf .deps */.deps
82         cd docs && make glib.html
83         $(MAKE) distcheck
84
85 sanity:
86         ./sanity_check $(VERSION)
87
88 snapshot:
89         $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
90
91 snapcheck:
92         $(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
93
94 dist-hook: $(BUILT_EXTRA_DIST)
95         cd $(top_builddir) && CONFIG_FILES="INSTALL README" CONFIG_HEADERS= $(SHELL) ./config.status
96         files='$(BUILT_EXTRA_DIST) INSTALL README'; \
97         for f in $$files; do \
98           if test -f $$f; then d=.; else d=$(srcdir); fi; \
99           rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done