Make Makefile POSIX-compliant
This commit is contained in:
parent
4235252172
commit
354d284289
21
Makefile
21
Makefile
@ -1,17 +1,10 @@
|
||||
SHELL = /bin/bash
|
||||
# Installation paths
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
SYSCONFDIR := $(PREFIX)/etc
|
||||
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
ifeq ($(BINDIR),)
|
||||
BINDIR := $(PREFIX)/bin
|
||||
endif
|
||||
ifeq ($(SYSCONFDIR),)
|
||||
SYSCONFDIR := $(PREFIX)/etc
|
||||
endif
|
||||
ifeq ($(GO),)
|
||||
GO := $(shell type -a -P go | head -n 1)
|
||||
endif
|
||||
# Compilers and tools
|
||||
GO ?= $(shell which go)
|
||||
|
||||
build:
|
||||
mkdir -p build
|
||||
@ -20,7 +13,7 @@ build:
|
||||
cd src/bpm-repo; $(GO) build -ldflags "-w" -o ../../build/bpm-repo git.enumerated.dev/bubble-package-manager/bpm-utils/src/bpm-repo
|
||||
cd src/bpm-setup; $(GO) build -ldflags "-w" -o ../../build/bpm-setup git.enumerated.dev/bubble-package-manager/bpm-utils/src/bpm-setup
|
||||
|
||||
install: build config/
|
||||
install: build/ config/
|
||||
# Create directories
|
||||
install -dm755 $(DESTDIR)$(BINDIR)
|
||||
install -dm755 $(DESTDIR)$(SYSCONFDIR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user