Skip to content

Commit c712dd5

Browse files
committed
move "run asciidoctor" code
into block where we have asciidoctor
1 parent 6ae6b6e commit c712dd5

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

doc/all.mk

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,6 @@
88
#
99
WITH_DOC := $(strip $(foreach x,doc man doxygen,$(findstring $(x),$(MAKECMDGOALS))))
1010

11-
#
12-
# Convert adoc to man, and then let "install.man" deal with things.
13-
# This means a bare "make install.man" after "configure" won't get the
14-
# right things, but oh well.
15-
#
16-
ADOC2MAN_FILES := $(filter-out %/index.adoc,$(wildcard doc/antora/modules/reference/pages/man/*.adoc))
17-
$(BUILD_DIR)/make/man.mk: $(ADOC2MAN_FILES) | $(BUILD_DIR)/make
18-
@rm -f $@
19-
${Q}for x in $^; do \
20-
y=$$(grep :manvolnum: $$x | awk '{print $$2}'); \
21-
z=$$(basename $$x | sed 's/.adoc//'); \
22-
echo "AUTO_MAN_FILES += man/man$$y/$$z.$$y" >> $@; \
23-
echo "man/man$$y/$$z.$$y: $$x" >> $@; \
24-
printf "\t"'@echo AUTO-MAN $$(notdir $$@)'"\n" >> $@; \
25-
printf "\t"'@mkdir -p $$(dir $$@)'"\n" >> $@; \
26-
printf "\t"'@asciidoctor -b manpage $$< -o $$@'"\n" >> $@; \
27-
echo "" >> $@; \
28-
done
29-
30-
-include $(BUILD_DIR)/make/man.mk
31-
ALL_INSTALL += $(AUTO_MAN_FILES)
32-
3311
#
3412
# Skip documentation if any of the necessary prerequisites are missing.
3513
#
@@ -57,6 +35,28 @@ endif
5735
# If we still decide to build the documentation, then add in all of the documentation rules.
5836
#
5937
ifneq "$(WITH_DOC)" ""
38+
#
39+
# Convert adoc to man, and then let "install.man" deal with things.
40+
# This means a bare "make install.man" after "configure" won't get the
41+
# right things, but oh well.
42+
#
43+
ADOC2MAN_FILES := $(filter-out %/index.adoc,$(wildcard doc/antora/modules/reference/pages/man/*.adoc))
44+
$(BUILD_DIR)/make/man.mk: $(ADOC2MAN_FILES) | $(BUILD_DIR)/make
45+
@rm -f $@
46+
${Q}for x in $^; do \
47+
y=$$(grep :manvolnum: $$x | awk '{print $$2}'); \
48+
z=$$(basename $$x | sed 's/.adoc//'); \
49+
echo "AUTO_MAN_FILES += man/man$$y/$$z.$$y" >> $@; \
50+
echo "man/man$$y/$$z.$$y: $$x" >> $@; \
51+
printf "\t"'@echo AUTO-MAN $$(notdir $$@)'"\n" >> $@; \
52+
printf "\t"'@mkdir -p $$(dir $$@)'"\n" >> $@; \
53+
printf "\t"'@asciidoctor -b manpage $$< -o $$@'"\n" >> $@; \
54+
echo "" >> $@; \
55+
done
56+
57+
-include $(BUILD_DIR)/make/man.mk
58+
ALL_INSTALL += $(AUTO_MAN_FILES)
59+
6060
all.doc: docsite
6161

6262
install: install.doc

0 commit comments

Comments
 (0)