diff --git a/plantuml.mk b/plantuml.mk index 9af6e9c..ee7c86e 100644 --- a/plantuml.mk +++ b/plantuml.mk @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +# +# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland +# Copyright © 2023 Glenn Y. Rolland + ## ## PLANTUML MODULE ## @@ -13,13 +18,12 @@ PLANTUML_DEST_DIR ?= ## Internal variables (lazy recursive evaluation) ## -## Find .uml graphs +## Find .uml files PLANTUML_UML = $(shell find $(PLANTUML_SRC_DIR) \( -name '*.uml' ! -name '_*' \)) PLANTUML_UML_PNG = $(patsubst $(PLANTUML_SRC_DIR)/%.uml,$(PLANTUML_DEST_DIR)/%.uml.png,$(PLANTUML_UML)) PLANTUML_UML_SVG = $(patsubst $(PLANTUML_SRC_DIR)/%.uml,$(PLANTUML_DEST_DIR)/%.uml.svg,$(PLANTUML_UML)) PLANTUML_UML_PDF = $(patsubst $(PLANTUML_SRC_DIR)/%.uml,$(PLANTUML_DEST_DIR)/%.uml.pdf,$(PLANTUML_UML)) - ## ## Rules ## @@ -34,8 +38,10 @@ $(PLANTUML_DEST_DIR)/%.uml.svg: $(PLANTUML_SRC_DIR)/%.uml | $(PLANTUML_DEST_DIR) podman run -i plantuml/plantuml plantuml -pipe -tsvg < $< > $@ $(PLANTUML_DEST_DIR)/%.uml.pdf: $(PLANTUML_DEST_DIR)/%.uml.svg | $(PLANTUML_DEST_DIR) - #podman run -i plantuml/plantuml plantuml -pipe -tpdf < $< > $@ - rsvg-convert -f pdf -o $@ $< + # podman run -i plantuml/plantuml plantuml -pipe -tpdf < $< > $@ + # rsvg-convert -f pdf -o $@ $< + rsvg-convert -f ps $< | gs -sDEVICE=pdfwrite -sOutputFile=$@ -f - + .PHONY: plantuml-uml-svg plantuml-uml-svg: $(PLANTUML_UML_SVG) @@ -79,5 +85,3 @@ plantuml-info: @echo "PLANTUML_UML_PDF: $(PLANTUML_UML_PDF)" @echo "PLANTUML_UML_SVG: $(PLANTUML_UML_SVG)" -.SUFFIXES: -