M2
M2 copied to clipboard
feature request: #ifdef preprocessing in scc1
The way the d directory is currently built, some .d sources depends on flags (e.g. XML, Python, or MySQL). However, if scc1 supported #ifdefs in D syntax, then we could put the list in a file and build everything in it, knowing that the compiler would skip the content if a flag is not set.
The way to do that is this: make a shell script called
c/scc. It would runcppon the file first and then runc/scc1. The code ofscc1would be modified to pay attention to the lines left behindcpp: a line such as# 11 "foo.d" 2would tell it that the next line (check that) is line 11 from the file "foo.d". We need that information for giving proper line numbers in error messages, and we don't want to be off even by 1.
Originally posted by @DanGrayson in https://github.com/Macaulay2/M2/pull/1190