# Makefile for SDP docs from AsciiDoctor format to HTML and PDF SRC = $(wildcard *.adoc) PDF = $(SRC:.adoc=.pdf) HTML = $(SRC:.adoc=.html) SCRIPT_MAN_PAGE_GENERATOR = ../../tools/gen_script_man_pages.sh # Warning: Using a wildcard here eases maintenance, but will # not trigger a make if generated doc files are removed. Handle # such a situation manually. SDP_GUIDE_UNIX_GENDOCS = $(wildcard gen/*.man.txt) # Default target 'all' builds PDF and HTML from *.adoc files. For # any referenced generated man pages, current files in the 'gen' # directory are used. See 'full'. all: $(PDF) $(HTML) # The 'full' target ensures docs are generated from the latest # files. It does a 'p4 sync' in the SDP workspace to ensure # we have the latest scripts. # # WARNING: The 'full' target does a 'p4 sync' and could potentially # schedule a resolve. If a resolve is needed for scripts from # which docs are generated, generated docs will be incorrect. full: $(PDF) $(HTML) GenerateScriptManPages .PHONY: GenerateScriptManPages GenerateScriptManPages: p4 -s sync $(SCRIPT_MAN_PAGE_GENERATOR) -rec # General Rule for converting AsciiDoc files to HTML. %.html: %.adoc asciidoctor $^ # General Rule for converting AsciiDoc files to PDF. %.pdf: %.adoc asciidoctor-pdf -a pdf-themesdir=themes -a pdf-theme=basic $^ # Specific Rule for building SDP_Guide.Unix.html with generated docs. SDP_Guide.Unix.html: SDP_Guide.Unix.adoc $(SDP_GUIDE_UNIX_GENDOCS) asciidoctor SDP_Guide.Unix.adoc # Specific Rule for building SDP_Guide.Unix.pdf with generated docs. SDP_Guide.Unix.pdf: SDP_Guide.Unix.adoc $(SDP_GUIDE_UNIX_GENDOCS) asciidoctor-pdf -a pdf-themesdir=themes -a pdf-theme=basic SDP_Guide.Unix.adoc .PHONY: clean clean: rm -f $(PDF) $(HTML)
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 27246 | Jessie Fernandez | Branch for Jessie Fernandez | ||
//guest/perforce_software/sdp/dev/doc/Makefile | |||||
#5 | 27049 | C. Thomas Tyler |
Enhanced doc generation Makefile: * Added new 'full' target to 'p4 sync' and generate script man pages. * Added new 'GenerateAllScriptManPages' target. * Added dependency on generated script man pages. |
||
#4 | 27041 | Robert Cowham |
Windows Guide directly includes chunks of the Unix guide for replication etc, with a little ifdef to avoid Unix only comments. Fix Makefile and add missing generated man page. |
||
#3 | 26783 | C. Thomas Tyler |
Enhanced Makefile for AsciiDocc to support building individual targets, and also incrementally build only what's needed. |
||
#2 | 26629 | Robert Cowham |
Fixed Makefile to generate HTML Check in theme Some notes in README Remove the .docx! |
||
#1 | 26628 | Robert Cowham | Basically have things working for AsciiDoc |