I want this when I’m compiling the “small” version, but I don’t want most of this for my normal version (& for testing).
It doesn’t seem that I can use #IfDef here, since only line with !% at the very start will be considered.
There’s an intriguing command-line option to the compiler, -i, which says it should “ignore default switches set within the file” . I had hoped that might just disable these kind of !%, but it doesn’t seem to do that.
Is there a way around this? Or are there techniques other have figured out?
One workaround would be to write separate batch files or shell scripts for the different build types, each calling Inform with the appropriate command-line options.
Thanks, @vaporware ! A shell script is always a handy thing.
In this case, someone just suggested offline to dig into the (old) ICL stuff for the compiler, and I found I could move all my switches (and only them) to a new file, “small.inf”, and compile with inform -x ‘(small.inf)'. That works and no jiggling around with files.
You do as you please of course, but the only switches that I can see any benefit in ever changing or omitting are disabling strict mode (can be useful to have enabled for debugging) and omit symbol table (can’t be used in DEBUG mode).
I tend to bake this kind of logic into my Makefile, so my rule to build a .z3 format file always assumes maximum compression tricks, while my .z5 rules tend to defaults and my .z8 rules sometimes lay on extra features.
So when I’m testing and debugging general logic/play flow, I’m usually playing with the .z5 version of the game.