mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
1b65f0bd2b
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o Fix building and unit-tests on non-BSD. o More code cleanup and refactoring. o More unit tests
32 lines
741 B
Makefile
32 lines
741 B
Makefile
# $NetBSD: directive-export.mk,v 1.4 2020/11/03 17:17:31 rillig Exp $
|
|
#
|
|
# Tests for the .export directive.
|
|
|
|
# TODO: Implementation
|
|
|
|
INDIRECT= indirect
|
|
VAR= value $$ ${INDIRECT}
|
|
|
|
# A variable is exported using the .export directive.
|
|
# During that, its value is expanded, just like almost everywhere else.
|
|
.export VAR
|
|
.if ${:!env | grep '^VAR'!} != "VAR=value \$ indirect"
|
|
. error
|
|
.endif
|
|
|
|
# Undefining a variable that has been exported implicitly removes it from
|
|
# the environment of all child processes.
|
|
.undef VAR
|
|
.if ${:!env | grep '^VAR' || true!} != ""
|
|
. error
|
|
.endif
|
|
|
|
# Tests for parsing the .export directive.
|
|
.expor # misspelled
|
|
.export # oops: missing argument
|
|
.export VARNAME
|
|
.exporting works # oops: misspelled
|
|
|
|
all:
|
|
@:;
|