mirror of https://github.com/Hilbis/Hilbish
Compare commits
No commits in common. "c4438579f609ca6ac5b18705d6ec38384974f975" and "7f161e668319deb75f6a3959dea790d8fad2ce9e" have entirely different histories.
c4438579f6
...
7f161e6683
33
Makefile
33
Makefile
|
@ -1,30 +1,31 @@
|
||||||
PREFIX ?= /usr
|
PREFIX ?= /usr
|
||||||
|
DESTDIR ?=
|
||||||
BINDIR ?= $(PREFIX)/bin
|
BINDIR ?= $(PREFIX)/bin
|
||||||
LIBDIR ?= $(PREFIX)/share/hilbish
|
LIBDIR ?= $(PREFIX)/share/hilbish
|
||||||
|
|
||||||
MY_GOFLAGS = -ldflags "-s -w"
|
|
||||||
|
|
||||||
all: dev
|
|
||||||
|
|
||||||
dev: MY_GOFLAGS = -ldflags "-s -w -X main.version=$(shell git describe --tags)"
|
|
||||||
dev: build
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build $(MY_GOFLAGS)
|
@go build -ldflags "-s -w"
|
||||||
|
|
||||||
|
dev:
|
||||||
|
@go build -ldflags "-s -w -X main.version=$(shell git describe --tags)"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -v -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 -v hilbish "$(DESTDIR)$(BINDIR)/hilbish"
|
@install -v -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 -v hilbish "$(DESTDIR)$(BINDIR)/hilbish"
|
||||||
mkdir -p "$(DESTDIR)$(LIBDIR)"
|
@mkdir -p "$(DESTDIR)$(LIBDIR)"
|
||||||
cp -r libs docs emmyLuaDocs prelude .hilbishrc.lua "$(DESTDIR)$(LIBDIR)"
|
@cp libs docs emmyLuaDocs prelude .hilbishrc.lua "$(DESTDIR)$(LIBDIR)" -r
|
||||||
grep -qxF "$(DESTDIR)$(BINDIR)/hilbish" /etc/shells || echo "$(DESTDIR)$(BINDIR)/hilbish" >> /etc/shells
|
@grep "$(DESTDIR)$(BINDIR)/hilbish" -qxF /etc/shells || echo "$(DESTDIR)$(BINDIR)/hilbish" >> /etc/shells
|
||||||
|
@echo "Hilbish Installed"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -vrf \
|
@rm -vrf \
|
||||||
"$(DESTDIR)$(BINDIR)/hilbish" \
|
"$(DESTDIR)$(BINDIR)/hilbish" \
|
||||||
"$(DESTDIR)$(LIBDIR)"
|
"$(DESTDIR)$(LIBDIR)"
|
||||||
sed -i '/hilbish/d' /etc/shells
|
@sed -i '/hilbish/d' /etc/shells
|
||||||
|
@echo "Hilbish Uninstalled"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
go clean
|
@go clean
|
||||||
|
|
||||||
.PHONY: all dev build install uninstall clean
|
all: build install
|
||||||
|
|
||||||
|
.PHONY: install uninstall build dev clean
|
||||||
|
|
Loading…
Reference in New Issue