Skip to content

Commit dacf4f8

Browse files
committed
Try and get things building on Windows.
1 parent 01a5524 commit dacf4f8

File tree

33 files changed

+88
-54
lines changed

33 files changed

+88
-54
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ CFLAGS += -DWIN32
4646
endif
4747

4848
HOSTCFLAGS = $(CFLAGS)
49-
ACKCFLAGS = -O -v -v -v
49+
ACKCFLAGS = -O
5050

5151
LDFLAGS ?= -g
5252

build/_sandbox.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def main():
2626
print("link", sf)
2727
os.makedirs(dirname(sf), exist_ok=True)
2828
try:
29-
os.link(abspath(f), sf)
29+
os.symlink(abspath(f), sf)
3030
except PermissionError:
3131
shutil.copy(f, sf)
3232

@@ -38,6 +38,11 @@ def main():
3838
df = dirname(f)
3939
if df:
4040
os.makedirs(df, exist_ok=True)
41+
42+
try:
43+
os.remove(f)
44+
except FileNotFoundError:
45+
pass
4146
os.rename(sf, f)
4247

4348

build/ab.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import os
2323
from collections import namedtuple
2424

25+
SANDBOX_ARG_COUNT = 500
26+
2527
COMPRESS_MK_FILE = True
2628

2729
verbose = False

build/c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def programimpl(
444444
simplerule(
445445
replaces=self,
446446
ins=cfiles + libs,
447-
outs=[f"={self.localname}$(EXT)"],
447+
outs=[f"={self.localname}{toolchain.EXE}"],
448448
deps=deps,
449449
label=label,
450450
commands=commands,

build/toolchain.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
import platform
2+
3+
_is_windows = (platform.system() == "Windows")
4+
15
class Toolchain:
26
PREFIX = ""
7+
EXE = ".exe" if _is_windows else ""
38

49

510
class HostToolchain(Toolchain):

lang/basic/src/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@
4848
)
4949

5050

51-
export(name="all", items={"$(PLATDEP)/em_bem": ".+em_bem"})
51+
export(name="all", items={"$(PLATDEP)/em_bem$(EXT)": ".+em_bem"})

lang/cem/cemcom.ansi/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@
116116
],
117117
)
118118

119-
export(name="all", items={"$(PLATDEP)/em_cemcom.ansi": ".+cemcom"})
119+
export(name="all", items={"$(PLATDEP)/em_cemcom.ansi$(EXT)": ".+cemcom"})

lang/cem/cpp.ansi/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@
8383
],
8484
)
8585

86-
export(name="all", items={"$(PLATDEP)/cpp.ansi": ".+cpp.ansi"})
86+
export(name="all", items={"$(PLATDEP)/cpp.ansi$(EXT)": ".+cpp.ansi"})

lang/m2/comp/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
export(
7777
name="all",
7878
items={
79-
"$(PLATDEP)/em_m2": ".+em_m2",
79+
"$(PLATDEP)/em_m2$(EXT)": ".+em_m2",
8080
"$(INSDIR)/share/man/man6/em_m2.6": "./em_m2.6",
8181
},
8282
)

lang/pc/comp/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@
109109
],
110110
)
111111

112-
export(name="all", items={"$(PLATDEP)/em_pc": ".+em_pc"})
112+
export(name="all", items={"$(PLATDEP)/em_pc$(EXT)": ".+em_pc"})

0 commit comments

Comments
 (0)