File: Makefile.am

package info (click to toggle)
pkg-config 0.29-6
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 12,292 kB
  • sloc: ansic: 131,421; sh: 12,550; perl: 1,113; makefile: 625; python: 461
file content (70 lines) | stat: -rw-r--r-- 1,808 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}

if INTERNAL_GLIB
GLIB_SUBDIR = glib
endif

# Normally we'd want glib to be part of DIST_SUBDIRS unconditionally,
# but distclean gets broken unless we always run glib's configure
SUBDIRS = $(GLIB_SUBDIR) . check
DIST_SUBDIRS = $(SUBDIRS)

# Escape paths properly on windows
if NATIVE_WIN32
AM_CPPFLAGS = \
	-DPKG_CONFIG_PC_PATH="\"$(subst /,\/,$(pc_path))\"" \
	-DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(subst /,\/,$(system_include_path))\"" \
	-DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(subst /,\/,$(system_library_path))\""
else
AM_CPPFLAGS = \
	-DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" \
	-DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(system_include_path)\"" \
	-DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(system_library_path)\""
endif

AM_CFLAGS = \
	$(WARN_CFLAGS) \
	$(GCOV_CFLAGS) \
	$(GLIB_CFLAGS)

bin_PROGRAMS = pkg-config
pkg_config_LDADD = $(GLIB_LIBS)
pkg_config_SOURCES= \
	pkg.h \
	pkg.c \
	parse.h \
	parse.c \
	rpmvercmp.c \
	rpmvercmp.h \
	main.c

if HOST_TOOL
host_tool = $(host)-pkg-config$(EXEEXT)
install-exec-hook:
	cd $(DESTDIR)$(bindir) && $(LN) -f pkg-config$(EXEEXT) $(host_tool)
uninstall-hook:
	cd $(DESTDIR)$(bindir) && rm -f $(host_tool)
endif

# Various data files
m4dir = $(datadir)/aclocal
m4_DATA = pkg.m4
dist_doc_DATA = pkg-config-guide.html
dist_man_MANS = pkg-config.1
EXTRA_DIST = README.win32

# gcov test coverage
gcov:
	-$(MAKE) $(AM_MAKEFLAGS) -k check
	$(GCOV) $(pkg_config_SOURCES)
CLEANFILES = *.gcda *.gcno *.gcov

# Since we can't always have glib in DIST_SUBDIRS, we need to make sure
# glib is configured when we want to run dist. Unfortunately, there's no
# DIST_CONFIGURE_FLAGS.
DISTCHECK_CONFIGURE_FLAGS = --with-internal-glib
if !INTERNAL_GLIB
dist-hook:
	@echo "error: --with-internal-glib is required to include glib in dist"
	@exit 1
endif