Makefile.am 3.76 KB
Newer Older
Owen Taylor's avatar
Owen Taylor committed
1
## Process this file with automake to produce Makefile.in
2
include $(top_srcdir)/Makefile.decl
Owen Taylor's avatar
Owen Taylor committed
3

4
AUTOMAKE_OPTIONS = 1.7
5

6
SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
7
DIST_SUBDIRS = $(SUBDIRS) build
Tim Janik's avatar
Tim Janik committed
8

9 10
bin_SCRIPTS = glib-gettextize

11 12 13 14 15
AM_CPPFLAGS = 					\
	-DG_LOG_DOMAIN=g_log_domain_glib 	\
	@GLIB_DEBUG_FLAGS@ 			\
	-DG_DISABLE_DEPRECATED 			\
	-DGLIB_COMPILATION
16

17
EXTRA_DIST += 			\
18 19 20
	ChangeLog.pre-2-20	\
	ChangeLog.pre-2-18	\
	ChangeLog.pre-2-16	\
Matthias Clasen's avatar
Matthias Clasen committed
21
	ChangeLog.pre-2-14	\
22 23
	ChangeLog.pre-2-12	\
	ChangeLog.pre-2-10	\
Matthias Clasen's avatar
Matthias Clasen committed
24
	ChangeLog.pre-2-8	\
Owen Taylor's avatar
Owen Taylor committed
25 26
	ChangeLog.pre-2-6	\
	ChangeLog.pre-2-4	\
Tor Lillqvist's avatar
Tor Lillqvist committed
27
	ChangeLog.pre-2-2	\
Owen Taylor's avatar
Owen Taylor committed
28
	ChangeLog.pre-2-0	\
Owen Taylor's avatar
Owen Taylor committed
29
	ChangeLog.pre-1-2	\
30
	glib-zip.in		\
Tim Janik's avatar
Tim Janik committed
31
	NEWS.pre-1-3		\
32 33
	acglib.m4		\
	sanity_check		\
34
	README.commits		\
35 36
	README.in		\
	INSTALL.in		\
37
	README.win32		\
38 39 40
	HACKING			\
	MAINTAINERS		\
	autogen.sh		\
Matthias Clasen's avatar
Matthias Clasen committed
41
	Makefile.decl		\
Matthias Clasen's avatar
Matthias Clasen committed
42
	mkinstalldirs		\
43
	makefile.msc		\
44
	glibconfig.h.win32.in	\
45
	msvc_recommended_pragmas.h \
46
	config.h.win32.in	\
Owen Taylor's avatar
Owen Taylor committed
47
        po/po2tbl.sed.in        \
48 49 50
	glib-2.0.pc.in 		\
	gobject-2.0.pc.in 	\
	gmodule-2.0.pc.in	\
51
	gmodule-export-2.0.pc.in	\
52
	gmodule-no-export-2.0.pc.in	\
53
	gthread-2.0.pc.in	\
54 55
	gio-2.0.pc.in		\
	gio-unix-2.0.pc.in	\
56 57 58
	glib-2.0-uninstalled.pc.in 	\
	gobject-2.0-uninstalled.pc.in 	\
	gmodule-2.0-uninstalled.pc.in	\
59
	gthread-2.0-uninstalled.pc.in	\
60 61
	gmodule-no-export-2.0-uninstalled.pc.in \
	gio-2.0-uninstalled.pc.in		\
62
	gio-unix-2.0-uninstalled.pc.in
63

64

65
# These may be in the builddir too
66
BUILT_EXTRA_DIST = 		\
67 68
	README			\
	INSTALL			\
69
	ChangeLog		\
70
	glibconfig.h.win32	\
Soeren Sandmann's avatar
Soeren Sandmann committed
71 72
	config.h.win32		\
	gtk-doc.make
73

74
configexecincludedir = $(libdir)/glib-2.0/include
Matthias Clasen's avatar
Matthias Clasen committed
75
configexecinclude_DATA = glibconfig.h
Owen Taylor's avatar
Owen Taylor committed
76

77 78 79
uninstall-local:
	rm -f $(DESTDIR)$(configexecincludedir)/glibconfig.h

80
CONFIGURE_DEPENDENCIES = acglib.m4
81

82 83
BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
glibconfig.h: stamp-gc-h
84 85
	@if test -f glibconfig.h; then :; \
	else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
86
stamp-gc-h: config.status
87
	cd $(top_builddir) && $(SHELL) ./config.status glibconfig.h
88 89
	echo timestamp > stamp-gc-h

90 91 92 93 94 95 96 97 98 99 100 101 102 103
ChangeLog:
	@echo Creating $@
	@if test -d "$(srcdir)/.git"; then \
	  (GIT_DIR=$(top_srcdir)/.git ./missing --run git log GLIB_2_20_0^^.. --stat) | fmt --split-only > $@.tmp \
	  && mv -f $@.tmp $@ \
	  || ($(RM) $@.tmp; \
	      echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
	else \
	  test -f $@ || \
	  (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
	  echo A git checkout and git-log is required to generate this file >> $@); \
	fi

104
pkgconfigdir = $(libdir)/pkgconfig
105
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 gio-2.0.pc gio-unix-2.0.pc
Havoc Pennington's avatar
Havoc Pennington committed
106

107 108
$(pkgconfig_DATA): config.status

109 110 111 112
# install mkinstalldirs for glib-gettextize's benefit
gettextdir = $(datadir)/glib-2.0/gettext
gettext_SCRIPTS = mkinstalldirs

113
# build documentation when doing distcheck
Matthias Clasen's avatar
Matthias Clasen committed
114
DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man
115

Matthias Clasen's avatar
Matthias Clasen committed
116
DISTCLEANFILES = glibconfig-sysdefs.h glibconfig.h stamp-gc-h config.lt
117

118 119 120 121 122
distclean-local:
	if test $(srcdir) = .; then :; else \
	    rm -f $(BUILT_EXTRA_DIST); \
	fi

123
.PHONY: files release sanity snapshot ChangeLog
Owen Taylor's avatar
Owen Taylor committed
124 125 126 127 128 129 130

files:
	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
	  echo $$p; \
	done

release:
131 132 133 134 135 136 137 138
	rm -rf .deps */.deps
	cd docs && make glib.html
	$(MAKE) distcheck

sanity:
	./sanity_check $(VERSION)

snapshot:
Owen Taylor's avatar
Owen Taylor committed
139 140 141 142
	$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`

snapcheck:
	$(MAKE) distcheck distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
143

144
dist-hook: $(BUILT_EXTRA_DIST)
145
	files='$(BUILT_EXTRA_DIST)'; \
146 147
	for f in $$files; do \
	  if test -f $$f; then d=.; else d=$(srcdir); fi; \
148
	  rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done