diff --git a/build.py b/build.py index f07775e3..d92c3845 100644 --- a/build.py +++ b/build.py @@ -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"), diff --git a/build/ab.py b/build/ab.py index 27654568..d5393867 100644 --- a/build/ab.py +++ b/build/ab.py @@ -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::") diff --git a/build/pkg.py b/build/pkg.py index c1c98f47..e6a10bb3 100644 --- a/build/pkg.py +++ b/build/pkg.py @@ -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) """ ) diff --git a/src/gui/build.py b/src/gui/build.py index a7118161..f2d85c23 100644 --- a/src/gui/build.py +++ b/src/gui/build.py @@ -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 """ )