Update to 0.28
[platform/upstream/pkg-config.git] / Makefile.am
1 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
2
3 if INTERNAL_GLIB
4 GLIB_SUBDIR = glib
5 endif
6
7 # Normally we'd want glib to be part of DIST_SUBDIRS unconditionally,
8 # but distclean gets broken unless we always run glib's configure
9 SUBDIRS = $(GLIB_SUBDIR) . check
10 DIST_SUBDIRS = $(SUBDIRS)
11
12 # Escape paths properly on windows
13 if NATIVE_WIN32
14 AM_CPPFLAGS = \
15         -DPKG_CONFIG_PC_PATH="\"$(subst /,\/,$(pc_path))\"" \
16         -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(subst /,\/,$(system_include_path))\"" \
17         -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(subst /,\/,$(system_library_path))\""
18 else
19 AM_CPPFLAGS = \
20         -DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" \
21         -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(system_include_path)\"" \
22         -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(system_library_path)\""
23 endif
24
25 AM_CFLAGS = \
26         $(WARN_CFLAGS) \
27         $(GCOV_CFLAGS) \
28         $(GLIB_CFLAGS)
29
30 bin_PROGRAMS = pkg-config
31 pkg_config_LDADD = $(GLIB_LIBS)
32 pkg_config_SOURCES= \
33         pkg.h \
34         pkg.c \
35         parse.h \
36         parse.c \
37         main.c
38
39 if HOST_TOOL
40 host_tool = $(host)-pkg-config$(EXEEXT)
41 install-exec-hook:
42         cd $(DESTDIR)$(bindir) && $(LN) pkg-config$(EXEEXT) $(host_tool)
43 uninstall-hook:
44         cd $(DESTDIR)$(bindir) && rm -f $(host_tool)
45 endif
46
47 # Various data files
48 m4dir = $(datadir)/aclocal
49 dist_m4_DATA = pkg.m4
50 dist_doc_DATA = pkg-config-guide.html
51 dist_man_MANS = pkg-config.1
52 EXTRA_DIST = README.win32
53
54 # gcov test coverage
55 gcov:
56         -$(MAKE) $(AM_MAKEFLAGS) -k check
57         $(GCOV) $(pkg_config_SOURCES)
58 CLEANFILES = *.gcda *.gcno *.gcov
59
60 # Since we can't always have glib in DIST_SUBDIRS, we need to make sure
61 # glib is configured when we want to run dist. Unfortunately, there's no
62 # DIST_CONFIGURE_FLAGS.
63 DISTCHECK_CONFIGURE_FLAGS = --with-internal-glib
64 if !INTERNAL_GLIB
65 dist-hook:
66         @echo "error: --with-internal-glib is required to include glib in dist"
67         @exit 1
68 endif