https://bugs.openldap.org/show_bug.cgi?id=10573
--- Comment #4 from Howard Chu hyc@openldap.org --- I looked at (In reply to OpenLDAP MSVC Reporter from comment #2)
Created attachment 1193 [details] Make symbol map preprocessing portable
Attached a minimal patch that renames the two preprocessor templates to C-recognized filenames and writes preprocessor output through stdout, avoiding compiler-specific language and output options.
Tested with GCC 12.2 on Debian: both version maps were generated, both shared libraries linked, and OPENLDAP_2.200 was present in each library's version metadata.
Also tested with MSVC 14.51 on Windows for x86 and x64: both builds, installation checks, and generated artifacts completed successfully.
I looked at an approach like this myself, previously.
Using `$(CPP) > $@` is problematic because it creates the output unconditionally, even if the $(CPP) hits an error. That's why we use `-o $@` which only produces the output file for a successful invocation.
This patch is not acceptable.