Files
lammps/doc/graphviz/Makefile
Axel Kohlmeyer 91eaaba1be improve portability of docs makefile
- detect if /bin/bash is not found and provide a suitable error message
- use $(MAKE) and $(MFLAGS) variables to handle cases where GNU make is not called "make"
2020-09-17 12:40:09 -04:00

30 lines
661 B
Makefile

# Makefile for generating images with graphviz
#
BUILDDIR = ${CURDIR}/..
IMGDIR = $(BUILDDIR)/src/JPG
IMGSRC = $(wildcard *.dot)
IMGPNG = $(IMGSRC:%.dot=$(IMGDIR)/%.png)
HAS_DOT = NO
ifeq ($(shell which dot >/dev/null 2>&1; echo $$?), 0)
HAS_DOT = YES
endif
all: $(IMGPNG)
clean:
rm -f $(IMGSVG) $(IMGPDF) $(IMGPNG) *~
ifeq ($(HAS_DOT),YES)
$(IMGDIR)/%.png: %.dot
dot -Tpng -o $@ $<
endif
ifeq ($(HAS_DOT),NO)
$(IMGDIR)/%.png: %.dot
@echo '###################################################'
@echo '# Need to install "graphviz" to regenerate graphs #'
@echo '###################################################'
endif