Move mans to the new Makefile layout
This commit is contained in:
parent
e452acb30e
commit
8029fae6a9
6
Makefile
6
Makefile
|
@ -20,6 +20,7 @@ include i3-nagbar/i3-nagbar.mk
|
|||
include i3bar/i3bar.mk
|
||||
include i3-dump-log/i3-dump-log.mk
|
||||
include docs/docs.mk
|
||||
include man/man.mk
|
||||
|
||||
real-all: $(ALL_TARGETS)
|
||||
|
||||
|
@ -35,7 +36,6 @@ dist: distclean
|
|||
mkdir i3-${VERSION}/docs
|
||||
# Pre-generate documentation
|
||||
$(MAKE) docs
|
||||
$(MAKE) -C i3bar/doc
|
||||
# Cleanup τεχ output files
|
||||
find docs -regex ".*\.\(aux\|out\|log\|toc\|bm\|dvi\|log\)" -exec rm '{}' \;
|
||||
find docs -maxdepth 1 -type f ! \( -name "*.xcf" -or -name "*.svg" \) -exec cp '{}' i3-${VERSION}/docs \;
|
||||
|
@ -44,15 +44,13 @@ dist: distclean
|
|||
find i3-input -maxdepth 1 -type f \( -name "*.c" -or -name "*.h" -or -name "Makefile" \) -exec cp '{}' i3-${VERSION}/i3-input \;
|
||||
sed -e 's/^GIT_VERSION:=\(.*\)/GIT_VERSION:=$(shell /bin/echo '${GIT_VERSION}' | sed 's/\\/\\\\/g')/g;s/^VERSION:=\(.*\)/VERSION:=${VERSION}/g' common.mk > i3-${VERSION}/common.mk
|
||||
# Pre-generate a manpage to allow distributors to skip this step and save some dependencies
|
||||
$(MAKE) -C man
|
||||
$(MAKE) mans
|
||||
cp man/*.1 i3-${VERSION}/man/
|
||||
cp i3bar/doc/*.1 i3-${VERSION}/i3bar/doc/
|
||||
tar cfj i3-${VERSION}.tar.bz2 i3-${VERSION}
|
||||
rm -rf i3-${VERSION}
|
||||
|
||||
clean: $(CLEAN_TARGETS)
|
||||
(which lcov >/dev/null 2>&1 && lcov -d . --zerocounters) || true
|
||||
$(MAKE) -C man clean
|
||||
|
||||
distclean: clean $(DISTCLEAN_TARGETS)
|
||||
|
||||
|
|
|
@ -147,6 +147,7 @@ ifeq ($(V),0)
|
|||
|
||||
# echo-ing vars
|
||||
V_ASCIIDOC = echo ASCIIDOC $@;
|
||||
V_A2X = echo A2X $@;
|
||||
endif
|
||||
|
||||
# Always remake the following targets
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
all: i3bar.1
|
||||
|
||||
i3bar.1: i3bar.man
|
||||
echo "A2X i3bar"
|
||||
a2x --no-xmllint -f manpage i3bar.man
|
||||
clean:
|
||||
rm -f i3bar.xml i3bar.1 i3bar.html
|
||||
|
||||
distclean: clean
|
16
man/Makefile
16
man/Makefile
|
@ -1,15 +1,7 @@
|
|||
A2M:=a2x -f manpage --asciidoc-opts="-f asciidoc.conf"
|
||||
|
||||
all: i3.1 i3-msg.1 i3-input.1 i3-nagbar.1 i3-config-wizard.1 i3-migrate-config-to-v4.1 i3-sensible-editor.1 i3-sensible-pager.1 i3-sensible-terminal.1 i3-dump-log.1
|
||||
|
||||
%.1: %.man asciidoc.conf
|
||||
${A2M} $<
|
||||
all:
|
||||
$(MAKE) -C .. mans
|
||||
|
||||
clean:
|
||||
for file in $$(echo i3 i3-msg i3-input i3-nagbar i3-wsbar i3-config-wizard i3-migrate-config-to-v4 i3-sensible-editor i3-sensible-pager i3-sensible-terminal i3-dump-log); \
|
||||
do \
|
||||
rm -f $${file}.1 $${file}.html $${file}.xml; \
|
||||
done
|
||||
$(MAKE) -C .. clean-mans
|
||||
|
||||
distclean: clean
|
||||
rm -f *.1
|
||||
.PHONY: all clean
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
DISTCLEAN_TARGETS += clean-mans
|
||||
|
||||
A2X = a2x
|
||||
|
||||
A2X_MAN_CALL = $(V_A2X)$(A2X) -f manpage --asciidoc-opts="-f man/asciidoc.conf" $(A2X_FLAGS) $<
|
||||
|
||||
MANS_1 = \
|
||||
man/i3.1 \
|
||||
man/i3bar.1 \
|
||||
man/i3-msg.1 \
|
||||
man/i3-input.1 \
|
||||
man/i3-nagbar.1 \
|
||||
man/i3-config-wizard.1 \
|
||||
man/i3-migrate-config-to-v4.1 \
|
||||
man/i3-sensible-editor.1 \
|
||||
man/i3-sensible-pager.1 \
|
||||
man/i3-sensible-terminal.1 \
|
||||
man/i3-dump-log.1
|
||||
|
||||
MANS = \
|
||||
$(MANS_1)
|
||||
|
||||
mans: $(MANS)
|
||||
|
||||
$(MANS_1): %.1: %.man man/asciidoc.conf
|
||||
$(A2X_MAN_CALL)
|
||||
|
||||
clean-mans:
|
||||
for file in $(notdir $(MANS)); \
|
||||
do \
|
||||
rm -f man/$${file} man/$${file%.*}.html man/$${file%.*}.xml; \
|
||||
done
|
Loading…
Reference in New Issue