1
0
forked from bonsai/harakit

Makefile: directory specification changes

This commit is contained in:
Emma Tebibyte 2024-03-24 13:28:42 -06:00
parent d87b5d0958
commit b503d97625
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270

View File

@ -13,18 +13,18 @@
.PRAGMA: posix_202x # future POSIX standard support à la pdpmake(1) .PRAGMA: posix_202x # future POSIX standard support à la pdpmake(1)
.PRAGMA: command_comment # breaks without this? .PRAGMA: command_comment # breaks without this?
DESTDIR=./dist DESTDIR ?= dist
PREFIX=/usr/local PREFIX ?= /usr/local
SYSEXITS!=printf '\043include <sysexits.h>\n' | cpp -M - | sed 's/ /\n/g' \ SYSEXITS != printf '\043include <sysexits.h>\n' | cpp -M - | sed 's/ /\n/g' \
| sed -n 's/sysexits\.h//p' || printf 'include/\n' | sed -n 's/sysexits\.h//p' || printf 'include\n'
CC?=cc CC ?= cc
RUSTC?=rustc RUSTC ?= rustc
RUSTLIBS=--extern getopt=build/o/libgetopt.rlib \ RUSTLIBS = --extern getopt=build/o/libgetopt.rlib \
--extern sysexits=build/o/libsysexits.rlib \ --extern sysexits=build/o/libsysexits.rlib \
--extern strerror=build/o/libstrerror.rlib --extern strerror=build/o/libstrerror.rlib
CFLAGS+=-I$(SYSEXITS) CFLAGS += -I$(SYSEXITS)
.PHONY: all .PHONY: all
all: dj false fop hru intcmp rpn scrut str strcmp true all: dj false fop hru intcmp rpn scrut str strcmp true
@ -36,12 +36,12 @@ build:
.PHONY: clean .PHONY: clean
clean: clean:
rm -rf build/ dist/ rm -rf build dist
dist: all dist: all
mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1 mkdir -p $(DESTDIR)/$(PREFIX)/bin $(DESTDIR)/$(PREFIX)/share/man/man1
cp build/bin/* $(DESTDIR)$(PREFIX)/bin/ cp build/bin/* $(DESTDIR)/$(PREFIX)/bin
cp docs/*.1 $(DESTDIR)$(PREFIX)/share/man/man1/ cp docs/*.1 $(DESTDIR)/$(PREFIX)/share/man/man1
.PHONY: install .PHONY: install
install: dist install: dist