aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.common
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2018-06-10 19:30:04 +0100
committerSteve McIntyre <steve@einval.com>2018-06-10 19:30:04 +0100
commit1714c6efd98fafeddf5189f68841acfcca607b3b (patch)
tree8aeaab41ef14faa7d05125dba149e502f3a665b2 /Makefile.common
parent03bccc276e67c0a9fb10424a55133b33421231f2 (diff)
Add an option to stop make on various errors
By default, many of the processes in the webwml build are run with a leading "-" so that make will ignore errors. Replace *most* of those (*not* including rm calls for make clean) with $(IGNORE) and add a conditional to Makefile.common to control what $(IGNORE) does. By default, things will work just the same as before. If you set STRICT_ERROR_CHECKS=1 in Makefile.common, the build will now be much more strict. Most people can just ignore the change to add this option, but it's helpful when debugging the scripts to have things fail cleanly and quickly.
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common22
1 files changed, 15 insertions, 7 deletions
diff --git a/Makefile.common b/Makefile.common
index 9f9dfb7b398..93fafdc96e9 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -3,6 +3,14 @@
CUR_YEAR := $(shell date +%Y)
+# Turn this on to stop ignoring errors in various places
+STRICT_ERROR_CHECKS = 1
+ifeq ($(STRICT_ERROR_CHECKS), 0)
+IGNORE = -
+else
+IGNORE =
+endif
+
ENGLISHSRCDIR := $(WMLBASE)/../english
ENGLISHDIR := $(ENGLISHSRCDIR)
# ^ just an alias ^
@@ -64,12 +72,12 @@ existing-SUBS-cleandest := $(addsuffix -cleandest,$(existing-SUBS))
all:: $(HTMLFILES) $(existing-SUBS)
$(existing-SUBS):
- -$(MAKE) -C $@
+ $(IGNORE)$(MAKE) -C $@
install:: $(HTMLDESTFILES) $(OTHERDESTFILES) $(existing-SUBS-install)
$(existing-SUBS-install):
- -$(MAKE) -C $(patsubst %-install,%,$@) install
+ $(IGNORE)$(MAKE) -C $(patsubst %-install,%,$@) install
clean::
rm -f *.$(LANGUAGE).html *~ *.forced
@@ -79,7 +87,7 @@ endif
clean:: $(existing-SUBS-clean)
$(existing-SUBS-clean):
- -$(MAKE) -C $(patsubst %-clean,%,$@) clean
+ $(IGNORE)$(MAKE) -C $(patsubst %-clean,%,$@) clean
cleandest::
rm -f $(HTMLDIR)/*.$(LANGUAGE).html
@@ -89,7 +97,7 @@ endif
cleandest:: $(existing-SUBS-cleandest)
$(existing-SUBS-cleandest):
- -$(MAKE) -C $(patsubst %-cleandest,%,$@) cleandest
+ $(IGNORE)$(MAKE) -C $(patsubst %-cleandest,%,$@) cleandest
$(VCSREVCACHE): $(WMLBASE)/../.git/index
(cd $(WMLBASE)/.. && ./build_vcs_cache.pl)
@@ -110,10 +118,10 @@ endif
%.$(LANGUAGE).html : %.wml $(EXTRAWMLDEP) | $(VCSREVCACHE)
$(WML) $(<F)
ifeq "$(LANGUAGE)" "en"
- -$(WMLBASE)/../touch_translations.pl $(CURDIR)/$(<F) $(LANGUAGE)
+ $(IGNORE)$(WMLBASE)/../touch_translations.pl $(CURDIR)/$(<F) $(LANGUAGE)
else
ifneq "$(findstring international,$(CUR_DIR))" ""
- -$(WMLBASE)/../touch_translations.pl $(CURDIR)/$(<F) $(LANGUAGE)
+ $(IGNORE)$(WMLBASE)/../touch_translations.pl $(CURDIR)/$(<F) $(LANGUAGE)
endif
endif
@@ -123,7 +131,7 @@ ifndef NOGENERICINSTDEP
$(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html
@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
@echo copying $(@F) to $(HTMLDIR)
- -@install -m 664 -p $(@F) $(HTMLDIR)
+ $(IGNORE)@install -m 664 -p $(@F) $(HTMLDIR)
ifeq "$(LANGUAGE)" "nb"
@echo making a link $(@D)/$(*F).no.html -\> $(@F)
@ln -sf $(@F) $(@D)/$(*F).no.html

© 2014-2024 Faster IT GmbH | imprint | privacy policy