fd8854ec0f
The "which" command is not a posix command. Additionally, if a file is not found, it outputs "command not found", so when checking to see if the response is "", that doesn't work. "command -v" is a posix compliant replacement that doesn't put out any text if the command is not found, so is more suitable in this case anyway. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I22207e818c847d50998f90c9abd55a3cb4bb2ab3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72922 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
56 lines
1.3 KiB
Makefile
56 lines
1.3 KiB
Makefile
## SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Makefile for coreboot paper.
|
|
# hacked together by Stefan Reinauer <stepan@openbios.org>
|
|
#
|
|
|
|
PDFLATEX=pdflatex -t a4
|
|
|
|
FIGS=codeflow.pdf hypertransport.pdf
|
|
|
|
all: corebootPortingGuide.pdf
|
|
|
|
SVG2PDF=$(shell command -v svg2pdf)
|
|
INKSCAPE=$(shell command -v inkscape)
|
|
CONVERT=$(shell command -v convert)
|
|
|
|
codeflow.pdf: codeflow.svg
|
|
ifneq ($(strip $(SVG2PDF)),)
|
|
svg2pdf $< $@
|
|
else ifneq ($(strip $(INKSCAPE)),)
|
|
inkscape $< --export-pdf=$@
|
|
else ifneq ($(strip $(CONVERT)),)
|
|
convert $< $@
|
|
endif
|
|
|
|
hypertransport.pdf: hypertransport.svg
|
|
ifneq ($(strip $(SVG2PDF)),)
|
|
svg2pdf $< $@
|
|
else ifneq ($(strip $(INKSCAPE)),)
|
|
inkscape $< --export-pdf=$@
|
|
else ifneq ($(strip $(CONVERT)),)
|
|
convert $< $@
|
|
endif
|
|
|
|
corebootPortingGuide.toc: $(FIGS) corebootBuildingGuide.tex
|
|
# 2 times to make sure we have a current toc.
|
|
$(PDFLATEX) corebootBuildingGuide.tex
|
|
$(PDFLATEX) corebootBuildingGuide.tex
|
|
|
|
corebootPortingGuide.pdf: $(FIGS) corebootBuildingGuide.tex corebootPortingGuide.toc
|
|
$(PDFLATEX) corebootBuildingGuide.tex
|
|
|
|
sphinx:
|
|
$(MAKE) -f Makefile.sphinx html
|
|
|
|
clean-sphinx:
|
|
$(MAKE) -f Makefile.sphinx clean
|
|
|
|
clean: clean-sphinx
|
|
rm -f *.aux *.idx *.log *.toc *.out $(FIGS)
|
|
|
|
distclean: clean
|
|
rm -f corebootPortingGuide.pdf
|
|
|
|
livesphinx:
|
|
$(MAKE) -f Makefile.sphinx livehtml SPHINXOPTS="$(SPHINXOPTS)"
|