forked from bonsai/harakit
Makefile, include: makes conditional compilation more robust
This commit is contained in:
parent
6c882f54cb
commit
25eb08eb84
5
Makefile
5
Makefile
@ -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 \
|
||||
|
@ -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
0
include/None.mk
Normal file
Loading…
Reference in New Issue
Block a user