dlang.org
dlang.org copied to clipboard
move macros to spec/spec.ddoc
Since they only apply to the spec.
Thanks for your pull request, @WalterBright!
Bugzilla references
Your PR doesn't reference any Bugzilla issue.
If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
Sadly there's a common macro file that is used by all three spec builds (html, pdf, epub), but they all use different ones:
https://github.com/dlang/dlang.org/blob/0c475b6499fd5fdbcfb1961b6513f0a8af232c56/posix.mak#L470-L471
https://github.com/dlang/dlang.org/blob/0c475b6499fd5fdbcfb1961b6513f0a8af232c56/posix.mak#L522-L523
https://github.com/dlang/dlang.org/blob/0c475b6499fd5fdbcfb1961b6513f0a8af232c56/posix.mak#L545-L546
Should I quickly add a spec/macros.dd which is shared by all three or do you have a better idea?
I said it was a disaster :-)
The reason for 3 .ddoc files is there's no way to do conditionals with macros. So for different expansions, different .ddoc files are needed. However, the identical macros should be merged into a common file.
Feel free to reorganize it. Just be sure and add comments to the makefile about what is going on!