Skip to content

Commit

Permalink
Make make install install to $DESTDIR$prefix/bin by default
Browse files Browse the repository at this point in the history
with $prefix defaulting to /usr/local.
  • Loading branch information
glandium committed May 4, 2024
1 parent f280a69 commit 415d64c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ all:

.SUFFIXES:

install:
$(error Not a supported target)

-include git-core/config.mak.uname

git-core/config.mak.uname:
Expand All @@ -21,6 +18,7 @@ all: git-cinnabar$X git-remote-hg$X
CARGO ?= cargo
CARGO_BUILD_FLAGS ?= --release
CARGO_FEATURES ?=
prefix = /usr/local

PROFILE = $(if $(filter --release,$(CARGO_BUILD_FLAGS)),release,debug)
ifneq (,$(filter --target%,$(CARGO_BUILD_FLAGS)))
Expand All @@ -38,4 +36,7 @@ $(GIT_CINNABAR): CINNABAR_MAKE_FLAGS := $(filter %,$(foreach v,$(.VARIABLES),$(i
$(GIT_CINNABAR): FORCE
$(CARGO) build -vv $(addprefix --target=,$(CARGO_TARGET))$(if $(CARGO_FEATURES), --features "$(CARGO_FEATURES)") $(CARGO_BUILD_FLAGS)

install:
$(CARGO) install --path . --locked --root $(DESTDIR)$(prefix) --no-track

.PHONY: FORCE

0 comments on commit 415d64c

Please sign in to comment.