diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-09-18 16:28:50 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-09-18 16:28:50 +0800 |
| commit | ceda8e88cd188283cd526783f0ee0a9f2225dcef (patch) | |
| tree | 0a625fe70667f3938f267096abc04d01cc16d5a6 | |
| parent | 3adeac38008fb4e73df3cca5e46a9787090fe6c8 (diff) | |
| download | lex-ceda8e88cd188283cd526783f0ee0a9f2225dcef.tar.gz | |
Remove target from install to allow installing from pre-compiled binary.
| -rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 |
