summaryrefslogtreecommitdiff
path: root/src/chroot-tools/Makefile
blob: de79819c8ecf84f66ce1fe308a0ab5099012059e (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
29
30
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk

pkglibexecdir = $(libexecdir)/libretools/chroot
pkglibdir = $(libdir)/libretools/chroot

libretools.src.devtools = makechrootpkg.in mkarchroot.in arch-nspawn.in
libretools.out.bins     = librechroot libremakepkg
libretools.out.libexecs = arch-nspawn chcleanup distcc-tool indent mkarchroot
libretools.out.libs     = $(libretools.src.sh) makechrootpkg.sh
files.out.int          += chcleanup.lib
files.sys.libretools   += $(bindir)/chcleanup # not in libretools.out.bins because explicit rule

$(srcdir)/makechrootpkg.sh.in: $(srcdir)/makechrootpkg.in
	sed -e '1s^.*^#!/hint/bash -euE^' -e '/^\s*main "$$@"\s*$$/d' < $< > $@

$(outdir)/chcleanup: $(srcdir)/chcleanup.in $(outdir)/chcleanup.lib
	m4 -I$(@D) -P $< | $(libretools.edit) | install -m755 /dev/stdin $@
$(outdir)/chcleanup.lib: $(srcdir)/chcleanup.lib.gen $(call at.path,$(topoutdir)/src/lib/common.sh)
	$(abspath $^) > $@

$(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.subdirs += ../lib

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