From c75bb930018bc1d39b01e1ae622b22b0e419fcaa Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 24 Mar 2024 13:28:42 -0600 Subject: [PATCH] Makefile: directory specification changes --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index dd77985..3a9c844 100644 --- a/Makefile +++ b/Makefile @@ -13,18 +13,18 @@ .PRAGMA: posix_202x # future POSIX standard support à la pdpmake(1) .PRAGMA: command_comment # breaks without this? -DESTDIR=./dist -PREFIX=/usr/local +DESTDIR ?= dist +PREFIX ?= /usr/local -SYSEXITS!=printf '\043include \n' | cpp -M - | sed 's/ /\n/g' \ - | sed -n 's/sysexits\.h//p' || printf 'include/\n' +SYSEXITS != printf '\043include \n' | cpp -M - | sed 's/ /\n/g' \ + | sed -n 's/sysexits\.h//p' || printf 'include\n' -CC?=cc -RUSTC?=rustc -RUSTLIBS=--extern getopt=build/o/libgetopt.rlib \ +CC ?= cc +RUSTC ?= rustc +RUSTLIBS = --extern getopt=build/o/libgetopt.rlib \ --extern sysexits=build/o/libsysexits.rlib \ --extern strerror=build/o/libstrerror.rlib -CFLAGS+=-I$(SYSEXITS) +CFLAGS += -I$(SYSEXITS) .PHONY: all all: dj false fop hru intcmp rpn scrut str strcmp true @@ -36,12 +36,12 @@ build: .PHONY: clean clean: - rm -rf build/ dist/ + rm -rf build dist dist: all - mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1 - cp build/bin/* $(DESTDIR)$(PREFIX)/bin/ - cp docs/*.1 $(DESTDIR)$(PREFIX)/share/man/man1/ + mkdir -p $(DESTDIR)/$(PREFIX)/bin $(DESTDIR)/$(PREFIX)/share/man/man1 + cp build/bin/* $(DESTDIR)/$(PREFIX)/bin + cp docs/*.1 $(DESTDIR)/$(PREFIX)/share/man/man1 .PHONY: install install: dist