update the makefile to error faster

This commit is contained in:
2025-06-27 08:31:04 -04:00
parent bec0968764
commit 652c7fc116

View File

@ -1,8 +1,9 @@
BUILDDIR := ./void-packages
TEMPLATES := $(shell find srcpkgs/* -maxdepth 0 -type d)
PACKAGES := $(addprefix $(BUILDDIR)/,$(notdir $(TEMPLATES)))
.SHELLFLAGS := -ec
all: sync $(PACKAGES) end
all: sync $(PACKAGES) dest end
$(info TEMPLATES: $(TEMPLATES))
$(info PACKAGES: $(PACKAGES))
@ -11,11 +12,13 @@ $(BUILDDIR)/%: srcpkgs/%
@echo "Building package: $<"
@rm -rf $(BUILDDIR)/srcpkgs/$<
@cp -ru $< $(BUILDDIR)/srcpkgs/
@-cd $(BUILDDIR) && ./xbps-src clean $<
@-cd $(BUILDDIR) && ./xbps-src pkg $< || echo "Warning: Failed to build $<"
@cd $(BUILDDIR) && ./xbps-src clean $<
@cd $(BUILDDIR) && ./xbps-src pkg $<
dest:
@mkdir -p ./dest
@-cp -u $(BUILDDIR)/hostdir/binpkgs/*.xbps ./dest/
@-cp $(BUILDDIR)/hostdir/binpkgs/x86_64-repodata ./dest/
@cp -u $(BUILDDIR)/hostdir/binpkgs/*.xbps ./dest/
@cp $(BUILDDIR)/hostdir/binpkgs/x86_64-repodata ./dest/
end:
@printf "\n\n\033[1;31mRun the following commands:\033[m\n"