Some nitpicks

This commit is contained in:
Reinhard Müller 2019-03-12 16:42:34 +01:00
parent 798f8f1458
commit 447bbcf821
4 changed files with 26 additions and 26 deletions

View File

@ -18,8 +18,8 @@ SUBDIRS := $(shell find */* -name "Makefile" | xargs dirname)
all: $(SUBDIRS)
$(SUBDIRS): .FORCE
@echo "* Preparing subdirectory $@"
@$(MAKE) -j -k -C $@
echo "* Preparing subdirectory $@"
$(MAKE) --silent --directory=$@
# -----------------------------------------------------------------------------
# Handle local menus
@ -70,7 +70,7 @@ TEXTS_LINKS := $(foreach lang,$(LANGUAGES),tools/.texts-$(lang).xml)
all: $(TEXTS_LINKS)
tools/.texts-%.xml: .FORCE
@if [ -f tools/texts-$*.xml ]; then \
if [ -f tools/texts-$*.xml ]; then \
ln -sf texts-$*.xml $@; \
else \
ln -sf texts-en.xml $@; \
@ -80,7 +80,7 @@ FUNDRAISING_LINKS := $(foreach lang,$(LANGUAGES),.fundraising.$(lang).xml)
all: $(FUNDRAISING_LINKS)
.fundraising.%.xml: .FORCE
@if [ -f fundraising.$*.xml ]; then \
if [ -f fundraising.$*.xml ]; then \
ln -sf fundraising.$*.xml $@; \
else \
ln -sf fundraising.en.xml $@; \
@ -102,7 +102,7 @@ XHTML_DIRS := $(patsubst %/,%,$(sort $(dir $(shell find -name '*.??.xhtml'))))
.PHONY: default_xsl
all: default_xsl
default_xsl:
@for directory in $(XHTML_DIRS); do \
for directory in $(XHTML_DIRS); do \
dir="$${directory}"; \
prefix=""; \
until [ -f "$${dir}/default.xsl" -o "$${dir}" = "." ]; do \
@ -133,7 +133,7 @@ default_xsl:
.PHONY: xmllists
all: xmllists
xmllists: $(SUBDIRS)
@tools/make_xmllists.sh
tools/update_xmllists.sh
# -----------------------------------------------------------------------------
# Update XSL stylesheets
@ -148,4 +148,4 @@ xmllists: $(SUBDIRS)
.PHONY: stylesheets
all: stylesheets
stylesheets: $(SUBDIRS)
@tools/update_stylesheets.sh
tools/update_stylesheets.sh

View File

@ -20,7 +20,7 @@ build_into(){
{
echo "Starting phase 1" \
&& make -C "$basedir" --no-print-directory 2>&1 \
&& make --silent --directory="$basedir" 2>&1 \
&& echo "Finishing phase 1" \
|| die "Error during phase 1"
} | t_logstatus phase_1 || exit 1
@ -36,7 +36,7 @@ build_into(){
{
echo "Starting phase 2" \
&& make -j $ncpu -f "$(logname Makefile)" 2>&1 \
&& make --jobs=$ncpu --file="$(logname Makefile)" 2>&1 \
&& echo "Finishing phase 2" \
|| die "Error during phase 2"
} | t_logstatus phase_2 || exit 1

View File

@ -56,8 +56,8 @@ EOF
for lang in ${languages}; do
cat<<EOF
\$(OUTPUTDIR)/%.${lang}.html: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$\$(XSL_DEP) \$(INPUTDIR)/tools/menu-global.xml \$(INPUTDIR)/tools/.texts-${lang}.xml \$(INPUTDIR)/tools/texts-en.xml \$(INPUTDIR)/.fundraising.${lang}.xml \$(INPUTDIR)/fundraising.en.xml
@echo "* Building \$*.${lang}.html"
@\${PROCESSOR} \${PROCFLAGS} process_file \$(INPUTDIR)/\$*.${lang}.xhtml > \$@
echo "* Building \$*.${lang}.html"
\${PROCESSOR} \${PROCFLAGS} process_file \$(INPUTDIR)/\$*.${lang}.xhtml > \$@
EOF
done
@ -91,8 +91,8 @@ EOF
for lang in ${languages}; do
cat<<EOF
\$(OUTPUTDIR)/%/index.${lang}.html:
@echo "* Creating symlink \$*/index.${lang}.html"
@ln -sf \$(notdir \$*).${lang}.html \$@
echo "* Creating symlink \$*/index.${lang}.html"
ln -sf \$(notdir \$*).${lang}.html \$@
EOF
done
@ -111,8 +111,8 @@ EOF
for lang in ${languages}; do
cat<<EOF
\$(OUTPUTDIR)/%.html.${lang}:
@echo "* Creating symlink \$*.html.${lang}"
@ln -sf \$(notdir \$*).${lang}.html \$@
echo "* Creating symlink \$*.html.${lang}"
ln -sf \$(notdir \$*).${lang}.html \$@
EOF
done
@ -140,8 +140,8 @@ EOF
for lang in ${languages}; do
cat<<EOF
\$(OUTPUTDIR)/%.${lang}.rss: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$(INPUTDIR)/%.rss.xsl \$(INPUTDIR)/tools/menu-global.xml \$(INPUTDIR)/tools/.texts-${lang}.xml \$(INPUTDIR)/tools/texts-en.xml \$(INPUTDIR)/.fundraising.${lang}.xml \$(INPUTDIR)/fundraising.en.xml
@echo "* Building \$*.${lang}.rss"
@\${PROCESSOR} \${PROCFLAGS} process_file \$(INPUTDIR)/\$*.${lang}.xhtml \$(INPUTDIR)/\$*.rss.xsl > \$@
echo "* Building \$*.${lang}.rss"
\${PROCESSOR} \${PROCFLAGS} process_file \$(INPUTDIR)/\$*.${lang}.xhtml \$(INPUTDIR)/\$*.rss.xsl > \$@
EOF
done
@ -169,8 +169,8 @@ EOF
for lang in ${languages}; do
cat<<EOF
\$(OUTPUTDIR)/%.${lang}.ics: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$(INPUTDIR)/%.ics.xsl \$(INPUTDIR)/tools/menu-global.xml \$(INPUTDIR)/tools/.texts-${lang}.xml \$(INPUTDIR)/tools/texts-en.xml \$(INPUTDIR)/.fundraising.${lang}.xml \$(INPUTDIR)/fundraising.en.xml
@echo "* Building \$*.${lang}.ics"
@\${PROCESSOR} \${PROCFLAGS} process_file \$(INPUTDIR)/\$*.${lang}.xhtml \$(INPUTDIR)/\$*.ics.xsl > \$@
echo "* Building \$*.${lang}.ics"
\${PROCESSOR} \${PROCFLAGS} process_file \$(INPUTDIR)/\$*.${lang}.xhtml \$(INPUTDIR)/\$*.ics.xsl > \$@
EOF
done
@ -201,8 +201,8 @@ COPY_DST_FILES := \$(sort \$(patsubst \$(INPUTDIR)/%,\$(OUTPUTDIR)/%,\$(COPY_SRC
all: \$(COPY_DST_FILES)
\$(COPY_DST_FILES): \$(OUTPUTDIR)/%: \$(INPUTDIR)/%
@echo "* Copying file \$*"
@cp \$< \$@
echo "* Copying file \$*"
cp \$< \$@
# -----------------------------------------------------------------------------
# Copy .xhtml files to "source" directory in target directory tree
@ -212,8 +212,8 @@ SOURCE_DST_FILES := \$(sort \$(patsubst \$(INPUTDIR)/%,\$(OUTPUTDIR)/source/%,\$
all: \$(SOURCE_DST_FILES)
\$(SOURCE_DST_FILES): \$(OUTPUTDIR)/source/%: \$(INPUTDIR)/%
@echo "* Copying source \$*"
@cp \$< \$@
echo "* Copying source \$*"
cp \$< \$@
# -----------------------------------------------------------------------------
# Clean up excess files in target directory
@ -224,11 +224,11 @@ ALL_DST := \$(HTML_DST_FILES) \$(INDEX_DST_LINKS) \$(HTML_DST_LINKS) \$(RSS_DST_
.PHONY: clean
all: clean
clean:
@# Write all destination filenames into "manifest" file, one per line
# Write all destination filenames into "manifest" file, one per line
\$(file >\$(STATUSDIR)/manifest)
\$(foreach filename,\$(ALL_DST),\$(file >>\$(STATUSDIR)/manifest,\$(filename)))
@sort \$(STATUSDIR)/manifest > \$(STATUSDIR)/manifest.sorted
@find -L \$(OUTPUTDIR) -type f \\
sort \$(STATUSDIR)/manifest > \$(STATUSDIR)/manifest.sorted
find -L \$(OUTPUTDIR) -type f \\
| sort \\
| diff - \$(STATUSDIR)/manifest.sorted \\
| sed -rn 's;^< ;;p' \\