From: Jan Nieuwenhuizen Date: Sat, 3 Apr 2010 11:01:59 +0000 (+0200) Subject: Move website.make into make/. Update relevant documentation. X-Git-Tag: release/2.13.18-1~18^2~1^2~21 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8f88a5f91c5a8468d52921f37f4ea4a00ec29498;p=lilypond.git Move website.make into make/. Update relevant documentation. The new mantra for doing a local lilypond.org test is now #! /bin/sh cp -pv Documentation/lilypond-texi2html.init scripts/build cp -pv Documentation/web/server/*.htaccess scripts/build TEXI2HTML=$(type -p texi2html) LILYPOND=$HOME/vc/lilypond #from where to copy? #ONLINE_ROOT=$LILYPOND/out-www/online-root #DOC=$ONLINE_ROOT/Documentation DOC=$LILYPOND/Documentation make -f make/website.make website \ EXAMPLES=$DOC/web/ly-examples/out-www \ PICTURES=$DOC/pictures/out-www \ WEBSITE_ONLY_BUILD=1 \ TOP_SRC_DIR=$(pwd) \ TRUSTED_DIR=$(pwd)/scripts/build \ TEXI2HTML_PROGRAM=$TEXI2HTML --- diff --git a/Documentation/contributor/website-work.itexi b/Documentation/contributor/website-work.itexi index 65dc3f1098..6b64be18bb 100644 --- a/Documentation/contributor/website-work.itexi +++ b/Documentation/contributor/website-work.itexi @@ -74,7 +74,7 @@ Check for any updates to trusted scripts / files: #!/bin/sh GIT=$HOME/src/lilypond DEST=$HOME/lilypond/trusted-scripts -diff -u $DEST/website.make $GIT/website.make +diff -u $DEST/website.make $GIT/make/website.make diff -u $DEST/lilypond-texi2html.init $GIT/Documentation/lilypond-texi2html.init diff -u $DEST/extract_texi_filenames.py $GIT/scripts/build/extract_texi_filenames.py diff -u $DEST/create-version-itexi.py $GIT/scripts/build/create-version-itexi.py @@ -92,7 +92,7 @@ If the changes look ok, make them trusted: #!/bin/sh GIT=$HOME/src/lilypond DEST=$HOME/lilypond/trusted-scripts -cp $GIT/website.make $DEST/website.make +cp $GIT/make/website.make $DEST/website.make cp $GIT/Documentation/lilypond-texi2html.init $DEST/lilypond-texi2html.init cp $GIT/scripts/build/extract_texi_filenames.py $DEST/extract_texi_filenames.py cp $GIT/scripts/build/create-version-itexi.py $DEST/create-version-itexi.py @@ -112,7 +112,7 @@ DEST=$HOME/web/ cd $HOME/src/build-website cp $HOME/lilypond/trusted-scripts/website.make . -make -f website.make WEBSITE_ONLY_BUILD=1 website +make -f make/website.make WEBSITE_ONLY_BUILD=1 website rsync -ra $HOME/src/build-website/out-website/website/ $DEST/website/ cp $HOME/src/build-website/out-website/pictures $DEST cp $HOME/src/build-website/out-website/.htaccess $DEST @@ -173,7 +173,7 @@ scripts/build/website_post.py @item Translations are not included by default in @code{make website}. To test your translation, edit the @code{WEB_LANGS} line in -@file{website.make}. Do not submit a patch to add your language +@file{make/website.make}. Do not submit a patch to add your language to this file unless @code{make website} completes with less than 5 warnings. diff --git a/GNUmakefile.in b/GNUmakefile.in index ef32c0080f..7d5bba4d3a 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -27,7 +27,7 @@ RELEASE_FILES = ChangeLog RELEASE-COMMIT RELEASE_OUT_FILES = $(RELEASE_FILES:%=$(outdir)/%) OUT_DIST_FILES += $(RELEASE_OUT_FILES) EXTRA_DIST_FILES = VERSION .gitignore .mailmap \ - $(README_FILES) $(SCRIPTS) $(IN_FILES) website.make + $(README_FILES) $(SCRIPTS) $(IN_FILES) INSTALLATION_DIR=$(local_lilypond_datadir) INSTALLATION_FILES=$(config_make) VERSION @@ -294,6 +294,6 @@ test-snippets-clean: website: $(MAKE) config_make=$(config_make) \ top-src-dir=$(top-src-dir) \ - -f $(top-src-dir)/website.make \ + -f $(top-src-dir)/make/website.make \ website diff --git a/make/website.make b/make/website.make new file mode 100644 index 0000000000..dc21c6e152 --- /dev/null +++ b/make/website.make @@ -0,0 +1,145 @@ +################################################################ +# website (without the rest of the docs) + +################################################################ +##### SECURITY -- check these values for lilypond.org ######### +################################################################ +ifeq ($(WEBSITE_ONLY_BUILD),1) + ### for lilypond.org + TOP_SRC_DIR=$(HOME)/src/lilypond + TRUSTED_DIR=$(HOME)/lilypond/trusted-scripts + top-src-dir=$(TOP_SRC_DIR) + depth=. + trusted-dir=$(TRUSTED_DIR) + script-dir=$(trusted-dir) + texi2html-init-file=$(trusted-dir)/lilypond-texi2html.init + top-htaccess=$(trusted-dir)/lilypond.org.htaccess + dir-htaccess=$(trusted-dir)/website-dir.htaccess + TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html + EXAMPLES=$(HOME)/media/ly-examples/ + PICTURES=$(HOME)/media/pictures +else + ### for normal git + script-dir=$(top-src-dir)/scripts/build/ + texi2html-init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init + top-htaccess=$(top-src-dir)/Documentation/web/server/lilypond.org.htaccess + dir-htaccess=$(top-src-dir)/Documentation/web/server/website-dir.htaccess + include $(config_make) + # I assume this is run from top-build-dir + EXAMPLES=Documentation/web/ly-examples/out-www/ + PICTURES=Documentation/pictures/out-www/ +endif + + +################################################################ +OUT=out-website + +### only update this when the language compiles correctly! +#WEB_LANGS = es fr nl +WEB_LANGS = es + +TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) + +EXTRACT_TEXI_FILENAMES=python $(script-dir)/extract_texi_filenames.py +CREATE_VERSION=python $(script-dir)/create-version-itexi.py +CREATE_WEBLINKS=python $(script-dir)/create-weblinks-itexi.py +MASS_LINK=python $(script-dir)/mass-link.py +WEB_POST=python $(script-dir)/website_post.py + +SERVER_FILES=$(top-src-dir)/Documentation/web/server/ + +# don't include web +MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely) +MANUALS+=$(top-src-dir)/Documentation/contributor.texi + +website-test: + echo $(TEXI2HTML) + +website-version: + mkdir -p $(OUT) + $(CREATE_VERSION) $(top-src-dir) > $(OUT)/version.itexi + $(CREATE_WEBLINKS) $(top-src-dir) > $(OUT)/weblinks.itexi + +website-xrefs: website-version + $(EXTRACT_TEXI_FILENAMES) -I $(top-src-dir)/Documentation/ \ + -I $(OUT) -o $(OUT) --split=node \ + $(top-src-dir)/Documentation/web.texi + # normal manuals + for m in $(MANUALS); do \ + b=`basename "$$m" .texi`; \ + d=`basename "$$b" .tely`; \ + $(EXTRACT_TEXI_FILENAMES) \ + -I $(top-src-dir)/Documentation/ \ + -I $(top-src-dir)/Documentation/"$$d"/ \ + -I $(OUT) -o $(OUT) "$$m" ; \ + done + # translations + for l in $(WEB_LANGS); do \ + $(EXTRACT_TEXI_FILENAMES) \ + -I $(top-src-dir)/Documentation/ \ + -I $(top-src-dir)/Documentation/"$$l" \ + -I $(OUT) -o $(OUT) --split=node \ + $(top-src-dir)/Documentation/"$$l"/web.texi ;\ + for m in $(MANUALS); do \ + n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \ + b=`basename "$$n" .texi`; \ + d=`basename "$$b" .tely`; \ + if [ -e "$$n" ] ; then \ + $(EXTRACT_TEXI_FILENAMES) \ + -I $(top-src-dir)/Documentation/ \ + -I $(top-src-dir)/Documentation/"$$l" \ + -I $(top-src-dir)/Documentation/"$$l"/"$$d"/ \ + -I $(OUT) -o $(OUT) "$$n" ; \ + fi ; \ + done; \ + done; + + + +website-texinfo: website-version website-xrefs + $(TEXI2HTML) --prefix=index \ + --split=section \ + --I=$(top-src-dir)/Documentation/ \ + --I=$(OUT) \ + --init-file=$(texi2html-init-file) \ + -D web_version \ + --output=$(OUT)/website/ \ + $(top-src-dir)/Documentation/web.texi + # translations + for l in $(WEB_LANGS); do \ + $(TEXI2HTML) --prefix=index \ + --split=section \ + --I=$(top-src-dir)/Documentation/"$$l" \ + --I=$(top-src-dir)/Documentation/ \ + --I=$(OUT) \ + --lang="$$l" \ + --init-file=$(texi2html-init-file) \ + -D web_version \ + --output=$(OUT)/"$$l" \ + $(top-src-dir)/Documentation/"$$l"/web.texi ; \ + find $(OUT)/$$l/ -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(OUT)/'$$l'/!!g' | xargs $(MASS_LINK) --prepend-suffix .$$l hard $(OUT)/$$l/ $(OUT)/website/ ; \ + done + + +website-css: + cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/ + +website-pictures: + mkdir -p $(OUT)/website/pictures/ + cp $(PICTURES)/* $(OUT)/website/pictures/ + ln -sf website/pictures $(OUT)/pictures + +website-examples: + mkdir -p $(OUT)/website/ly-examples + cp $(EXAMPLES)/* $(OUT)/website/ly-examples + +web-post: + $(WEB_POST) $(OUT)/website/ + +website: website-texinfo website-css website-pictures website-examples web-post + cp $(SERVER_FILES)/favicon.ico $(OUT)/website/ + cp $(SERVER_FILES)/robots.txt $(OUT)/website/ + cp $(top-htaccess) $(OUT)/.htaccess + cp $(dir-htaccess) $(OUT)/website/.htaccess + + diff --git a/website.make b/website.make deleted file mode 100644 index dc21c6e152..0000000000 --- a/website.make +++ /dev/null @@ -1,145 +0,0 @@ -################################################################ -# website (without the rest of the docs) - -################################################################ -##### SECURITY -- check these values for lilypond.org ######### -################################################################ -ifeq ($(WEBSITE_ONLY_BUILD),1) - ### for lilypond.org - TOP_SRC_DIR=$(HOME)/src/lilypond - TRUSTED_DIR=$(HOME)/lilypond/trusted-scripts - top-src-dir=$(TOP_SRC_DIR) - depth=. - trusted-dir=$(TRUSTED_DIR) - script-dir=$(trusted-dir) - texi2html-init-file=$(trusted-dir)/lilypond-texi2html.init - top-htaccess=$(trusted-dir)/lilypond.org.htaccess - dir-htaccess=$(trusted-dir)/website-dir.htaccess - TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html - EXAMPLES=$(HOME)/media/ly-examples/ - PICTURES=$(HOME)/media/pictures -else - ### for normal git - script-dir=$(top-src-dir)/scripts/build/ - texi2html-init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init - top-htaccess=$(top-src-dir)/Documentation/web/server/lilypond.org.htaccess - dir-htaccess=$(top-src-dir)/Documentation/web/server/website-dir.htaccess - include $(config_make) - # I assume this is run from top-build-dir - EXAMPLES=Documentation/web/ly-examples/out-www/ - PICTURES=Documentation/pictures/out-www/ -endif - - -################################################################ -OUT=out-website - -### only update this when the language compiles correctly! -#WEB_LANGS = es fr nl -WEB_LANGS = es - -TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) - -EXTRACT_TEXI_FILENAMES=python $(script-dir)/extract_texi_filenames.py -CREATE_VERSION=python $(script-dir)/create-version-itexi.py -CREATE_WEBLINKS=python $(script-dir)/create-weblinks-itexi.py -MASS_LINK=python $(script-dir)/mass-link.py -WEB_POST=python $(script-dir)/website_post.py - -SERVER_FILES=$(top-src-dir)/Documentation/web/server/ - -# don't include web -MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely) -MANUALS+=$(top-src-dir)/Documentation/contributor.texi - -website-test: - echo $(TEXI2HTML) - -website-version: - mkdir -p $(OUT) - $(CREATE_VERSION) $(top-src-dir) > $(OUT)/version.itexi - $(CREATE_WEBLINKS) $(top-src-dir) > $(OUT)/weblinks.itexi - -website-xrefs: website-version - $(EXTRACT_TEXI_FILENAMES) -I $(top-src-dir)/Documentation/ \ - -I $(OUT) -o $(OUT) --split=node \ - $(top-src-dir)/Documentation/web.texi - # normal manuals - for m in $(MANUALS); do \ - b=`basename "$$m" .texi`; \ - d=`basename "$$b" .tely`; \ - $(EXTRACT_TEXI_FILENAMES) \ - -I $(top-src-dir)/Documentation/ \ - -I $(top-src-dir)/Documentation/"$$d"/ \ - -I $(OUT) -o $(OUT) "$$m" ; \ - done - # translations - for l in $(WEB_LANGS); do \ - $(EXTRACT_TEXI_FILENAMES) \ - -I $(top-src-dir)/Documentation/ \ - -I $(top-src-dir)/Documentation/"$$l" \ - -I $(OUT) -o $(OUT) --split=node \ - $(top-src-dir)/Documentation/"$$l"/web.texi ;\ - for m in $(MANUALS); do \ - n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \ - b=`basename "$$n" .texi`; \ - d=`basename "$$b" .tely`; \ - if [ -e "$$n" ] ; then \ - $(EXTRACT_TEXI_FILENAMES) \ - -I $(top-src-dir)/Documentation/ \ - -I $(top-src-dir)/Documentation/"$$l" \ - -I $(top-src-dir)/Documentation/"$$l"/"$$d"/ \ - -I $(OUT) -o $(OUT) "$$n" ; \ - fi ; \ - done; \ - done; - - - -website-texinfo: website-version website-xrefs - $(TEXI2HTML) --prefix=index \ - --split=section \ - --I=$(top-src-dir)/Documentation/ \ - --I=$(OUT) \ - --init-file=$(texi2html-init-file) \ - -D web_version \ - --output=$(OUT)/website/ \ - $(top-src-dir)/Documentation/web.texi - # translations - for l in $(WEB_LANGS); do \ - $(TEXI2HTML) --prefix=index \ - --split=section \ - --I=$(top-src-dir)/Documentation/"$$l" \ - --I=$(top-src-dir)/Documentation/ \ - --I=$(OUT) \ - --lang="$$l" \ - --init-file=$(texi2html-init-file) \ - -D web_version \ - --output=$(OUT)/"$$l" \ - $(top-src-dir)/Documentation/"$$l"/web.texi ; \ - find $(OUT)/$$l/ -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(OUT)/'$$l'/!!g' | xargs $(MASS_LINK) --prepend-suffix .$$l hard $(OUT)/$$l/ $(OUT)/website/ ; \ - done - - -website-css: - cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/ - -website-pictures: - mkdir -p $(OUT)/website/pictures/ - cp $(PICTURES)/* $(OUT)/website/pictures/ - ln -sf website/pictures $(OUT)/pictures - -website-examples: - mkdir -p $(OUT)/website/ly-examples - cp $(EXAMPLES)/* $(OUT)/website/ly-examples - -web-post: - $(WEB_POST) $(OUT)/website/ - -website: website-texinfo website-css website-pictures website-examples web-post - cp $(SERVER_FILES)/favicon.ico $(OUT)/website/ - cp $(SERVER_FILES)/robots.txt $(OUT)/website/ - cp $(top-htaccess) $(OUT)/.htaccess - cp $(dir-htaccess) $(OUT)/website/.htaccess - -