From: bones_was_here Date: Sun, 2 Aug 2020 02:50:51 +0000 (+1000) Subject: qcsrc/Makefile: put csprogs pk3 temp files in WORKDIR and have ZIP or `make clean... X-Git-Tag: xonotic-v0.8.5~729^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=806667de9eea040346c560ee427d04d50cad4e1c;p=xonotic%2Fxonotic-data.pk3dir.git qcsrc/Makefile: put csprogs pk3 temp files in WORKDIR and have ZIP or `make clean` delete them --- diff --git a/qcsrc/Makefile b/qcsrc/Makefile index 1edb96fa2..f62926be4 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -15,13 +15,13 @@ BUILD_MOD ?= ifndef ZIP ifneq ($(shell which zip 2>/dev/null),) - ZIP := zip -9 + ZIP := zip -9m endif ifneq ($(shell which 7z 2>/dev/null),) - ZIP := 7z a -tzip -mx=9 + ZIP := 7z a -tzip -mx=9 -sdel endif ifneq ($(shell which 7za 2>/dev/null),) - ZIP := 7za a -tzip -mx=9 + ZIP := 7za a -tzip -mx=9 -sdel endif ifndef ZIP $(warning "No zip / 7z / 7za in ($(PATH))") @@ -79,6 +79,7 @@ clean: | $(WORKDIR) $(RM) $(WORKDIR)/*.qc $(RM) $(WORKDIR)/*.txt $(RM) $(WORKDIR)/qccversion.* + $(RM) $(WORKDIR)/csprogs-* $(RM) csprogs-*.pk3 .PHONY: qc @@ -97,12 +98,11 @@ pk3: csprogs-$(VER).pk3 $(eval TXT=$(PROG)-$(VER).txt) $(eval DAT=$(PROG)-$(VER).dat) $(eval LNO=$(PROG)-$(VER).lno) - @ echo "http://xonotic.org" > $(TXT) - @ cp -f $(PROGS_OUT)/$(PROG).dat $(DAT) - @ cp -f $(PROGS_OUT)/$(PROG).lno $(LNO) - @ $(RM) csprogs-*.pk3 - $(ZIP) $(PK3) $(TXT) $(DAT) $(LNO) - @ $(RM) $(TXT) $(DAT) $(LNO) + @ echo "http://xonotic.org" > $(WORKDIR)/$(TXT) + @ cp -f $(PROGS_OUT)/$(PROG).dat $(WORKDIR)/$(DAT) + @ cp -f $(PROGS_OUT)/$(PROG).lno $(WORKDIR)/$(LNO) + @ $(RM) $(PROG)-*.pk3 + cd $(WORKDIR) && $(ZIP) $(CURDIR)/$(PK3) $(TXT) $(DAT) $(LNO) QCCVERSION := $(shell cd lib && $(QCC) --version) QCCVERSIONFILE := $(WORKDIR)/qccversion.$(shell echo ${QCCVERSION} | git hash-object --stdin)