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