future-install-scripts/Makefile

51 lines
1.2 KiB
Makefile
Raw Normal View History

VER=26
PREFIX = /usr/local
2012-06-19 01:06:17 +08:00
BINPROGS = \
arch-chroot \
genfstab \
pacstrap
2019-06-04 14:02:52 +08:00
MANS = \
doc/arch-chroot.8 \
doc/genfstab.8 \
doc/pacstrap.8
BASH = bash
2019-06-04 13:59:58 +08:00
all: $(BINPROGS) man
man: $(MANS)
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 22:04:45 +08:00
%: %.in common
$(edit)
2019-06-04 13:59:58 +08: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 $<
clean:
2019-06-04 13:59:58 +08:00
$(RM) $(BINPROGS) $(MANS)
check: all
2013-12-09 01:16:58 +08:00
@for f in $(BINPROGS); do bash -O extglob -n $$f; done
@r=0; for t in test/test_*; do $(BASH) $$t || { echo $$t fail; r=1; }; done; exit $$r
install: all
2012-06-19 01:06:17 +08:00
install -dm755 $(DESTDIR)$(PREFIX)/bin
install -m755 $(BINPROGS) $(DESTDIR)$(PREFIX)/bin
install -Dm644 completion/_archinstallscripts.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_archinstallscripts
cd completion; for comp in *.bash; do \
install -Dm644 $$comp $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$${comp%%.*}; \
done;
2019-06-04 13:59:58 +08:00
for manfile in $(MANS); do \
install -Dm644 $$manfile -t $(DESTDIR)$(PREFIX)/share/man/man$${manfile##*.}; \
done;
.PHONY: all man clean check install