diff --git a/Makefile b/Makefile index 75458a7..c10f03d 100644 --- a/Makefile +++ b/Makefile @@ -45,20 +45,34 @@ tools: cp -a data/tools/_lib $(CONFIG_DIR)/tools/ kde: - cmake -S kde -B kde/build -DCMAKE_INSTALL_PREFIX=$(PREFIX) - cmake --build kde/build -j$(JOBS) + @rm -f kde/build/.ollie-built + @if cmake -S kde -B kde/build -DCMAKE_INSTALL_PREFIX=$(PREFIX); then \ + if cmake --build kde/build -j$(JOBS); then \ + touch kde/build/.ollie-built; \ + else \ + echo "KDE build failed" >&2; \ + exit 1; \ + fi; \ + else \ + rm -f kde/build/.ollie-built; \ + echo "KDE dependencies not available; skipping KDE build"; \ + fi kde-kf5: cmake -S kde -B kde/build-kf5 -DOLLIE_KF5=ON -DCMAKE_INSTALL_PREFIX=$(PREFIX) cmake --build kde/build-kf5 -j$(JOBS) install: build test install-data - cmake --install kde/build - install -Dm644 kde/gui/org.ollie.gui.desktop $(PREFIX)/share/applications/org.ollie.gui.desktop - install -Dm644 kde/gui/ollie.svg $(PREFIX)/share/icons/hicolor/scalable/apps/ollie.svg - install -Dm755 kde/dolphin/ollie-actions.desktop $(PREFIX)/share/kio/servicemenus/ollie-actions.desktop - install -Dm755 kde/dolphin/ollie-ask $(BINDIR)/ollie-ask - install -Dm755 kde/dolphin/ollie-session-here $(BINDIR)/ollie-session-here + @if test -f kde/build/.ollie-built; then \ + cmake --install kde/build; \ + install -Dm644 kde/gui/org.ollie.gui.desktop $(PREFIX)/share/applications/org.ollie.gui.desktop; \ + install -Dm644 kde/gui/ollie.svg $(PREFIX)/share/icons/hicolor/scalable/apps/ollie.svg; \ + install -Dm755 kde/dolphin/ollie-actions.desktop $(PREFIX)/share/kio/servicemenus/ollie-actions.desktop; \ + install -Dm755 kde/dolphin/ollie-ask $(BINDIR)/ollie-ask; \ + install -Dm755 kde/dolphin/ollie-session-here $(BINDIR)/ollie-session-here; \ + else \ + echo "KDE build not available; skipping KDE install"; \ + fi install-kf5: build-kf5 test install-data cmake --install kde/build-kf5