|
8 | 8 | # |
9 | 9 | WITH_DOC := $(strip $(foreach x,doc man doxygen,$(findstring $(x),$(MAKECMDGOALS)))) |
10 | 10 |
|
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 | | - |
33 | 11 | # |
34 | 12 | # Skip documentation if any of the necessary prerequisites are missing. |
35 | 13 | # |
|
57 | 35 | # If we still decide to build the documentation, then add in all of the documentation rules. |
58 | 36 | # |
59 | 37 | 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 | + |
60 | 60 | all.doc: docsite |
61 | 61 |
|
62 | 62 | install: install.doc |
@@ -282,6 +282,10 @@ doc.fixascii: |
282 | 282 | @perl -p -i -e "s,‘,',g;s,’,',g;s,–,-,g;s,—,-,g;s, , ,g;s:…:,:g;s,“,\",g;s,”,\",g;s,≤,<=,g;s,≥,>=,g;s,→,->,g" $$(find doc/antora -name "*.adoc" -print) |
283 | 283 |
|
284 | 284 |
|
| 285 | +.PHONY: doc.copyright |
| 286 | +doc.copyright: |
| 287 | + perl -p -i -e "s/Copyright \(C\) 2.../Copyright (C) $$(date +%Y)/" $$(git grep -l 'Copyright' $$(find doc/antora/ -name "*.adoc" -print)) |
| 288 | + |
285 | 289 | doc: build/docsite/sitemap.xml |
286 | 290 |
|
287 | 291 | # end of WITH_DOC |
|
0 commit comments