Update ab. You can now build individual tools individually.

This commit is contained in:
David Given
2023-12-12 23:11:09 +01:00
parent ea13d66e6b
commit 1234e81463
4 changed files with 16 additions and 11 deletions

View File

@@ -227,6 +227,7 @@ if not glob("../fluxengine-testdata/data"):
print("fluxengine-testdata not found; skipping corpus tests")
else:
corpus = [
("acorndfs", "", "--200"),
("agat", "", ""),
("amiga", "", ""),
("apple2", "", "--140 40track_drive"),

View File

@@ -417,8 +417,6 @@ def export(self, name=None, items: TargetsMap = {}, deps: Targets = []):
for dest, src in items.items():
destf = filenameof(dest)
dir = dirname(destf)
if dir:
cs += ["mkdir -p " + dir]
srcs = filenamesof(src)
if len(srcs) != 1:
@@ -426,13 +424,16 @@ def export(self, name=None, items: TargetsMap = {}, deps: Targets = []):
"a dependency of an export must have exactly one output file"
)
cs += ["cp %s %s" % (srcs[0], destf)]
emitter_rule(self.name + "+" + destf, srcs, [destf])
emitter_label(f"CP {destf}")
if dir:
emitter_exec(["mkdir -p " + dir])
emitter_exec(["cp %s %s" % (srcs[0], destf)])
self.outs += [destf]
emitter_rule(self.name, items.values(), self.outs, deps)
emitter_label(f"EXPORT {self.name}")
emitter_exec(cs)
emitter_rule(self.name, self.outs, [], deps)
emit("\t@")
if self.outs:
emit("clean::")

View File

@@ -6,7 +6,9 @@ import subprocess
emit(
"""
PKG_CONFIG ?= pkg-config
PACKAGES := $(shell $(PKG_CONFIG) --list-all | cut -d' ' -f1)
PACKAGES := $(shell $(PKG_CONFIG) --list-all | cut -d' ' -f1 | sort)
PCFILES := $(wildcard $(patsubst %,%/*.pc,$(subst :, ,$(shell $(PKG_CONFIG) --variable pc_path pkg-config))))
$(OBJ)/build.mk: $(PCFILES)
"""
)

View File

@@ -6,11 +6,12 @@ emit(
"""
WX_CONFIG ?= wx-config
ifneq ($(strip $(shell command -v $(WX_CONFIG) >/dev/null 2>&1; echo $$?)),0)
$(error Required binary 'wx-config' not found.)
endif
WX_CFLAGS = $(error Required binary 'wx-config' not found.)
WX_LDFLAGS = $(error Required binary 'wx-config' not found.)
else
WX_CFLAGS := $(shell $(WX_CONFIG) --cxxflags core base adv aui richtext)
WX_LDFLAGS := $(shell $(WX_CONFIG) --libs core base adv aui richtext)
endif
"""
)