X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=make%2Fwebsite.make;h=62ca4b803d71f74d40d5a68c1db593c7428f1903;hb=2f320e9722ec20d6f13ec567d007763cc912c5da;hp=2928f53b064d10e00def3dc263faf5606c978a7e;hpb=a82dc4a0cca57f285e818f6c227c8428a3c02a71;p=lilypond.git diff --git a/make/website.make b/make/website.make index 2928f53b06..62ca4b803d 100644 --- a/make/website.make +++ b/make/website.make @@ -4,6 +4,7 @@ ################################################################ ##### SECURITY -- check these values for lilypond.org ######### ################################################################ + ifeq ($(WEBSITE_ONLY_BUILD),1) ### for lilypond.org TOP_SRC_DIR=$(HOME)/lilypond/lilypond-git @@ -16,27 +17,47 @@ ifeq ($(WEBSITE_ONLY_BUILD),1) 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 + EXAMPLES=$(HOME)/lilypond/media/ly-examples + PICTURES=$(HOME)/lilypond/media/pictures else ### for normal git - script-dir=$(top-src-dir)/scripts/build/ + 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/ + EXAMPLES=Documentation/web/ly-examples/out-www + PICTURES=Documentation/pictures/out-www +endif + +################################################################ +#The 4 lines below present an option to force make website to run +# quietly only when it is run as make -s website. However, we've +# decided not to use this switch, and run the scripts quietly all +# the time +################################################################ +#quiet-run = $(findstring s, $(MAKEFLAGS)) +#ifeq ($(quiet-run),s) +# quiet-flag=-q +#endif + +#Nothing clever here - just allows the use of a boolean to control +# quiet running +quiet-run = true +ifeq ($(quiet-run),true) + quiet-flag=-q endif + ################################################################ OUT=out-website ### only update this when the language compiles correctly! -# LANGUAGES = (site, de, es, fr, hu, it, ja, nl) -WEB_LANGS = es fr it nl de +# LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh) +#WEB_LANGS = de es fr hu it ja nl zh cs +WEB_LANGS = cs de es fr hu it ja nl zh TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) @@ -47,7 +68,7 @@ MASS_LINK=python $(script-dir)/mass-link.py WEB_POST=python $(script-dir)/website_post.py WEB_BIBS=python $(script-dir)/bib2texi.py -SERVER_FILES=$(top-src-dir)/Documentation/web/server/ +SERVER_FILES=$(top-src-dir)/Documentation/web/server # don't include web MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely) @@ -63,10 +84,17 @@ website-version: website-xrefs: website-version for l in '' $(WEB_LANGS); do \ + len="$${#l}" ; \ + r="$$l"; \ + if [ "$$len" -gt "0" ] ; then \ + r="$$r"/; \ + fi ; \ $(EXTRACT_TEXI_FILENAMES) \ - -I $(top-src-dir)/Documentation/ \ + -I $(top-src-dir)/Documentation \ -I $(top-src-dir)/Documentation/"$$l" \ -I $(OUT) -o $(OUT) --split=node \ + --known-missing-files=$(top-src-dir)/scripts/build/website-known-missing-files.txt \ + $(quiet-flag) \ $(top-src-dir)/Documentation/"$$l"/web.texi ;\ for m in $(MANUALS); do \ n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \ @@ -74,22 +102,28 @@ website-xrefs: website-version d=`basename "$$b" .tely`; \ if [ -e "$$n" ] ; then \ $(EXTRACT_TEXI_FILENAMES) \ - -I $(top-src-dir)/Documentation/ \ + -I $(top-src-dir)/Documentation \ -I $(top-src-dir)/Documentation/"$$l" \ - -I $(top-src-dir)/Documentation/"$$l"/"$$d"/ \ + -I $(top-src-dir)/Documentation/"$$r""$$d" \ + --known-missing-files=$(top-src-dir)/scripts/build/website-known-missing-files.txt \ + $(quiet-flag) \ -I $(OUT) -o $(OUT) "$$n" ; \ fi ; \ done; \ done; website-bibs: website-version - BSTINPUTS=$(top-src-dir)/Documentation/web/ \ + BSTINPUTS=$(top-src-dir)/Documentation/web \ $(WEB_BIBS) -s web \ + -s $(top-src-dir)/Documentation/lily-bib \ -o $(OUT)/others-did.itexi \ + $(quiet-flag) \ $(top-src-dir)/Documentation/web/others-did.bib - BSTINPUTS=$(top-src-dir)/Documentation/web/ \ + BSTINPUTS=$(top-src-dir)/Documentation/web \ $(WEB_BIBS) -s web \ + -s $(top-src-dir)/Documentation/lily-bib \ -o $(OUT)/we-wrote.itexi \ + $(quiet-flag) \ $(top-src-dir)/Documentation/web/we-wrote.bib @@ -102,7 +136,7 @@ website-texinfo: website-version website-xrefs website-bibs $(TEXI2HTML) --prefix=index \ --split=section \ --I=$(top-src-dir)/Documentation/"$$l" \ - --I=$(top-src-dir)/Documentation/ \ + --I=$(top-src-dir)/Documentation \ --I=$(OUT) \ $$langopt \ --init-file=$(texi2html-init-file) \ @@ -114,23 +148,29 @@ website-texinfo: website-version website-xrefs website-bibs website-css: - cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/ + 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 + mkdir -p $(OUT)/website/pictures + if [ -d $(PICTURES) ]; \ + then \ + cp $(PICTURES)/* $(OUT)/website/pictures ; \ + ln -sf website/pictures $(OUT)/pictures ;\ + fi website-examples: mkdir -p $(OUT)/website/ly-examples - cp $(EXAMPLES)/* $(OUT)/website/ly-examples + if [ -d $(EXAMPLES) ]; \ + then \ + cp $(EXAMPLES)/* $(OUT)/website/ly-examples ; \ + fi web-post: - $(WEB_POST) $(OUT)/website/ + $(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 $(SERVER_FILES)/favicon.ico $(OUT)/website + cp $(SERVER_FILES)/robots.txt $(OUT)/website cp $(top-htaccess) $(OUT)/.htaccess cp $(dir-htaccess) $(OUT)/website/.htaccess