Hi Eric, > -----Original Message----- > From: Eric Stenson [mailto:erics...@microsoft.com] > Sent: Tuesday, May 26, 2015 6:18 PM > To: Anatol Belski; 'Ferenc Kovacs'; internals-...@lists.php.net > Cc: internals@lists.php.net > Subject: RE: [INTERNALS-WIN] Re: [PHP-DEV] Q: What is the Config.w32 > equivalent of PHP_ADD_MAKEFILE_FRAGMENT? > > -----Original Message----- > > From: Anatol Belski [mailto:anatol....@belski.net] > [...] > > Can you please share what exactly you need it to do? Like the command > > sequence or alike, maybe there is already a way to do that. > > I need to run the $(MC) command, with the '-um' option, which will create ETW > message macros & binary resources. The output is a .h, a .rc and a couple of > .BIN files. > > e.g.: > $(MC) -um -e h -h ..\pecl\wincache -r ..\pecl\wincache wincache_etw.man > > I'm working around the lack of a fragment by running the $(MC) command by > hand, an checking in the results to the pecl\wincache directory, and hand- > hacking the template.rc to #include the resulting wincache_etw.rc. It kinda > works, but it would be better if the building of the ETW resources was > automatic > with make/nmake. > > Even better would be to put the rendered .h, .rc & .bin files in the same > directory > as the .obj's, so they could be cleaned up. The problem there is no way to > pass > an include directory arg (-I<dir>) to the $(RC) command used for template.rc. > I was just checking, one possibility were to make use of the variable called MFO which is globally available. Here for example what happens when you call EXTENSION(...) in the config.w32 http://git.php.net/?p=php-src.git;a=blob;f=win32/build/confutils.js;h=9a7b3fa5ac990899189d537f8295a98be3b7f89c;hb=HEAD#l1290 . So this gives possibility to implement custom targets adding them through the javascript API. However I'm not sure one can add those targets as dependency to the main ext dll target, and this is neglecting almost any effect of creating a custom build target. What one could theoretically do is reading the whole Makefile and extending the target of the interest, then writing the whole back. However tricky it is and might break other exts, so should be done with care.
A bit another story is in master, there the objects are put into the response file, so theoretically one could do the necessary operation already when configure runs and extend the response file. But that doesn't really help globally. However it's tricky as well. We can do the necessary implementations in master and maybe backport it, it were an improvement, but it were still missing in the already done releases. I'm going to put this on my todo at least for master. However don't expect coming to it very soon. Probably the simplest implementation were the possibility to add fragments as whole, disregarding the JS functionality. Maybe also you could play with the MFO possibility I've mentioned, I could have overseen something. Regards Anatol -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php