2019-01-05 08:25:50 -08:00
|
|
|
VER=21
|
2012-06-18 02:07:37 -07:00
|
|
|
|
|
|
|
PREFIX = /usr/local
|
|
|
|
|
2012-06-18 10:06:17 -07:00
|
|
|
BINPROGS = \
|
|
|
|
arch-chroot \
|
|
|
|
genfstab \
|
|
|
|
pacstrap
|
2012-06-18 02:07:37 -07:00
|
|
|
|
2014-12-15 05:38:43 -08:00
|
|
|
BASH = bash
|
|
|
|
|
2019-06-03 22:59:58 -07:00
|
|
|
all: $(BINPROGS) man
|
|
|
|
man: $(MANS)
|
2012-06-18 02:07:37 -07:00
|
|
|
|
2012-09-07 13:32:39 -07:00
|
|
|
V_GEN = $(_v_GEN_$(V))
|
|
|
|
_v_GEN_ = $(_v_GEN_0)
|
|
|
|
_v_GEN_0 = @echo " GEN " $@;
|
|
|
|
|
|
|
|
edit = $(V_GEN) m4 -P $@.in >$@ && chmod go-w,+x $@
|
|
|
|
|
2012-12-12 06:04:45 -08:00
|
|
|
%: %.in common
|
2012-09-07 13:32:39 -07:00
|
|
|
$(edit)
|
2012-06-18 02:07:37 -07:00
|
|
|
|
2019-06-03 22:59:58 -07:00
|
|
|
doc/%: doc/%.asciidoc doc/asciidoc.conf doc/footer.asciidoc
|
|
|
|
$(V_GEN) a2x --no-xmllint --asciidoc-opts="-f doc/asciidoc.conf" -d manpage -f manpage -D doc $<
|
|
|
|
|
2012-06-18 02:07:37 -07:00
|
|
|
clean:
|
2019-06-03 22:59:58 -07:00
|
|
|
$(RM) $(BINPROGS) $(MANS)
|
2012-06-18 02:07:37 -07:00
|
|
|
|
2013-05-26 12:47:56 -07:00
|
|
|
check: all
|
2013-12-08 09:16:58 -08:00
|
|
|
@for f in $(BINPROGS); do bash -O extglob -n $$f; done
|
2014-12-15 05:38:43 -08:00
|
|
|
@r=0; for t in test/test_*; do $(BASH) $$t || { echo $$t fail; r=1; }; done; exit $$r
|
2013-05-26 12:47:56 -07:00
|
|
|
|
2012-07-15 07:07:26 -07:00
|
|
|
install: all
|
2012-06-18 10:06:17 -07:00
|
|
|
install -dm755 $(DESTDIR)$(PREFIX)/bin
|
2013-05-26 12:47:56 -07:00
|
|
|
install -m755 $(BINPROGS) $(DESTDIR)$(PREFIX)/bin
|
2012-07-22 19:37:14 -07:00
|
|
|
install -Dm644 zsh-completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_archinstallscripts
|
2019-06-03 22:59:58 -07:00
|
|
|
for manfile in $(MANS); do \
|
|
|
|
install -Dm644 $$manfile -t $(DESTDIR)$(PREFIX)/share/man/man$${manfile##*.}; \
|
|
|
|
done;
|
2012-06-18 02:07:37 -07:00
|
|
|
|
2018-08-25 03:56:05 -07:00
|
|
|
.PHONY: all clean install uninstall
|