Commit 10d21739

10d21739ecb2Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 2 files · ~2 modified

Description

build: drop the Windows_NT / .exe build residue

Native Windows support was removed (38b5a22 / 526c82c); the build files still carried Windows-only bits: the .exe EXE suffix and a stack-size link flag in common.mk, and a Windows test-filter block in the Makefile (which PR #1497 had just extended). Remove the Windows_NT conditionals and the now-always-empty $(EXE) suffix from every target. make check stays green (974 pass).

Co-Authored-By: Claude Opus 4.8 [email protected]

Details

Commit
10d21739ecb2
Parent
74738df2ebec

MakefilemodifiedView file

@@ -49,7 +49,7 @@
4949 # `make all` includes spinel_rbs_extract when vendor/rbs has been fetched
5050 # (via `make deps`); without it the extractor is silently omitted.
5151 ifneq ($(wildcard $(RBS_INC)/rbs/parser.h),)
52- RBS_EXTRACT_TARGET = spinel_rbs_extract$(EXE)
52+ RBS_EXTRACT_TARGET = spinel_rbs_extract
5353 else
5454 RBS_EXTRACT_TARGET =
5555 endif
@@ -58,7 +58,7 @@
5858 # `all` rule, because a rule's prerequisites are expanded as it is read.
5959 # Built into bin/ alongside the companion tools (spinel-doctor, ...); bin/ sits
6060 # beside lib/ so the binary resolves its runtime lib via ../lib, same as before.
61-SPINEL = bin/spinel$(EXE)
61+SPINEL = bin/spinel
6262
6363 all: regexp $(SPINEL) $(RBS_EXTRACT_TARGET) tools
6464
@@ -122,9 +122,9 @@
122122
123123 # ---- C Parser ----
124124
125-parse: legacy/spinel_parse$(EXE)
125+parse: legacy/spinel_parse
126126
127-legacy/spinel_parse$(EXE): legacy/spinel_parse.c $(PRISM_LIB)
127+legacy/spinel_parse: legacy/spinel_parse.c $(PRISM_LIB)
128128 $(CC) $(CFLAGS) -I$(PRISM_INC) legacy/spinel_parse.c $(PRISM_LIB) -lm -o $@
129129
130130 # ---- C compiler (src/) ----
@@ -179,9 +179,9 @@
179179 echo " Run 'make deps' to fetch it from rubygems.org into vendor/rbs."; \
180180 exit 1
181181 else
182-rbs_extract: spinel_rbs_extract$(EXE)
182+rbs_extract: spinel_rbs_extract
183183
184-spinel_rbs_extract$(EXE): tools/spinel_rbs_extract.c $(RBS_LIB)
184+spinel_rbs_extract: tools/spinel_rbs_extract.c $(RBS_LIB)
185185 $(CC) $(CFLAGS) -I$(RBS_INC) tools/spinel_rbs_extract.c $(RBS_LIB) -o $@
186186 endif
187187
@@ -257,7 +257,7 @@
257257
258258 tools: $(TOOL_BINS)
259259
260-bin/spinel-%$(EXE): tools/%.rb tools/tool_common.rb $(SPINEL) $(SP_RT_LIB)
260+bin/spinel-%: tools/%.rb tools/tool_common.rb $(SPINEL) $(SP_RT_LIB)
261261 @mkdir -p bin
262262 $(SPINEL) $< -o $@
263263
@@ -277,11 +277,6 @@
277277 # --int-overflow=promote; in raise/wrap mode they would (correctly) raise.
278278 TESTS := $(filter-out test/promote_%.rb,$(TESTS))
279279 endif
280-# sp_net is POSIX-only; on Windows the TU compiles to stubs and the smoke
281-# test's output diverges. Skip it there.
282-ifeq ($(OS),Windows_NT)
283-TESTS := $(filter-out test/sp_net_basic.rb test/ffi_binstr_ws_frame.rb,$(TESTS))
284-endif
285280 TEST_TARGETS := $(patsubst test/%.rb,build/test-results/%.ok,$(TESTS))
286281
287282 # Warnings the generated-C -Werror check should not gate on. clang enables
@@ -332,13 +327,13 @@
332327 regen-rbs-expected:
333328 @echo "regen-rbs-expected: skipped (vendor/rbs not fetched; run 'make deps')"
334329 else
335-rbs-test: spinel_rbs_extract$(EXE)
330+rbs-test: spinel_rbs_extract
336331 @fail=0; n=0; \
337332 for f in $(RBS_TEST_SRCS); do \
338333 n=$$((n+1)); \
339334 exp="$${f%.rbs}.seed.expected"; \
340335 if [ ! -f "$$exp" ]; then echo "rbs-test: MISSING golden $$exp"; fail=1; continue; fi; \
341- d=$$(./spinel_rbs_extract$(EXE) "$$f" 2>/dev/null | diff -u "$$exp" - 2>&1); \
336+ d=$$(./spinel_rbs_extract "$$f" 2>/dev/null | diff -u "$$exp" - 2>&1); \
342337 if [ -z "$$d" ]; then \
343338 if [ -t 1 ]; then printf .; fi; \
344339 else \
@@ -349,9 +344,9 @@
349344 if [ $$fail -ne 0 ]; then echo "RBS extractor tests: FAIL"; exit 1; fi; \
350345 echo "RBS extractor tests: $$n pass"
351346
352-regen-rbs-expected: spinel_rbs_extract$(EXE)
347+regen-rbs-expected: spinel_rbs_extract
353348 @for f in $(RBS_TEST_SRCS); do \
354- ./spinel_rbs_extract$(EXE) "$$f" > "$${f%.rbs}.seed.expected"; \
349+ ./spinel_rbs_extract "$$f" > "$${f%.rbs}.seed.expected"; \
355350 echo "regen: $${f%.rbs}.seed.expected"; \
356351 done
357352 endif
@@ -367,8 +362,8 @@
367362 rbs-seed-test:
368363 @echo "rbs-seed-test: skipped (vendor/rbs not fetched; run 'make deps')"
369364 else
370-rbs-seed-test: $(SPINEL) spinel_rbs_extract$(EXE) $(SP_RT_LIB)
371- @cp -f spinel_rbs_extract$(EXE) $(dir $(SPINEL))spinel_rbs_extract$(EXE)
365+rbs-seed-test: $(SPINEL) spinel_rbs_extract $(SP_RT_LIB)
366+ @cp -f spinel_rbs_extract $(dir $(SPINEL))spinel_rbs_extract
372367 @tmp=$$(mktemp -d /tmp/spinel-rbsseed.XXXXXX); ok=1; \
373368 $(SPINEL) test/rbs-seed/nested_ivar.rb --rbs test/rbs-seed/sig \
374369 -c --no-line-map -o "$$tmp/out.c" 2>/dev/null; \
@@ -404,7 +399,7 @@
404399 ast=$$tmpdir/test.ast; \
405400 ir=$$tmpdir/test.ir; \
406401 cfile=$$tmpdir/test.c; \
407- bin=$$tmpdir/test_bin$(EXE); \
402+ bin=$$tmpdir/test_bin; \
408403 exp=$$tmpdir/expected; \
409404 act=$$tmpdir/actual; \
410405 args=""; \
@@ -477,7 +472,7 @@
477472 if [ "$$tty" = 1 ]; then printf '\r\033[K [%d/%d] %s' "$$i" "$$total" "$$bn"; fi; \
478473 $(TIMEOUT10) $(SPINEL) "$$f" -c --no-line-map -o /tmp/_sp_b.c 2>/dev/null && \
479474 $(CC) $(CFLAGS) -Werror $(TEST_WARN_SUPPRESS) $(SEC_FLAGS) -Ilib -c /tmp/_sp_b.c -o /tmp/_sp_b.c.o 2>/dev/null && \
480- $(CC) $(CFLAGS) /tmp/_sp_b.c.o $(SP_RT_LIB) $(LDFLAGS) -lm $(GC_FLAGS) -o /tmp/_sp_b_bin$(EXE) 2>/dev/null; \
475+ $(CC) $(CFLAGS) /tmp/_sp_b.c.o $(SP_RT_LIB) $(LDFLAGS) -lm $(GC_FLAGS) -o /tmp/_sp_b_bin 2>/dev/null; \
481476 if [ $$? -eq 0 ]; then \
482477 $(TIMEOUT60) $(REF_RUBY) "$$f" >/tmp/_sp_b_exp 2>/dev/null; \
483478 ruby_rc=$$?; \
@@ -489,7 +484,7 @@
489484 if [ "$$tty" = 1 ]; then printf '\r\033[K'; fi; \
490485 echo "SKIP: $$bn (ruby timeout)"; skip=$$((skip+1)); \
491486 else \
492- $(TIMEOUT60) /tmp/_sp_b_bin$(EXE) >/tmp/_sp_b_act 2>/dev/null; \
487+ $(TIMEOUT60) /tmp/_sp_b_bin >/tmp/_sp_b_act 2>/dev/null; \
493488 LC_ALL=C sed 's/\r$$//' /tmp/_sp_b_exp >/tmp/_sp_b_exp.n; \
494489 LC_ALL=C sed 's/\r$$//' /tmp/_sp_b_act >/tmp/_sp_b_act.n; \
495490 if cmp -s /tmp/_sp_b_exp.n /tmp/_sp_b_act.n; then \
@@ -507,7 +502,7 @@
507502 fi; \
508503 done; \
509504 if [ "$$tty" = 1 ]; then printf '\r\033[K'; fi; \
510- rm -f /tmp/_sp_b.ast /tmp/_sp_b.ir /tmp/_sp_b.c /tmp/_sp_b.c.o /tmp/_sp_b_bin$(EXE) /tmp/_sp_b_exp /tmp/_sp_b_act /tmp/_sp_b_exp.n /tmp/_sp_b_act.n; \
505+ rm -f /tmp/_sp_b.ast /tmp/_sp_b.ir /tmp/_sp_b.c /tmp/_sp_b.c.o /tmp/_sp_b_bin /tmp/_sp_b_exp /tmp/_sp_b_act /tmp/_sp_b_exp.n /tmp/_sp_b_act.n; \
511506 echo "Benchmarks: $$pass pass, $$fail fail, $$err error, $$skip skip"; \
512507 if [ $$fail -ne 0 ] || [ $$err -ne 0 ]; then exit 1; fi
513508
@@ -575,7 +570,7 @@
575570 # `analyze-fail-test`) and is not shipped.
576571 install: all
577572 install -d $(SPNLDIR)/lib
578- install -m 755 $(SPINEL) $(SPNLDIR)/spinel$(EXE)
573+ install -m 755 $(SPINEL) $(SPNLDIR)/spinel
579574 install -m 644 lib/libspinel_rt.a $(SPNLDIR)/lib/
580575 install -m 644 lib/sp_runtime.h $(SPNLDIR)/lib/
581576 install -m 644 lib/sp_types.h $(SPNLDIR)/lib/
@@ -590,12 +585,12 @@
590585 install -d $(PREFIX)/bin
591586 ln -sf $(SPNLDIR)/spinel $(PREFIX)/bin/spinel
592587 for t in $(TOOL_NAMES); do \
593- install -m 755 bin/spinel-$$t$(EXE) $(PREFIX)/bin/spinel-$$t$(EXE); \
588+ install -m 755 bin/spinel-$$t $(PREFIX)/bin/spinel-$$t; \
594589 done
595590
596591 uninstall:
597592 rm -f $(PREFIX)/bin/spinel
598- for t in $(TOOL_NAMES); do rm -f $(PREFIX)/bin/spinel-$$t$(EXE); done
593+ for t in $(TOOL_NAMES); do rm -f $(PREFIX)/bin/spinel-$$t; done
599594 rm -rf $(SPNLDIR)
600595
601596 # ---- Clean ----
@@ -605,4 +600,4 @@
605600 # intermediates). Only the root-level C artifacts need an explicit rm.
606601 clean:
607602 rm -rf build/ bin/ legacy/build/
608- rm -f legacy/spinel_parse$(EXE) spinel_rbs_extract$(EXE) spinel
603+ rm -f legacy/spinel_parse spinel_rbs_extract spinel