From: Lady Date: Fri, 19 Jan 2024 04:30:02 +0000 (-0500) Subject: Redirect some errors to /dev/null X-Git-Tag: 0.4.1~2 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/1957c42bb6ffddd0f2fb1c66840f3093d81763c6 Redirect some errors to /dev/null It’s not useful or helpful for these errors to appear in the terminal while executing the makefile. --- diff --git a/GNUmakefile b/GNUmakefile index 70183f8..a272f9a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -237,13 +237,13 @@ ifdef GIT ifneq ($(wildcard $(THISDIR)/.git),) # (overridable) The name of the current revision of ⛩️📰 书社, or its # hash if the current revision is not a tag. -thisrev = $(shell cd $(THISDIR); $(GIT) describe 2> /dev/null || $(GIT) rev-parse HEAD) +thisrev = $(shell cd $(THISDIR); $(GIT) describe 2> /dev/null || $(GIT) rev-parse HEAD 2> /dev/null || true) endif ifneq ($(wildcard .git),) # (overridable) The name of the current revision of the working # directory, or its hash if the current revision is not a tag. -srcrev = $(shell $(GIT) describe 2> /dev/null || $(GIT) rev-parse HEAD) +srcrev = $(shell $(GIT) describe 2> /dev/null || $(GIT) rev-parse HEAD 2> /dev/null || true) endif endif @@ -270,7 +270,7 @@ override assetfiles := $(filter-out $(xmlfiles) $(plaintextfiles),$(sourcefiles) override typeoffile = $(patsubst $(foreach file,$1,$(file)|%),%,$(filter $(foreach file,$1,$(file)|%),$(types))) # (callable) Get the identifier for the given parser or transform. -override id = $(or $(shell $(XMLLINT) --xpath '/*/*[local-name()="id" and namespace-uri()="urn:fdc:ladys.computer:20231231:Shu1She4"]/text()[1]' $1),about:shushe?$(or $2,unknown)=$(call pathenc,$(basename $(notdir $1)))) +override id = $(or $(shell $(XMLLINT) --xpath '/*/*[local-name()="id" and namespace-uri()="urn:fdc:ladys.computer:20231231:Shu1She4"]/text()[1]' $1 2> /dev/null),about:shushe?$(or $2,unknown)=$(call pathenc,$(basename $(notdir $1)))) # (callable) Get the local path for the given source file. override sourcepath = $(firstword $(foreach directory,$(SRCDIR),$(if $(filter $(directory)/%,$1),$(patsubst $(directory)/%,%,$1),)))