diff --git a/docs/en/Makefile b/docs/en/Makefile index 8085ed9fd6b..b2340d689e0 100644 --- a/docs/en/Makefile +++ b/docs/en/Makefile @@ -18,9 +18,9 @@ $(DIST)/html : dist html : $(DIST)/html $(ECHO) Generating HTML book - $(PANDOC) --number-sections --toc -s 0[1-9]-*/*.md --css=$(CSS) --template=templates/html.template --include-before=templates/before.html --include-after=templates/after.html -o $(DIST)/html/RunDeck-Guide.html + $(PANDOC) --number-sections --toc -s 0[0-9]-*/*.md --css=$(CSS) --template=templates/html.template --include-before=templates/before.html --include-after=templates/after.html -o $(DIST)/html/RunDeck-Guide.html cp $(CSS) $(DIST)/html clean : - rm -r $(DIST) + rm -fr $(DIST) $(MAKE) -C manpages clean diff --git a/docs/en/manpages/Makefile b/docs/en/manpages/Makefile index 5cb77433bb9..8545494636d 100644 --- a/docs/en/manpages/Makefile +++ b/docs/en/manpages/Makefile @@ -1,34 +1,11 @@ include ../../Makefile.inc -DIST = ../dist -.SUFFIXES: .1.gz .1 +DIRS = man1 man5 -manpages: dispatch.1.gz job-v20.1.gz rd-jobs.1.gz rd-options.1.gz rd-setup.1.gz rd-queue.1.gz resource-v10.1.gz run.1 - -rundeck-guide.1: - pandoc -s -w man ../0[1-9]-*/*.md -o rundeck-guide.1 - -%.1.gz: %.1 - gzip < $< > $@ - -%.1: - pandoc -s -w man $@.md -o $@ - -PAGES = dispatch.1 job-v20.1 rd-jobs.1 rd-options.1 rd-setup.1 rd-queue.1 resource-v10.1 run.1 - -publish : roff html - -roff : - $(ECHO) Generating system man pages - mkdir -p $(DIST)/man/man1 - -for f in $(PAGES); do ( $(PANDOC) -s -w man $$f.md -o $(DIST)/man/man1/$$f; ); done - -html : - $(ECHO) Generating html for system man pages - mkdir -p $(DIST)/html - -for f in $(PAGES); do ( $(PANDOC) -s -w html $$f.md -o $(DIST)/html/$$f.html; ); done - -clean : - rm *.1 *.1.gz +.PHONY: all clean +all : $(DIRS) + $(MAKE) -C $< +clean : $(DIRS) + $(MAKE) -C $< clean diff --git a/docs/en/manpages/man1/Makefile b/docs/en/manpages/man1/Makefile index 72f8e92ee47..cd79fe8b27c 100644 --- a/docs/en/manpages/man1/Makefile +++ b/docs/en/manpages/man1/Makefile @@ -29,6 +29,6 @@ html : -for f in $(PAGES); do ( $(PANDOC) -s -w html $$f.md -o $(DIST)/html/$$f.html; ); done clean : - rm *.1 *.1.gz + rm -f *.1 *.1.gz diff --git a/docs/en/manpages/man5/Makefile b/docs/en/manpages/man5/Makefile index 02d9b4e1a71..e2f6d9c72cd 100644 --- a/docs/en/manpages/man5/Makefile +++ b/docs/en/manpages/man5/Makefile @@ -26,6 +26,6 @@ html : -for f in $(PAGES); do ( $(PANDOC) -s -w html $$f.md -o $(DIST)/html/$$f.html; ); done clean : - rm *.5 *.5.gz + rm -f *.5 *.5.gz