Get rid of all the ||: stuff in the Makefile

Make has a built-in way of ignoring errors.
This commit is contained in:
Kevin Ballard 2017-05-23 16:57:24 -07:00
parent 36c2ecb64f
commit 027667be53

View File

@ -249,7 +249,7 @@ sgr0 := $(shell ( tput sgr0 || tput me) 2> /dev/null )
# Cool trick: `make show-$var` (e.g. make show-HAVE_DOXYGEN) to quickly see what $var is. # Cool trick: `make show-$var` (e.g. make show-HAVE_DOXYGEN) to quickly see what $var is.
# #
show-%: show-%:
@echo " $* = $(em)$(cyan)'$(subst ',''',$($*))'$(sgr0)" ||: -@echo " $* = $(em)$(cyan)'$(subst ',''',$($*))'$(sgr0)"
# #
# Make everything needed for installing fish # Make everything needed for installing fish
# #
@ -649,9 +649,7 @@ xcode-install:
.PHONY: xcode-install .PHONY: xcode-install
# #
# Actually do the installation. These '||true', '||:' lines are to prevent installs # Actually do the installation.
# from failing for (e.g.) missing man pages or extra_dirs outside the
# writeable prefix.
# #
install-force: all install-translations | show-datadir show-sysconfdir show-extra_completionsdir show-extra_functionsdir show-extra_confdir show-mandir install-force: all install-translations | show-datadir show-sysconfdir show-extra_completionsdir show-extra_functionsdir show-extra_confdir show-mandir
$v $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $v $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
@ -679,9 +677,9 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr
$v $(INSTALL) -m 644 share/__fish_build_paths.fish $(DESTDIR)$(datadir)/fish/ $v $(INSTALL) -m 644 share/__fish_build_paths.fish $(DESTDIR)$(datadir)/fish/
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/pkgconfig $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/pkgconfig
@echo "Creating placeholder vendor/'extra_' directories" @echo "Creating placeholder vendor/'extra_' directories"
$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_completionsdir) ||: -$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_completionsdir)
$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_functionsdir) ||: -$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_functionsdir)
$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_confdir) ||: -$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_confdir)
@echo "Installing pkgconfig file" @echo "Installing pkgconfig file"
$v $(INSTALL) -m 644 fish.pc $(DESTDIR)$(datadir)/pkgconfig $v $(INSTALL) -m 644 fish.pc $(DESTDIR)$(datadir)/pkgconfig
@echo "Installing the $(bo)fish completion library$(sgr0)..."; @echo "Installing the $(bo)fish completion library$(sgr0)...";
@ -885,8 +883,8 @@ style-all:
# Restore the source tree to the state right after extracting a tarball. # Restore the source tree to the state right after extracting a tarball.
# #
distclean: clean distclean: clean
$v test ! -f $(PCRE2_DIR)/Makefile || \ -$v test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) V=$(V) -C $(PCRE2_DIR) distclean ||: $(MAKE) V=$(V) -C $(PCRE2_DIR) distclean
$v rm -rf config.status config.log config.h Makefile autom4te.cache aclocal.m4 $v rm -rf config.status config.log config.h Makefile autom4te.cache aclocal.m4
.PHONY: distclean .PHONY: distclean
@ -903,12 +901,12 @@ clean:
# PCRE's make clean has a few slightly annoying exceptions to the V= rule. If V=0 # PCRE's make clean has a few slightly annoying exceptions to the V= rule. If V=0
# send all output to /dev/null - unless there's an error, in which case run it again not silenced. # send all output to /dev/null - unless there's an error, in which case run it again not silenced.
ifeq ($(V), 0 ) ifeq ($(V), 0 )
@test ! -f $(PCRE2_DIR)/Makefile || \ -@test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) -C $(PCRE2_DIR) clean ||: $(MAKE) -C $(PCRE2_DIR) clean
else else
@test ! -f $(PCRE2_DIR)/Makefile || \ -@test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) -s -C $(PCRE2_DIR) clean > /dev/null || \ $(MAKE) -s -C $(PCRE2_DIR) clean > /dev/null || \
$(MAKE) -s -C $(PCRE2_DIR) clean ||: $(MAKE) -s -C $(PCRE2_DIR) clean
endif endif
$v rm -f obj/*.o *.o doc.h doc.tmp $v rm -f obj/*.o *.o doc.h doc.tmp
$v rm -f doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr $v rm -f doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr