1 1.7 sjg # $NetBSD: make-exported.mk,v 1.7 2022/09/09 18:36:15 sjg Exp $ 2 1.1 rillig # 3 1.1 rillig # As of 2020-08-09, the code in Var_Export is shared between the .export 4 1.1 rillig # directive and the .MAKE.EXPORTED variable. This leads to non-obvious 5 1.1 rillig # behavior for certain variable assignments. 6 1.1 rillig 7 1.6 rillig -env= make-exported-value-env 8 1.6 rillig -literal= make-exported-value-literal 9 1.1 rillig UT_VAR= ${UNEXPANDED} 10 1.1 rillig 11 1.6 rillig # Before 2020-10-03, the following line took the code path of .export-env, 12 1.6 rillig # which was surprising behavior. Since 2020-10-03 this line tries to 13 1.6 rillig # export the variable named "-env", but that is rejected because the 14 1.6 rillig # variable name starts with a hyphen. 15 1.6 rillig .MAKE.EXPORTED= -env 16 1.6 rillig 17 1.6 rillig # Before 2020-10-03, if the value of .MAKE.EXPORTED started with "-literal", 18 1.6 rillig # make behaved like a mixture of .export-literal and a regular .export. 19 1.6 rillig # 20 1.6 rillig # Since 2020-10-03, the "variable" named "-literal" is not exported anymore, 21 1.6 rillig # it is just ignored since its name starts with '-'. 22 1.6 rillig .MAKE.EXPORTED= -literal UT_VAR 23 1.1 rillig 24 1.1 rillig all: 25 1.7 sjg @env | sort | ${EGREP} '^UT_|make-exported-value' || true 26