From 652c7fc11657f9bc0768698a238857623bff7ded Mon Sep 17 00:00:00 2001 From: Squibid Date: Fri, 27 Jun 2025 08:31:04 -0400 Subject: [PATCH] update the makefile to error faster --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d07c048..fb335f6 100644 --- a/Makefile +++ b/Makefile @@ -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"