texts reorganisation in build and make scripts
This commit is contained in:
parent
13cd782e97
commit
394f511333
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,7 +7,7 @@ news/????/index.??.xhtml
|
||||
news/????/index.sources
|
||||
news/????/index.xsl
|
||||
news/*/.*.??.xml
|
||||
tools/.texts-??.xml
|
||||
global/data/texts/.texts.??.xml
|
||||
.fundraising.??.xml
|
||||
.default.xsl
|
||||
.localmenu.*.xml
|
||||
|
12
Makefile
12
Makefile
@ -61,7 +61,7 @@ $(SUBDIRS): .FORCE
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# After this step, the following symlinks will exist:
|
||||
# * tools/.texts-<lang>.xml for each language
|
||||
# * global/data/texts/.texts.<lang>.xml for each language
|
||||
# * ./fundraising.<lang>.xml for each language
|
||||
# Each of these symlinks will point to the corresponding file without a dot at
|
||||
# the beginning of the filename, if present, and to the English version
|
||||
@ -70,14 +70,14 @@ $(SUBDIRS): .FORCE
|
||||
|
||||
LANGUAGES := $(shell ls -xw0 global/languages)
|
||||
|
||||
TEXTS_LINKS := $(foreach lang,$(LANGUAGES),tools/.texts-$(lang).xml)
|
||||
TEXTS_LINKS := $(foreach lang,$(LANGUAGES),global/data/texts/.texts.$(lang).xml)
|
||||
|
||||
all: $(TEXTS_LINKS)
|
||||
tools/.texts-%.xml: .FORCE
|
||||
if [ -f tools/texts-$*.xml ]; then \
|
||||
ln -sf texts-$*.xml $@; \
|
||||
global/data/texts/.texts.%.xml: .FORCE
|
||||
if [ -f global/data/texts/texts.$*.xml ]; then \
|
||||
ln -sf texts.$*.xml $@; \
|
||||
else \
|
||||
ln -sf texts-en.xml $@; \
|
||||
ln -sf texts.en.xml $@; \
|
||||
fi
|
||||
|
||||
FUNDRAISING_LINKS := $(foreach lang,$(LANGUAGES),.fundraising.$(lang).xml)
|
||||
|
@ -57,7 +57,7 @@ EOF
|
||||
|
||||
for lang in ${languages}; do
|
||||
cat<<EOF
|
||||
\$(filter %.${lang}.html,\$(HTML_DST_FILES)): \$(OUTPUTDIR)/%.${lang}.html: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$\$(XSL_DEP) \$(INPUTDIR)/tools/.texts-${lang}.xml \$(INPUTDIR)/tools/texts-en.xml \$(INPUTDIR)/.fundraising.${lang}.xml \$(INPUTDIR)/fundraising.en.xml
|
||||
\$(filter %.${lang}.html,\$(HTML_DST_FILES)): \$(OUTPUTDIR)/%.${lang}.html: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$\$(XSL_DEP) \$(INPUTDIR)/global/data/texts/.texts.${lang}.xml \$(INPUTDIR)/global/data/texts/texts.en.xml \$(INPUTDIR)/.fundraising.${lang}.xml \$(INPUTDIR)/fundraising.en.xml
|
||||
echo "* Building \$*.${lang}.html"
|
||||
\${PROCESSOR} \${PROCFLAGS} process_file "\$(INPUTDIR)/\$*.${lang}.xhtml" > "\$@"
|
||||
EOF
|
||||
@ -144,7 +144,7 @@ EOF
|
||||
|
||||
for lang in ${languages}; do
|
||||
cat<<EOF
|
||||
\$(OUTPUTDIR)/%.${lang}.rss: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$(INPUTDIR)/%.rss.xsl \$(INPUTDIR)/tools/.texts-${lang}.xml \$(INPUTDIR)/tools/texts-en.xml \$(INPUTDIR)/.fundraising.${lang}.xml \$(INPUTDIR)/fundraising.en.xml
|
||||
\$(OUTPUTDIR)/%.${lang}.rss: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$(INPUTDIR)/%.rss.xsl \$(INPUTDIR)/global/data/texts/.texts.${lang}.xml \$(INPUTDIR)/global/data/texts/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" > "\$@"
|
||||
EOF
|
||||
@ -176,7 +176,7 @@ EOF
|
||||
|
||||
for lang in ${languages}; do
|
||||
cat<<EOF
|
||||
\$(OUTPUTDIR)/%.${lang}.ics: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$(INPUTDIR)/%.ics.xsl \$(INPUTDIR)/tools/.texts-${lang}.xml \$(INPUTDIR)/tools/texts-en.xml \$(INPUTDIR)/.fundraising.${lang}.xml \$(INPUTDIR)/fundraising.en.xml
|
||||
\$(OUTPUTDIR)/%.${lang}.ics: \$(INPUTDIR)/%.*.xhtml \$\$(XMLLIST_DEP) \$(INPUTDIR)/%.ics.xsl \$(INPUTDIR)/global/data/texts/.texts.${lang}.xml \$(INPUTDIR)/global/data/texts/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" > "\$@"
|
||||
EOF
|
||||
|
@ -73,7 +73,7 @@ build_xmlstream(){
|
||||
|
||||
olang="$(echo "${shortname}".[a-z][a-z].xhtml "${shortname}".[e]n.xhtml |sed -rn 's;^.*\.([a-z]{2})\.xhtml.*$;\1;p')"
|
||||
dirname="${shortname%/*}/"
|
||||
texts_xml="$basedir/tools/.texts-${lang}.xml"
|
||||
texts_xml="$basedir/global/data/texts/.texts.${lang}.xml"
|
||||
fundraising_xml="$basedir/.fundraising.${lang}.xml"
|
||||
date="$(date +%Y-%m-%d)"
|
||||
time="$(date +%H:%M:%S)"
|
||||
@ -102,7 +102,7 @@ build_xmlstream(){
|
||||
$(list_langs "$shortname")
|
||||
</trlist>
|
||||
|
||||
<textsetbackup>$(include_xml "$basedir/tools/texts-en.xml")</textsetbackup>
|
||||
<textsetbackup>$(include_xml "$basedir/global/data/texts/texts.en.xml")</textsetbackup>
|
||||
<textset>$(include_xml "$texts_xml")</textset>
|
||||
<fundraising>$(include_xml "$fundraising_xml")</fundraising>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user