aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--Makefile.common22
-rw-r--r--chinese/Make.lang6
-rw-r--r--chinese/News/weekly/Makefile8
-rw-r--r--english/News/weekly/Makefile6
-rw-r--r--english/devel/website/stats/Makefile2
-rw-r--r--english/events/2003/Makefile2
-rw-r--r--english/events/2004/Makefile2
-rw-r--r--english/events/2005/Makefile2
-rw-r--r--english/events/2006/Makefile2
-rw-r--r--english/events/2007/Makefile2
-rw-r--r--english/events/2008/Makefile2
-rw-r--r--english/events/2009/Makefile2
-rw-r--r--english/events/2010/Makefile2
-rw-r--r--english/events/2011/Makefile2
-rw-r--r--english/events/2012/Makefile2
-rw-r--r--english/events/2013/Makefile2
-rw-r--r--english/international/Swedish/Makefile2
-rw-r--r--english/security/oval/Makefile2
-rw-r--r--english/women/profiles/Makefile8
19 files changed, 43 insertions, 35 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
diff --git a/chinese/Make.lang b/chinese/Make.lang
index c68f2b451a7..9deca16ac92 100644
--- a/chinese/Make.lang
+++ b/chinese/Make.lang
@@ -73,17 +73,17 @@ $(TOHK): $(TOTW)
$(HTMLDIR)/%.zh-cn.html: %.zh-cn.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)
$(HTMLDIR)/%.zh-hk.html: %.zh-hk.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)
$(HTMLDIR)/%.zh-tw.html: %.zh-tw.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)
# Create %.html -> %.zh-tw.html symlink if no English version of %.wml exists
@if [ ! -f "$(WMLBASE)/../english/$(CUR_DIR)/$(*F).wml" ]; then \
echo "Making a link $(@D)/$(*F).html -> $(@F)"; \
diff --git a/chinese/News/weekly/Makefile b/chinese/News/weekly/Makefile
index 0be17bf0589..980a8f8307f 100644
--- a/chinese/News/weekly/Makefile
+++ b/chinese/News/weekly/Makefile
@@ -14,18 +14,18 @@ STRIP_INITIAL_BLANK_LINE := $(CURDIR)/$(STRIP_INITIAL_BLANK_LINE)
$(HTMLDIR)/%.zh-cn.html: %.zh-cn.html
@test -d $(@D) || mkdir -m g+w -p $(@D)
@echo copying $(@F) to $(@D)
- -@install -m 664 -p $(<) $(@D)
+ $(IGNORE)@install -m 664 -p $(<) $(@D)
$(HTMLDIR)/%.zh-hk.html: %.zh-hk.html
@test -d $(@D) || mkdir -m g+w -p $(@D)
@echo copying $(@F) to $(@D)
- -@install -m 664 -p $(<) $(@D)
+ $(IGNORE)@install -m 664 -p $(<) $(@D)
$(HTMLDIR)/%.zh-tw.html: %.zh-tw.html
@test -d $(@D) || mkdir -m g+w -p $(@D)
@echo copying $(@F) to $(@D)
- -@install -m 664 -p $(<) $(@D)
+ $(IGNORE)@install -m 664 -p $(<) $(@D)
clean::
- -find . -type f -name \*.$(LANGUAGE)-??.html | xargs rm -f
+ $(IGNORE)find . -type f -name \*.$(LANGUAGE)-??.html | xargs rm -f
index.zh-cn.html index.zh-hk.html index.zh-tw.html: index.wml \
$(wildcard $(CUR_YEAR)/*/index.wml) \
diff --git a/english/News/weekly/Makefile b/english/News/weekly/Makefile
index 4fa36442086..98ef474d7ae 100644
--- a/english/News/weekly/Makefile
+++ b/english/News/weekly/Makefile
@@ -63,7 +63,7 @@ endif
$(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html
@test -d $(@D) || mkdir -m g+w -p $(@D)
@echo copying $(@F) to $(@D)
- -@install -m 664 -p $(<) $(@D)
+ $(IGNORE)install -m 664 -p $(<) $(@D)
ifeq "$(LANGUAGE)" "en"
@echo making a link $(@D)/$(*F).html -\> $(@F)
@ln -sf $(@F) $(@D)/$(*F).html
@@ -73,12 +73,12 @@ endif
$(HTMLDIR)/%.png: %.png
@test -d $(@D) || mkdir -m g+w -p $(@D)
@echo copying $(@F) to $(@D)
- -@install -m 664 -p $(<) $(@D)
+ $(IGNORE)install -m 664 -p $(<) $(@D)
# Have to add to the default clean rule to clean up all the html the
# above target produces.
clean::
- -find . -type f -name \*.$(LANGUAGE).html | xargs rm -f
+ $(IGNORE)find . -type f -name \*.$(LANGUAGE).html | xargs rm -f
# Need to rebuild the index when anything changes.
index.$(LANGUAGE).html: index.wml $(wildcard $(CUR_YEAR)/*/index.wml) \
diff --git a/english/devel/website/stats/Makefile b/english/devel/website/stats/Makefile
index b2839d99c46..adbb1bcf0ad 100644
--- a/english/devel/website/stats/Makefile
+++ b/english/devel/website/stats/Makefile
@@ -45,6 +45,6 @@ install:: $(HTMLDIR)/diffstat.js
$(HTMLDIR)/diffstat.js: diffstat.js
@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)
endif
diff --git a/english/events/2003/Makefile b/english/events/2003/Makefile
index 420c7b6f005..c61fcd8d601 100644
--- a/english/events/2003/Makefile
+++ b/english/events/2003/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2004/Makefile b/english/events/2004/Makefile
index e30395bc476..9f81aca0923 100644
--- a/english/events/2004/Makefile
+++ b/english/events/2004/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2005/Makefile b/english/events/2005/Makefile
index d9449dde82c..37fa8bb18e1 100644
--- a/english/events/2005/Makefile
+++ b/english/events/2005/Makefile
@@ -38,4 +38,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2006/Makefile b/english/events/2006/Makefile
index e449c86da78..3d491917465 100644
--- a/english/events/2006/Makefile
+++ b/english/events/2006/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2007/Makefile b/english/events/2007/Makefile
index edfecffaea3..3c4a0a736db 100644
--- a/english/events/2007/Makefile
+++ b/english/events/2007/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2008/Makefile b/english/events/2008/Makefile
index 933219f5f7e..3063123344e 100644
--- a/english/events/2008/Makefile
+++ b/english/events/2008/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2009/Makefile b/english/events/2009/Makefile
index 7ec0ed95ec7..e47d73b650e 100644
--- a/english/events/2009/Makefile
+++ b/english/events/2009/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2010/Makefile b/english/events/2010/Makefile
index 7e7768fc1b8..d33cc1f3333 100644
--- a/english/events/2010/Makefile
+++ b/english/events/2010/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2011/Makefile b/english/events/2011/Makefile
index ac84de35ae7..ae714d76d64 100644
--- a/english/events/2011/Makefile
+++ b/english/events/2011/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2012/Makefile b/english/events/2012/Makefile
index 965022ae3ed..48f08de4cf3 100644
--- a/english/events/2012/Makefile
+++ b/english/events/2012/Makefile
@@ -36,4 +36,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) $(TEMPLDIR)/template
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/events/2013/Makefile b/english/events/2013/Makefile
index 69ed0a584af..55afb2eac7d 100644
--- a/english/events/2013/Makefile
+++ b/english/events/2013/Makefile
@@ -38,4 +38,4 @@ index.$(LANGUAGE).html: index.wml $(wildcard [0-9]*\-*.wml) \
$(HTMLDIR)/%.ics: %.ics
@echo copying $< to $(HTMLDIR)
- -@install -m 644 -p $< $(HTMLDIR)
+ $(IGNORE)install -m 644 -p $< $(HTMLDIR)
diff --git a/english/international/Swedish/Makefile b/english/international/Swedish/Makefile
index f27fa1c03e2..9528d395dc6 100644
--- a/english/international/Swedish/Makefile
+++ b/english/international/Swedish/Makefile
@@ -11,7 +11,7 @@ include $(WMLBASE)/Make.lang
$(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)" "sv"
@echo making a link $(@D)/$(*F).html -\> $(@F)
@ln -sf $(@F) $(@D)/$(*F).html
diff --git a/english/security/oval/Makefile b/english/security/oval/Makefile
index 43a86be41dc..8c3d98e3a35 100644
--- a/english/security/oval/Makefile
+++ b/english/security/oval/Makefile
@@ -30,7 +30,7 @@ DebianSecTracker.json:
oval-definitions-%.xml: force DebianSecTracker.json
@[ -e $(PYTHON) ] || { echo "ERROR: Required python binary $(PYTHON) is not available, aborting generation" >&2; exit 1; }
- -$(PYTHON) generate.py -d .. -j DebianSecTracker.json -r $(patsubst oval-definitions-%.xml,%,$@) >$@
+ $(IGNORE)$(PYTHON) generate.py -d .. -j DebianSecTracker.json -r $(patsubst oval-definitions-%.xml,%,$@) >$@
# Warn if empty files are generated
# Note: They cannot be removed or the install target will fail later
@[ -s $@ ] || echo "WARNING: OVAL Definition $@ is empty, please review script and/or DSAs"
diff --git a/english/women/profiles/Makefile b/english/women/profiles/Makefile
index 1c98a114684..a68a805a9ca 100644
--- a/english/women/profiles/Makefile
+++ b/english/women/profiles/Makefile
@@ -20,10 +20,10 @@ index.$(LANGUAGE).html : index.wml $(WMLRCDEP) $(GETTEXTDEP) \
$(TEMPLDIR)/template.wml $(TEMPLDIR)/languages.wml | $(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
@@ -34,9 +34,9 @@ endif
$(TEMPLDIR)/template.wml $(TEMPLDIR)/languages.wml | $(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

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