Makefile.am 2.53 KB
Newer Older
1
SUBDIRS = lib/libalpm src/util src/pacman scripts etc test/pacman test/util test/scripts
2
3
4
if WANT_DOC
SUBDIRS += doc
endif
5

Allan McRae's avatar
Allan McRae committed
6
DIST_SUBDIRS = $(SUBDIRS) src/common
7

8
ACLOCAL_AMFLAGS = -I m4 --install
9
AM_MAKEFLAGS = --no-print-directory
10

11
12
13
# Make sure we test and build manpages when doing distcheck
DISTCHECK_CONFIGURE_FLAGS = --enable-doc --disable-git-version

14
15
# Some files automatically included, so they aren't specified below:
#   AUTHORS, COPYING, NEWS, README
Andrew Gregory's avatar
Andrew Gregory committed
16
EXTRA_DIST = HACKING test/tap.sh
17

18
19
# Sample makepkg prototype files
pkgdatadir = ${datadir}/${PACKAGE}
20
21
22
dist_pkgdata_DATA = \
	proto/PKGBUILD.proto \
	proto/PKGBUILD-split.proto \
Maxime Gauduin's avatar
Maxime Gauduin committed
23
	proto/PKGBUILD-vcs.proto \
24
	proto/proto.install
25

26
27
$(top_srcdir)/test/pacman/tests/TESTS: $(wildcard test/pacman/tests/*.py)
	@printf "TESTS += %s\n" $^ | LC_ALL=C sort -u > "$@"
Andrew Gregory's avatar
Andrew Gregory committed
28

Andrew Gregory's avatar
Andrew Gregory committed
29
30
TESTS =  test/scripts/parseopts_test.sh \
				 test/scripts/human_to_size_test.sh \
31
				 test/scripts/makepkg-template_test.sh \
Andrew Gregory's avatar
Andrew Gregory committed
32
				 test/scripts/pacman-db-upgrade-v9.py \
Andrew Gregory's avatar
Andrew Gregory committed
33
34
35
36
				 test/util/pacsorttest.sh \
				 test/util/vercmptest.sh
include $(top_srcdir)/test/pacman/tests/TESTS

37
TEST_SUITE_LOG = test/test-suite.log
Andrew Gregory's avatar
Andrew Gregory committed
38
39
TEST_EXTENSIONS = .py
AM_TESTS_ENVIRONMENT = \
Andrew Gregory's avatar
Andrew Gregory committed
40
	PMTEST_UTIL_DIR=$(top_builddir)/src/util/; export PMTEST_UTIL_DIR; \
41
	PMTEST_SCRIPT_DIR=$(top_builddir)/scripts/; export PMTEST_SCRIPT_DIR; \
Andrew Gregory's avatar
Andrew Gregory committed
42
	PMTEST_SCRIPTLIB_DIR=$(top_srcdir)/scripts/library/; export PMTEST_SCRIPTLIB_DIR;
43
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
Andrew Gregory's avatar
Andrew Gregory committed
44
45
46
								 $(top_srcdir)/build-aux/tap-driver.sh
PY_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
								 $(top_srcdir)/build-aux/tap-driver.sh
47
PY_LOG_COMPILER = $(PYTHON) $(top_srcdir)/test/pacman/pactest.py
Andrew Gregory's avatar
Andrew Gregory committed
48
AM_PY_LOG_FLAGS = \
49
		--scriptlet-shell $(SCRIPTLET_SHELL) \
50
		--ldconfig $(LDCONFIG) \
51
52
		--bindir $(top_builddir)/src/pacman \
		--bindir $(top_builddir)/scripts
53

54
# create the pacman DB, cache, makepkg-template and system hook directories upon install
55
install-data-local:
56
57
	for dir in "$(DESTDIR)$(localstatedir)/lib/pacman" "$(DESTDIR)$(localstatedir)/cache/pacman/pkg" \
	           "$(DESTDIR)$(datarootdir)/makepkg-template" "$(DESTDIR)$(datarootdir)/libalpm/hooks"; do \
58
59
60
	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
	done

61
62
63
64
65
update-po:
	$(MAKE) -C lib/libalpm/po update-po
	$(MAKE) -C scripts/po update-po
	$(MAKE) -C src/pacman/po update-po

66
67
68
69
70
71
update-copyright:
	for file in $(shell sh -c 'git grep -l "Copyright .* Pacman Development" | grep -v "\.po"'); do \
	  sed -i -e "/Copyright (/s/-$(OLD)/-$(NEW)/" -e "/Copyright (/s/ $(OLD)/ $(OLD)-$(NEW)/" "$$file"; \
	done

.PHONY: update-po update-copyright
72

73
# vim:set noet: