src/world/zsh/Makefile

42 lines
1.2 KiB
Makefile
Raw Normal View History

# Makefile - hhl - /usr/src/world/zsh
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = zsh
include world.mk
export CFLAGS = --sysroot=$(DESTDIR)
config_opts += --host=$(tgt)
config_opts += --bindir=/bin
config_opts += --sysconfdir=/etc
config_opts += --cache-file=zsh-config.cache
texi = $(srcdir)/Doc/zsh.texi
zsh_docdir = $(docdir)/zsh/$(zsh_version)
objdoc = $(objdir)/Doc
define pre_configure
$(MAKE) -C $(distdir) zsh-$(zsh_version)-doc.tar.xz
tar xf $(distdir)/zsh-$(zsh_version)-doc.tar.xz \
-C $(global_srcdir)
cp -af $(srcdir)/Doc $(objdir)/
install zsh-config.cache $(objdir)
endef
define post_build
install -d $(objdir)/Doc/html
makeinfo $(texi) --plaintext -o $(objdoc)/zsh.txt
makeinfo $(texi) --html -o $(objdoc)/html
makeinfo $(texi) --html --no-split --no-headers -o $(objdoc)/zsh.html
endef
define post_install
$(MAKE) infodir=$(infodir) -C $(objdir) install.info
install -d $(zsh_docdir)/html
install -m644 $(objdoc)/html/* $(zsh_docdir)/html
install -m644 $(objdoc)/zsh.html $(zsh_docdir)
install -m644 $(objdoc)/zsh.txt $(zsh_docdir)
$(MAKE) htmldir=$(zsh_docdir)/html -C $(objdir) install.html
endef
include targets.mk