2001-04-26 20:37:29 +00:00
|
|
|
# Authors: Loic Dachary <loic@gnu.org> and Jaime Villate <villate@gnu.org>
|
2001-04-23 20:01:35 +00:00
|
|
|
#
|
2001-04-26 20:37:29 +00:00
|
|
|
# XML/XSLT processor (validator)
|
|
|
|
# -------------------------
|
2001-04-23 20:01:35 +00:00
|
|
|
#
|
|
|
|
# sablotron (sabcmd)
|
|
|
|
# apt-get install sablotron
|
|
|
|
#
|
|
|
|
# libxslt + libxml2 (xsltproc)
|
|
|
|
# http://www.xmlsoft.org/
|
|
|
|
#
|
2001-05-07 07:09:06 +00:00
|
|
|
# XML validator
|
|
|
|
# -------------
|
|
|
|
# apt-get install rxp
|
|
|
|
# or
|
|
|
|
# ftp://ftp.cogsci.ed.ac.uk/pub/richard/rxp-1.2.3.tar.gz
|
|
|
|
#
|
2001-08-25 13:21:00 +00:00
|
|
|
|
|
|
|
# branch tag name for the stable version of the site and only its patches
|
|
|
|
STABLEBRANCH = BS_20010825
|
|
|
|
|
2001-06-11 12:22:25 +00:00
|
|
|
XSLTPROC = sabcmd
|
2001-04-20 10:43:13 +00:00
|
|
|
|
2001-04-23 20:01:35 +00:00
|
|
|
FSFFRANCE = http://france.fsfeurope.org
|
2001-05-07 07:09:06 +00:00
|
|
|
FSFEUROPE = http://www.fsfeurope.org
|
2001-04-23 20:01:35 +00:00
|
|
|
FSF = http://www.fsf.org
|
|
|
|
GNU = http://www.gnu.org
|
2001-04-20 10:43:13 +00:00
|
|
|
|
2001-06-13 22:21:10 +00:00
|
|
|
ECHO = echo
|
2001-10-09 18:01:58 +00:00
|
|
|
SSH = ssh
|
2001-06-13 22:21:10 +00:00
|
|
|
|
2001-04-23 20:01:35 +00:00
|
|
|
XSLTOPTS = \
|
2001-05-07 07:09:06 +00:00
|
|
|
'$$fsffrance=$(FSFFRANCE)' \
|
|
|
|
'$$fsf=$(FSF)' \
|
|
|
|
'$$gnu=$(GNU)'
|
2001-04-20 10:43:13 +00:00
|
|
|
|
2001-05-14 23:12:36 +00:00
|
|
|
ENPAGES = $(shell find * -path 'fr' -prune -o \( -regex '.*\.en\.xhtml' -o -regex '[^\.]*\.xhtml' \) -print | sed "s/xhtml$$/html/")
|
2001-04-26 20:37:29 +00:00
|
|
|
|
|
|
|
FRPAGES = $(shell find * -path 'fr' -prune -o -regex '.*\.fr\.xhtml' -print | sed "s/xhtml$$/html/")
|
|
|
|
|
|
|
|
DEPAGES = $(shell find * -path 'fr' -prune -o -regex '.*\.de\.xhtml' -print | sed "s/xhtml$$/html/")
|
|
|
|
|
2001-05-14 10:39:12 +00:00
|
|
|
PTPAGES = $(shell find * -path 'fr' -prune -o -regex '.*\.pt\.xhtml' -print | sed "s/xhtml$$/html/")
|
|
|
|
|
2001-08-25 22:36:18 +00:00
|
|
|
ITPAGES = $(shell find * -path 'fr' -prune -o -regex '.*\.it\.xhtml' -print | sed "s/xhtml$$/html/")
|
|
|
|
|
2001-08-28 10:34:47 +00:00
|
|
|
ESPAGES = $(shell find * -path 'fr' -prune -o -regex '.*\.es\.xhtml' -print | sed "s/xhtml$$/html/")
|
|
|
|
|
2001-06-16 08:52:45 +00:00
|
|
|
# temporary, added by mad@april.org
|
2001-08-28 08:53:01 +00:00
|
|
|
NEWS = news/news.fr.html news/news.en.html news/news.pt.html
|
2001-06-16 08:52:45 +00:00
|
|
|
|
2001-08-28 10:34:47 +00:00
|
|
|
all: $(ENPAGES) $(FRPAGES) $(DEPAGES) $(PTPAGES) $(ITPAGES) $(ESPAGES)
|
2001-04-26 20:37:29 +00:00
|
|
|
|
2001-05-15 00:12:39 +00:00
|
|
|
swpat/patents.en.html: swpat/patents-agenda.en.xml
|
|
|
|
|
2001-06-11 10:09:47 +00:00
|
|
|
# temporary, added by mad@april.org
|
2001-06-16 08:52:45 +00:00
|
|
|
$(NEWS): fr/news/news-bytes-latest.en.html fr/news/news-bytes-latest.fr.html
|
|
|
|
|
|
|
|
fr/news/news-bytes-latest.en.html fr/news/news-bytes-latest.fr.html: fr/news/fsfe-fr-channel.fr.xml fr/news/fsfe-fr-channel.en.xml
|
|
|
|
@$(ECHO) "Building $@ ..."
|
|
|
|
@cd fr; $(MAKE)
|
|
|
|
|
2001-06-11 10:09:47 +00:00
|
|
|
|
2001-04-26 20:37:29 +00:00
|
|
|
$(ENPAGES): %.html: %.xhtml fsfe.xsl navigation.en.xsl
|
2001-06-13 22:21:10 +00:00
|
|
|
@$(ECHO) "Building $@ ..."; \
|
2001-04-26 20:37:29 +00:00
|
|
|
path=$< ; \
|
|
|
|
base=`expr $$path : '\(.*\).xhtml'` ; \
|
|
|
|
filebase=`basename $$base` ; \
|
|
|
|
dir=`dirname $$path` ; \
|
|
|
|
root=`dirname $$path | perl -pe 'chop; s:([^/]+):..:g if($$_ ne ".")'` ; \
|
2001-05-29 23:38:43 +00:00
|
|
|
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase '$$path='$$path > $$base.html-temp && (cat $$base.html-temp | perl -p -e '$$| = 1; s/\$$//g if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.html) ; \
|
2001-04-26 20:37:29 +00:00
|
|
|
rm -f $$base.html-temp
|
|
|
|
|
|
|
|
$(FRPAGES): %.html: %.xhtml fsfe.xsl navigation.fr.xsl
|
2001-06-13 22:21:10 +00:00
|
|
|
@$(ECHO) "Building $@ ..."; \
|
2001-04-26 20:37:29 +00:00
|
|
|
path=$< ; \
|
|
|
|
base=`expr $$path : '\(.*\).xhtml'` ; \
|
|
|
|
filebase=`basename $$base` ; \
|
|
|
|
dir=`dirname $$path` ; \
|
|
|
|
root=`dirname $$path | perl -pe 'chop; s:([^/]+):..:g if($$_ ne ".")'` ; \
|
2001-05-29 23:38:43 +00:00
|
|
|
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase '$$path='$$path > $$base.html-temp && (cat $$base.html-temp | perl -p -e '$$| = 1; s/\$$//g if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.html) ; \
|
2001-04-26 20:37:29 +00:00
|
|
|
rm -f $$base.html-temp
|
|
|
|
|
|
|
|
$(DEPAGES): %.html: %.xhtml fsfe.xsl navigation.de.xsl
|
2001-06-13 22:21:10 +00:00
|
|
|
@$(ECHO) "Building $@ ..."; \
|
2001-04-26 20:37:29 +00:00
|
|
|
path=$< ; \
|
|
|
|
base=`expr $$path : '\(.*\).xhtml'` ; \
|
|
|
|
filebase=`basename $$base` ; \
|
|
|
|
dir=`dirname $$path` ; \
|
|
|
|
root=`dirname $$path | perl -pe 'chop; s:([^/]+):..:g if($$_ ne ".")'` ; \
|
2001-05-07 07:09:06 +00:00
|
|
|
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase '$$path='$$path > $$base.html-temp && (cat $$base.html-temp | perl -p -e '$$| = 1; s/\$$//g if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.html) ; \
|
2001-04-26 20:37:29 +00:00
|
|
|
rm -f $$base.html-temp
|
|
|
|
|
2001-05-14 10:39:12 +00:00
|
|
|
$(PTPAGES): %.html: %.xhtml fsfe.xsl navigation.pt.xsl
|
2001-06-13 22:21:10 +00:00
|
|
|
@$(ECHO) "Building $@ ..."; \
|
2001-05-14 10:39:12 +00:00
|
|
|
path=$< ; \
|
|
|
|
base=`expr $$path : '\(.*\).xhtml'` ; \
|
|
|
|
filebase=`basename $$base` ; \
|
|
|
|
dir=`dirname $$path` ; \
|
|
|
|
root=`dirname $$path | perl -pe 'chop; s:([^/]+):..:g if($$_ ne ".")'` ; \
|
|
|
|
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase '$$path='$$path > $$base.html-temp && (cat $$base.html-temp | perl -p -e '$$| = 1; s/\$$//g if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.html) ; \
|
|
|
|
rm -f $$base.html-temp
|
|
|
|
|
2001-08-25 22:36:18 +00:00
|
|
|
$(ITPAGES): %.html: %.xhtml fsfe.xsl # navigation.it.xsl
|
|
|
|
@$(ECHO) "Building $@ ..."; \
|
|
|
|
path=$< ; \
|
|
|
|
base=`expr $$path : '\(.*\).xhtml'` ; \
|
|
|
|
filebase=`basename $$base` ; \
|
|
|
|
dir=`dirname $$path` ; \
|
|
|
|
root=`dirname $$path | perl -pe 'chop; s:([^/]+):..:g if($$_ ne ".")'` ; \
|
|
|
|
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase '$$path='$$path > $$base.html-temp && (cat $$base.html-temp | perl -p -e '$$| = 1; s/\$$//g if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.html) ; \
|
|
|
|
rm -f $$base.html-temp
|
|
|
|
|
2001-08-28 10:34:47 +00:00
|
|
|
$(ESPAGES): %.html: %.xhtml fsfe.xsl # navigation.es.xsl
|
|
|
|
@$(ECHO) "Building $@ ..."; \
|
|
|
|
path=$< ; \
|
|
|
|
base=`expr $$path : '\(.*\).xhtml'` ; \
|
|
|
|
filebase=`basename $$base` ; \
|
|
|
|
dir=`dirname $$path` ; \
|
|
|
|
root=`dirname $$path | perl -pe 'chop; s:([^/]+):..:g if($$_ ne ".")'` ; \
|
|
|
|
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase '$$path='$$path > $$base.html-temp && (cat $$base.html-temp | perl -p -e '$$| = 1; s/\$$//g if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.html) ; \
|
|
|
|
rm -f $$base.html-temp
|
|
|
|
|
2001-04-26 20:37:29 +00:00
|
|
|
# remove html files for which an xhtml version exists (exclude fr/)
|
|
|
|
clean:
|
2001-08-28 10:34:47 +00:00
|
|
|
rm -f $(ENPAGES) $(FRPAGES) $(DEPAGES) $(PTPAGES) $(ITPAGES) $(ESPAGES)
|
2001-04-26 20:37:29 +00:00
|
|
|
|
2001-06-14 18:23:10 +00:00
|
|
|
sync:
|
2001-08-25 13:21:00 +00:00
|
|
|
@echo "Updating stable version : $(STABLEBRANCH)"
|
2001-10-09 18:01:58 +00:00
|
|
|
$(SSH) -l www france.fsfeurope.org 'cd fsfe ; cvs -z3 -q update -I "*.html" -d ; ../bin/nightly'
|
|
|
|
$(SSH) -l www france.fsfeurope.org 'cd fsfe/server/testbeta ; cvs -z3 -q update -I "*.html" -d -r $(STABLEBRANCH) ; ../../../bin/nightly'
|
2001-08-25 13:21:00 +00:00
|
|
|
@echo "Updating beta version :"
|
2001-10-09 18:01:58 +00:00
|
|
|
$(SSH) -l www france.fsfeurope.org 'cd fsfe/server/test/fsfe/server/testbeta ; cvs -z3 -q update -I "*.html" -d -A ; ../../../../../../bin/nightly'
|