dlang.org icon indicating copy to clipboard operation
dlang.org copied to clipboard

move macros to spec/spec.ddoc

Open WalterBright opened this issue 7 years ago • 3 comments

Since they only apply to the spec.

WalterBright avatar Jan 17 '18 08:01 WalterBright

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.

dlang-bot avatar Jan 17 '18 08:01 dlang-bot

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?

wilzbach avatar Jan 17 '18 08:01 wilzbach

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!

WalterBright avatar Jan 17 '18 09:01 WalterBright