Make sure `glibconfig.h' exists after the rule is fired.
[platform/upstream/glib.git] / glib / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 AUTOMAKE_OPTIONS = 1.4
4
5 SUBDIRS = . gmodule gthread docs tests
6
7 bin_SCRIPTS=glib-config
8 BUILT_SOURCES=glib-config
9 glib-config: glib-config.in
10
11 INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@
12
13 EXTRA_DIST = \
14         glib.m4                 \
15         glib.spec.in            \
16         acglib.m4               \
17         sanity_check            \
18         README.win32            \
19         glib.def                \
20         makefile.msc            \
21         giowin32.c              \
22         glibconfig.h.win32      \
23         config.h.win32
24
25 lib_LTLIBRARIES = libglib.la
26
27 libglib_la_SOURCES = \
28         garray.c        \
29         gcache.c        \
30         gcompletion.c   \
31         gdataset.c      \
32         gdate.c         \
33         gerror.c        \
34         ghash.c         \
35         ghook.c         \
36         giochannel.c    \
37         giounix.c       \
38         glist.c         \
39         gmain.c         \
40         gmem.c          \
41         gmessages.c     \
42         gmutex.c        \
43         gnode.c         \
44         gprimes.c       \
45         gqueue.c        \
46         grel.c          \
47         gscanner.c      \
48         gslist.c        \
49         gstack.c        \
50         gstrfuncs.c     \
51         gstring.c       \
52         gtimer.c        \
53         gtree.c         \
54         gutils.c
55
56 include_HEADERS = \
57         glib.h
58
59 configexecincludedir = $(pkglibdir)/include
60 #configexecinclude_DATA = glibconfig.h
61
62 install-exec-local: glibconfig.h
63         $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
64         file=$(DESTDIR)$(configexecincludedir)/glibconfig.h; \
65         if test -r $$file && cmp -s glibconfig.h $$file; then :; \
66         else $(INSTALL_DATA) glibconfig.h $$file; fi
67
68 configure: configure.in acglib.m4               
69
70 BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
71 glibconfig.h: stamp-gc-h
72         @if test -f glibconfig.h; then :; \
73         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
74 stamp-gc-h: config.status
75         CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status
76         echo timestamp > stamp-gc-h
77
78 libglib_la_LDFLAGS = \
79         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
80         -release $(LT_RELEASE)
81
82 noinst_PROGRAMS = testglib testgdate testgdateparser
83 testglib_LDADD = libglib.la
84 testgdate_LDADD = libglib.la
85 testgdateparser_LDADD = libglib.la
86
87 m4datadir = $(datadir)/aclocal
88 m4data_DATA = glib.m4
89
90 .PHONY: files release sanity snapshot
91
92 files:
93         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
94           echo $$p; \
95         done
96
97 release:
98         rm -rf .deps */.deps
99         cd docs && make glib.html
100         $(MAKE) distcheck
101
102 sanity:
103         ./sanity_check $(VERSION)
104
105 snapshot:
106         $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
107
108 dist-hook:
109         cp glib.spec $(distdir)