Makefile, include: makes conditional compilation more robust

This commit is contained in:
Emma Tebibyte 2024-08-10 13:04:41 -06:00
parent 6c882f54cb
commit 25eb08eb84
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270
3 changed files with 3 additions and 8 deletions

View File

@ -18,6 +18,8 @@ PREFIX ?= /usr/local
# for conditionally compiling OS features
OS != uname
OS_INCLUDE != test -e include/$(OS).mk && printf 'include/$(OS).mk\n' \
|| include/None.mk
# normalized prefix
PREFIX_N != dirname $(PREFIX)/.
@ -77,9 +79,8 @@ docs: docs/ build
"s/X\.X\.X/$$(git describe --tags --long | cut -d'-' -f1)/g")"; \
sed "s/$$original/$$title/g" <"$$file" >"build/$$file"; done
# include OS feature libraries for compilation
include include/$(OS).mk
include $(OS_INCLUDE)
.PHONY: rustlibs
rustlibs: build/o/libgetopt.rlib build/o/libstrerror.rlib \

View File

@ -1,6 +0,0 @@
# Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
# 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.

0
include/None.mk Normal file
View File