nasm/test/ifenv.asm
H. Peter Anvin 077fb93d2b preproc: allow non-identifier character in environment variables
Allow non-identifier characters in the name of environment variables,
by surrounding them with string quotes (subject to ordinary
string-quoting rules.)

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-07-20 14:56:30 -07:00

32 lines
495 B
NASM

%macro import 1
%defstr %%incfile %!PROJECTBASEDIR/%{1}.inc
%defstr %%decfile %!'PROJECTBASEDIR'/%{1}.dec
db %%incfile, `\n`
db %%decfile, `\n`
%endmacro
%ifenv PROJECTBASEDIR
import foo
%else
%warning No PROJECTBASEDIR defined
%endif
%ifenv %!PROJECTBASEDIR
import foo
%else
%warning No PROJECTBASEDIR defined
%endif
%ifenv 'PROJECTBASEDIR'
import foo
%else
%warning No PROJECTBASEDIR defined
%endif
%ifenv %!'PROJECTBASEDIR'
import foo
%else
%warning No PROJECTBASEDIR defined
%endif