Hi,
Can i include a header file an mmp file and in .mk file? My purpose is to use a header file with some #defines which is gernerated by some other tool.
Thanks,
Jinu
Hi,
Can i include a header file an mmp file and in .mk file? My purpose is to use a header file with some #defines which is gernerated by some other tool.
Thanks,
Jinu
bld.inf and .mmp files are preprocessed, you can use the directives (#include, #ifdef, etc.) in them.
.mk files are makefiles, you should check the related documentation about how you can refer external files in a makefile. First of all, if you check a makefile, you will see that # means comment.
wizard_hu_ already discussed the MMP file part so I'm not going to touch that.
One way to pass external data to makefiles through the build toolchain is to use environment variables. When referencing a variable in a makefile which hasn't been defined, make implementations will check for a similarly named environment variable and substitute its value instead.
Lauri
Hi Lauri/wizard_hu_ ,
Thanks a lot for the information. But i did not undertstand how to implement the make file related part. The header file with #defines are generated during dynamic build process and I am supposed to configure .mk files, mmp files and code based on #defines. Could you please elaborate a bit more related to make file part?
Thanks,
Jinu
An example:
If you have a tool-generated header file containing #defines, it's relatively straightforward to write e.g. a perl script that copies the #defines to environment variables, for example:Code:>copy con: Makefile default: echo $(FOO) ^Z 1 file(s) copied. >make echo ECHO is off. >set FOO=foo >make echo foo foo
(The #defines in this example are prefixed with FOO_ in the environment vars. Perl can access %ENV directly but since it is executed in a subshell, any changes made there are not seen in the parent process.)Code:perl -ne "print 'set FOO_',$1,'=',$2,chr(13),chr(10) if /#define\s+(\S+)\s*(.*)/" <generated.h >generated_setenv.cmd generated_setenv
Lauri