Просмотр исходного кода

Test asciidoc with more than one man section

Loïc Hoguin 8 лет назад
Родитель
Сommit
4f5d8d7064
2 измененных файлов с 11 добавлено и 5 удалено
  1. 2 2
      plugins/asciidoc.mk
  2. 9 3
      test/plugin_asciidoc.mk

+ 2 - 2
plugins/asciidoc.mk

@@ -65,14 +65,14 @@ asciidoc-manual:: doc-deps
 
 asciidoc-manual:: $(ASCIIDOC_MANUAL_FILES)
 	$(call erlang,$(call asciidoc2man.erl,$?))
-	$(foreach s,$(MAN_SECTIONS),mkdir -p doc/man$s/ && mv doc/src/manual/*.$s.gz doc/man$s/)
+	$(foreach s,$(MAN_SECTIONS),mkdir -p doc/man$s/ && mv doc/src/manual/*.$s.gz doc/man$s/;)
 
 install-docs:: install-asciidoc
 
 install-asciidoc: asciidoc-manual
 	$(foreach s,$(MAN_SECTIONS),\
 		mkdir -p $(MAN_INSTALL_PATH)/man$s/ && \
-		install -g `id -u` -o `id -g` -m 0644 doc/man$s/*.gz $(MAN_INSTALL_PATH)/man$s/)
+		install -g `id -u` -o `id -g` -m 0644 doc/man$s/*.gz $(MAN_INSTALL_PATH)/man$s/;)
 
 distclean-asciidoc-manual:
 	$(gen_verbose) rm -rf $(addprefix doc/man,$(MAN_SECTIONS))

+ 9 - 3
test/plugin_asciidoc.mk

@@ -17,9 +17,6 @@ asciidoc-build: build clean
 	$i "Add asciideck to the local dependencies"
 	$t perl -ni.bak -e 'print;if ($$.==1) {print "DOC_DEPS = asciideck\n"}' $(APP)/Makefile
 
-	$i "Only enable man pages section 3"
-	$t perl -ni.bak -e 'print;if ($$.==1) {print "MAN_SECTIONS = 3\n"}' $(APP)/Makefile
-
 	$i "Run AsciiDoc"
 	$t $(MAKE) -C $(APP) asciidoc $v
 
@@ -27,6 +24,7 @@ asciidoc-build: build clean
 	$t test ! -e $(APP)/doc/guide.pdf
 	$t test ! -e $(APP)/doc/html/
 	$t test ! -e $(APP)/doc/man3/
+	$t test ! -e $(APP)/doc/man7/
 
 	$i "Generate AsciiDoc documentation"
 	$t mkdir -p $(APP)/doc/src/guide/ $(APP)/doc/src/manual/
@@ -39,6 +37,12 @@ asciidoc-build: build clean
 		"erlang_mk - Erlang.mk test" "" \
 		"== Description" "" \
 		"Hello world!" > $(APP)/doc/src/manual/erlang_mk.asciidoc
+	$t printf "%s\n" \
+		"= erlang_mk(7)" "" \
+		"== Name" "" \
+		"erlang_mk - Erlang.mk application" "" \
+		"== Description" "" \
+		"Summer is better than winter!" > $(APP)/doc/src/manual/erlang_mk_app.asciidoc
 
 	$i "Run AsciiDoc"
 	$t $(MAKE) -C $(APP) asciidoc $v
@@ -47,6 +51,7 @@ asciidoc-build: build clean
 	$t test -f $(APP)/doc/guide.pdf
 	$t test -d $(APP)/doc/html/
 	$t test -f $(APP)/doc/man3/erlang_mk.3.gz
+	$t test -f $(APP)/doc/man7/erlang_mk.7.gz
 
 	$i "Distclean the application"
 	$t $(MAKE) -C $(APP) distclean $v
@@ -55,6 +60,7 @@ asciidoc-build: build clean
 	$t test ! -e $(APP)/doc/guide.pdf
 	$t test ! -e $(APP)/doc/html/
 	$t test ! -e $(APP)/doc/man3/
+	$t test ! -e $(APP)/doc/man7/
 
 	$i "Generate an invalid AsciiDoc file"
 	$t printf "%s\n" \