summaryrefslogtreecommitdiff
path: root/src/chroot-tools/Makefile
blob: db18ea443927f6d21f5823b185f9362f55ca4912 (plain)
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
progs = chcleanup
clean_files = chcleanup.lib
# These files are coming from devtools
copy_files = makechrootpkg.sh.in mkarchroot.in arch-nspawn.in
# These are programs that we will use internally, but shouldn't be in PATH
libexecs = mkarchroot arch-nspawn distcc-tool chcleanup indent
no-progs = $(libexecs)
# These are the shell libraries we will use
libs = makechrootpkg.sh $(wildcard hooks-*.sh)

pkglibexecdir = $(libexecdir)/libretools/chroot
include ../../common.mk

# makechrootpkg.sh is created from a command, not a library
makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in
	cp $< $@

chcleanup: chcleanup.in chcleanup.lib
	m4 -P $< | $(edit) > $@
	chmod 755 $@
chcleanup.lib: ../lib/common.sh.top ../lib/common.sh Makefile
	 { cat $<; bash -c '. ../lib/common.sh; declare -f plain msg msg2 error'; } > $@

distcc-tool.pot: LIBREXGETTEXT_FLAGS+=--simple=errusage

# This is so gross.  I hate recursive Make.  Why did I implement it this way?
../lib/common.sh: $(devtoolsdir)/lib/common.sh ../lib/common.sh.top ../lib/Makefile
	$(MAKE) -C ../lib common.sh