forked from Plemya-x/ALR
		
	Fixed Makefile
This commit is contained in:
		
							
								
								
									
										13
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Makefile
									
									
									
									
									
								
							@@ -4,17 +4,19 @@ GIT_VERSION = $(shell git describe --tags )
 | 
				
			|||||||
DESTDIR ?=
 | 
					DESTDIR ?=
 | 
				
			||||||
PREFIX ?= /usr/local
 | 
					PREFIX ?= /usr/local
 | 
				
			||||||
BIN := ./$(NAME)
 | 
					BIN := ./$(NAME)
 | 
				
			||||||
INSTALED_BIN := $(DESTDIR)$(PREFIX)/bin/$(NAME)
 | 
					INSTALED_BIN := $(DESTDIR)/$(PREFIX)/bin/$(NAME)
 | 
				
			||||||
COMPLETIONS_DIR := ./scripts/completion
 | 
					COMPLETIONS_DIR := ./scripts/completion
 | 
				
			||||||
BASH_COMPLETION := $(COMPLETIONS_DIR)/bash
 | 
					BASH_COMPLETION := $(COMPLETIONS_DIR)/bash
 | 
				
			||||||
ZSH_COMPLETION := $(COMPLETIONS_DIR)/zsh
 | 
					ZSH_COMPLETION := $(COMPLETIONS_DIR)/zsh
 | 
				
			||||||
INSTALLED_BASH_COMPLETION := $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$(NAME)
 | 
					INSTALLED_BASH_COMPLETION := $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$(NAME)
 | 
				
			||||||
INSTALLED_ZSH_COMPLETION := $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_$(NAME)
 | 
					INSTALLED_ZSH_COMPLETION := $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_$(NAME)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: install clean clear uninstall check-no-root
 | 
					.PHONY: build install clean clear uninstall check-no-root
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build: check-no-root $(BIN)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export CGO_ENABLED := 0
 | 
					export CGO_ENABLED := 0
 | 
				
			||||||
$(BIN): check-no-root
 | 
					$(BIN):
 | 
				
			||||||
	go build \
 | 
						go build \
 | 
				
			||||||
		-ldflags="-X 'gitverse.ru/Xpamych/ALR/internal/config.Version=$(GIT_VERSION)'" \
 | 
							-ldflags="-X 'gitverse.ru/Xpamych/ALR/internal/config.Version=$(GIT_VERSION)'" \
 | 
				
			||||||
		-o $@
 | 
							-o $@
 | 
				
			||||||
@@ -25,7 +27,10 @@ check-no-root:
 | 
				
			|||||||
		exit 1; \
 | 
							exit 1; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
install: $(INSTALED_BIN) $(INSTALLED_BASH_COMPLETION) $(INSTALLED_ZSH_COMPLETION)
 | 
					install: \
 | 
				
			||||||
 | 
						$(INSTALED_BIN) \
 | 
				
			||||||
 | 
						$(INSTALLED_BASH_COMPLETION) \
 | 
				
			||||||
 | 
						$(INSTALLED_ZSH_COMPLETION)
 | 
				
			||||||
	@echo "Installation done!"
 | 
						@echo "Installation done!"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(INSTALED_BIN): $(BIN)
 | 
					$(INSTALED_BIN): $(BIN)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user