1
0
Fork 0
coreutils/Makefile

45 lines
1.2 KiB
Makefile
Raw Permalink Normal View History

# Copyright (c) 20232024 Emma Tebibyte <emma@tebibyte.media>
# Copyright (c) 20232024 DTB <trinity@trinity.moe>
2023-12-25 02:22:05 +00:00
# Copyright (c) 2023 Sasha Koshka <sashakoshka@tebibyte.media>
2024-03-27 03:36:19 +00:00
# Copyright (c) 2024 Aaditya Aryal <aryalaadi123@gmail.com>
# SPDX-License-Identifier: FSFAP
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and this
# notice are preserved. This file is offered as-is, without any warranty.
#.POSIX:
2024-03-09 18:53:03 +00:00
include config.mk
.PHONY: all
all: prepare
@$(MAKE) -C lib
@$(MAKE) -C bin
.PHONY: prepare
prepare:
# keep build/include until bindgen(1) has stdin support
# https://github.com/rust-lang/rust-bindgen/issues/2703
mkdir -p build/bin build/include build/lib build/o build/test
.PHONY: clean
clean:
rm -rf build dist
dist: all
mkdir -p $(DESTDIR)/$(PREFIX)/bin $(DESTDIR)/$(PREFIX)/share/man/man1
cp build/bin/* $(DESTDIR)/$(PREFIX)/bin
cp bin/*/*.1 $(DESTDIR)/$(PREFIX)/share/man/man1
.PHONY: install
install: dist
2024-03-09 18:53:03 +00:00
cp -r $(DESTDIR)/* /
.PHONY: test
test: prepare
tests/posix-compat.sh
$(RUSTC) --test src/getopt-rs/lib.rs -o build/test/getopt