Makefile #2

  • //
  • guest/
  • perforce_software/
  • sdp/
  • main/
  • doc/
  • Makefile
  • View
  • Commits
  • Open Download .zip Download (2 KB)
# 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
	rm -f $@
	asciidoctor $^

# General Rule for converting AsciiDoc files to PDF.
%.pdf: %.adoc
	rm -f $@
	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)
	rm -f SDP_Guide.Unix.html
	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)
	rm -f SDP_Guide.Unix.pdf
	asciidoctor-pdf -a pdf-themesdir=themes -a pdf-theme=basic SDP_Guide.Unix.adoc

.PHONY: clean rec

clean:
	rm -f $(PDF) $(HTML)

rec:
	p4 rec
# Change User Description Committed
#9 31204 Will Kreitzmann Released SDP 2024.2.31193 (2025/01/17).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
#8 30915 C. Thomas Tyler Released SDP 2024.1.30913 (2024/11/20).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
#7 30043 C. Thomas Tyler Released SDP 2023.2.30041 (2023/12/22).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
#6 29891 C. Thomas Tyler Released SDP 2023.1.29699 (2023/07/11).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
#5 29701 C. Thomas Tyler Released SDP 2023.1.29699 (2023/07/11).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
#4 27761 C. Thomas Tyler Released SDP 2020.1.27759 (2021/05/07).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
#3 27541 C. Thomas Tyler Released SDP 2020.1.27536 (2021/02/28).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
#2 27400 C. Thomas Tyler Released SDP 2020.1.27398 (2021/02/06).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
#1 27331 C. Thomas Tyler Released SDP 2020.1.27325 (2021/01/29).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
//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