Hello folks,
I have defined the following macro to import (include) an .inc file into the source code.
PROJECTBASEDIR is an environment variable that contains the root path of my project.
For some reason when I run the macro it continually errors out with " '%include' expects a filename". I've been hacking on various incarnations of this for a while now and feel like I've hit a wall.
Here is the defined macro:
%macro import 0-*
%if (%0!=1)
%fatal "usage: import packagename"
%endif
%xdefine %$incfile %!PROJECTBASEDIR\%{1}\%{1}.inc
%defstr %$incstr %$incfile
; %fatal "incstr =" %$incstr <-- this prints out the correct path
%include %$incstr
%endmacro
Can anyone point me in the right direction in trying to accomplish this ???