From ceda8e88cd188283cd526783f0ee0a9f2225dcef Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Fri, 18 Sep 2026 16:28:50 +0800 Subject: Remove target from install to allow installing from pre-compiled binary. --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2763928..b53033d 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ MKDIR_P = mkdir -p SERVICE_USER = _lexd SERVICE_GROUP = _lexd -.PHONY: all clean distclean +.PHONY: all clean distclean install install-user uninstall all: $(TARGET) @@ -100,11 +100,15 @@ install-user: useradd -g $(SERVICE_GROUP) -s /sbin/nologin -m -c "lexd daemon user" $(SERVICE_USER); \ fi -install: $(TARGET) install-user +install: install-user + @if [ ! -f $(TARGET) ]; then \ + echo "Error: $(TARGET) executable not found. Please build it first or provide the binary." >&2; \ + exit 1; \ + fi @$(MKDIR_P) $(BINDIR) @echo "===> Installing executable to $(BINDIR)/$(TARGET)..." @$(INSTALL_PROGRAM) $(TARGET) $(BINDIR)/$(TARGET) - @echo "===> Installing RC script to $(DESTDIR)$(RCDIR)/$(TARGET)..." + @echo "===> Installing RC script to $(RCDIR)/$(TARGET)..." @$(MKDIR_P) $(RCDIR) @$(INSTALL_SCRIPT) $(TARGET).rc $(RCDIR)/$(TARGET) @echo "===> Creating data directory $(VARDIR)..." @@ -129,5 +133,4 @@ clean: rm -f $(TARGET) $(OBJS) distclean: clean - rm -rf deps - + rm -rf deps \ No newline at end of file -- cgit v1.2.3