summaryrefslogtreecommitdiff
path: root/src/chroot-tools/Makefile
blob: 96fb837523bab08a219d5390ee53a5b336943d5f (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
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
pkglibexecdir = $(libexecdir)/libretools/chroot

libretools-bins      = chcleanup librechroot libremakepkg
libretools-libexecs += arch-nspawn chcleanup distcc-tool indent mkarchroot
libretools-libs     += makechrootpkg.sh
devtools-files       = makechrootpkg.sh.in mkarchroot.in arch-nspawn.in
std.clean_files     += chcleanup.lib

$(srcdir)/makechrootpkg.sh.in: $(srcdir)/%.sh.in: $(devtoolsdir)/%.in
	cp $< $@

$(outdir)/chcleanup: $(srcdir)/chcleanup.in $(outdir)/chcleanup.lib
	m4 -I$(@D) -P $< | $(edit) | install -m755 /dev/stdin $@
$(outdir)/chcleanup.lib: $(call at.path,$(topoutdir)/src/lib/common.sh) $(outdir)/Makefile
	bash -c '. $<; declare -f _l plain msg msg2 error' > $@

$(outdir)/distcc-tool.pot: LIBREXGETTEXT_FLAGS+=--simple=errusage

$(DESTDIR)$(bindir)/chcleanup: $(var)bindir $(var)libexecdir
	mkdir -p $(@D)
	ln -srfT $(DESTDIR)$(libexecdir)/libretools/chroot/chcleanup $@

at.depdirs += ../lib

include $(topsrcdir)/build-aux/Makefile.tail.mk