update the makefile to error faster
This commit is contained in:
13
Makefile
13
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"
|
||||
|
Reference in New Issue
Block a user