Skip to content

Commit

Permalink
Added checks for availability of dia and ditaa
Browse files Browse the repository at this point in the history
Fixes #642 (Missing error message when ditaa is not installed)
  • Loading branch information
fsundermeyer committed Mar 7, 2024
1 parent c51d96d commit 43ba63c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions make/images.mk
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,23 @@ USED_SVG := $(filter \
USED_ALL := $(USED_DIA) $(USED_DITAA) $(USED_JPG) \
$(USED_ODG) $(USED_PNG) $(USED_SVG)


# check the availability of dia and ditaa
#
ifneq "$(USED_DIA)" ""
HAVE_DIA = $(shell command -v dia 2>/dev/null)
ifeq "$(HAVE_DIA)" ""
$(error $(shell ccecho "error" "Error: dia is not installed, can't process $(USED_DIA)"))
endif
endif
ifneq "$(USED_DITAA)" ""
HAVE_DIA = $(shell command -v ditaa 2>/dev/null)
ifeq "$(HAVE_DITAA)" ""
$(error $(shell ccecho "error" "Error: ditaa is not installed, can't process $(USED_DITAA)"))
endif
endif


# generated images
#
GEN_PNG := $(subst .dia,.png,$(notdir $(USED_DIA))) \
Expand Down

0 comments on commit 43ba63c

Please sign in to comment.