Linked Questions

Popular Questions

Make not building dot files before pdf

Asked by At

I have the current folder structure for my project

├── Makefile
└── S6
    └── graphviz

2 directories, 5 files

I am building separate pdfs for each and every markdown file, here is my Makefile

# Generate PDFs from the Markdown source files
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc

# All markdown files are considered sources
MD_SOURCES := $(wildcard **/*.md)
DOT_SOURCES := $(wildcard **/*.dot)


# Recipe for building png files from dot files
    dot \
        -Tpng $< \
        -o [email protected]

# Recipe for converting a Markdown file into PDF using Pandoc
    pandoc \
        --variable fontsize=12pt \
        --variable date:"\today" \
        --variable geometry:a4paper \
        --variable documentclass:book \
        --table-of-contents \
        --number-sections \
        --filter pandoc-fignos \
        -f markdown  $< \
        -o [email protected]

.PHONY : clean

    $(RM) $^

I want to embed the output of the dot program into the latex pdf's but here the Makefile does not make the dot files into png and goes straight into compiling the pdf.

This makes the pdf compilation run into errors as the png files are not present.

Related Questions