From 5ce1c8ed8f9236409b6774f553016b55e0e288f4 Mon Sep 17 00:00:00 2001 From: Andrea Rogers Date: Sun, 14 Apr 2024 23:32:42 -0500 Subject: [PATCH] Makefile: Better support Darwin and Windows_NT --- Makefile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5dc707f..6e1a351 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,18 @@ -PREFIX ?= /usr/local +UNAME := $(shell uname) +ifeq ($(UNAME),Linux) + OPEN=xdg-open + PREFIX ?= /usr/local +else ifeq ($(UNAME),Darwin) + OPEN=open + PREFIX ?= $(HOME)/.local +else ifeq ($(OS),Windows_NT) + OPEN=start + PREFIX ?= /usr/local +else + OPEN=xdg-open + PREFIX ?= /usr/local +endif + INSTALL ?= install HELPERS := $(wildcard *.bash) @@ -42,13 +56,6 @@ clean: ### README ##################################################################### -UNAME := $(shell uname) -ifeq ($(UNAME),Linux) - OPEN=xdg-open -else ifeq ($(UNAME),Darwin) - OPEN=open -endif - pub.css: wget https://github.com/manuelp/pandoc-stylesheet/raw/acac36b976966f76544176161ba826d519b6f40c/pub.css