From a8a6c31d862ec1d491fc76ed21c46d7e0b35b7f2 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 17 Jun 2023 17:18:05 +0200 Subject: Rework build of images This allows to add svg image sources by simply adding their name to the Makefile. --- Makefile | 17 +++- doc/session.svg | 300 -------------------------------------------------------- img/session.svg | 300 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 315 insertions(+), 302 deletions(-) delete mode 100644 doc/session.svg create mode 100644 img/session.svg diff --git a/Makefile b/Makefile index 7d0d157..7db9cae 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,13 @@ DESKTOP_SRC=limox.desktop DESKTOP=$(BUILDDIR)/$(DESKTOP_SRC) DESKTOP_INSTALL=$(INSTALLATION)/share/applications/$(DESKTOP_SRC) +IMG_NAMES=session +IMG_DIR=$(BUILDDIR)/img +IMGS=$(foreach wrd,$(IMG_NAMES),$(IMG_DIR)/$(wrd).pdf) -all: $(LIMOX) $(DESKTOP) tests + + +all: $(LIMOX) $(DESKTOP) tests $(IMGS) $(BUILDDIR): mkdir $@ @@ -23,8 +28,14 @@ $(LIMOX): $(BUILDDIR) tests $(DESKTOP): $(BUILDDIR) cp $(DESKTOP_SRC) $@ +$(IMG_DIR): $(BUILDDIR) + mkdir $@ + +$(IMG_DIR)/%.pdf: img/%.svg $(IMG_DIR) + inkscape -o $@ $< + -.PHONY: clean debug install tests +.PHONY: clean debug install tests imgs clean: rm -rf $(BUILDDIR) @@ -38,3 +49,5 @@ install: $(LIMOX) tests: go test $(LIMOX_GO_PACKAGE)/... + +imgs: $(IMGS) diff --git a/doc/session.svg b/doc/session.svg deleted file mode 100644 index 0d628b6..0000000 --- a/doc/session.svg +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - - - - - - - - - xmpp.session «statemachine» - - - - - - - - - - xmpp.StartSession() - session.startTransport() - error - disconnect - </stream> - session.openStream() - - xmpp.stream - - - - connected - - - - idle - - - - - - - - - - diff --git a/img/session.svg b/img/session.svg new file mode 100644 index 0000000..0d628b6 --- /dev/null +++ b/img/session.svg @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + xmpp.session «statemachine» + + + + + + + + + + xmpp.StartSession() + session.startTransport() + error + disconnect + </stream> + session.openStream() + + xmpp.stream + + + + connected + + + + idle + + + + + + + + + + -- cgit v1.2.3-70-g09d2