~technomancy/fennel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Makefile: add DESTDIR support

Details
Message ID
<20210128004152.28796-1-michel@michel-slm.name>
DKIM signature
pass
Download raw message
Patch: +5 -4
On Linux distributions, a standard practice is to override `DESTDIR`
when running `make install` during the packaging process.

Support using that variable rather than requiring `PREFIX` to be
overridden.

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
---
 Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index aec162f..7500f0e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
LUA ?= lua
LUA_VERSION ?= $(shell $(LUA) -e 'v=_VERSION:gsub("^Lua *","");print(v)')
DESTDIR ?=
PREFIX ?= /usr/local
BIN_DIR ?= $(PREFIX)/bin
LUA_LIB_DIR ?= $(PREFIX)/share/lua/$(LUA_VERSION)
@@ -82,10 +83,10 @@ coverage: fennel
	@echo "generated luacov.report.out"

install: fennel fennel.lua fennelview.lua
	mkdir -p $(BIN_DIR) && \
		cp fennel $(BIN_DIR)/
	mkdir -p $(LUA_LIB_DIR) && \
		for f in fennel.lua fennelview.lua; do cp $$f $(LUA_LIB_DIR)/; done
	mkdir -p $(DESTDIR)$(BIN_DIR) && \
		cp fennel $(DESTDIR)$(BIN_DIR)/
	mkdir -p $(DESTDIR)$(LUA_LIB_DIR) && \
		for f in fennel.lua fennelview.lua; do cp $$f $(DESTDIR)$(LUA_LIB_DIR)/; done

# Release-related tasks:

-- 
2.29.2
Details
Message ID
<87ft2lzuju.fsf@whirlwind>
In-Reply-To
<20210128004152.28796-1-michel@michel-slm.name> (view parent)
DKIM signature
missing
Download raw message
Michel Alexandre Salim <michel@michel-slm.name> writes:

> On Linux distributions, a standard practice is to override `DESTDIR`
> when running `make install` during the packaging process.
>
> Support using that variable rather than requiring `PREFIX` to be
> overridden.

I see; didn't know that. Thanks!

-Phil
Reply to thread Export thread (mbox)