pass the river colour as a conditional, with #line on every statement

A #line no longer lands inside a ?: (sex#54), so the build goes back
to statement-level directives, which is what lands a debugger on the
right line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 18:11:37 +03:00
parent e4ab3e875f
commit e0901f6c8a
2 changed files with 2 additions and 10 deletions

View File

@@ -20,12 +20,8 @@ all: $(B)/vsmv $(B)/vs-map-viewer
# dependency files.
SEX_SRC := $(wildcard src/*.sex)
# Statement-level #line directives can land inside a ?: and break the
# C (see Sex-field-notes.org), so they are kept to toplevel forms.
# TODO sex#54: drop --line-directives=toplevel once #line no longer
# lands inside a ?:.
$(B)/%.o: src/%.sex $(SEX_SRC) | $(B)
$(SEXC) --line-directives=toplevel $< -c -o $@ -- $(CFLAGS) $(SEX_CFLAGS) $(CPPFLAGS)
$(SEXC) $< -c -o $@ -- $(CFLAGS) $(SEX_CFLAGS) $(CPPFLAGS)
$(B)/nk.o: src/nk.c src/nk.h | $(B)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@