12.5 Website build

Start here: ‘make/website.make

The overall build system begins with How stepmake works. Summary: when you type make website this ends up running ‘GNUmakefile.in’ in the ‘git’ directory. Right at the bottom, this has the lines:

# we want this separate for security; see CG 4.2.  -gp
website:
	$(MAKE) config_make=$(config_make) \
		top-src-dir=$(top-src-dir) \
		-f $(top-src-dir)/make/website.make \
		website

On my system this expands to:

make --no-builtin-rules config_make=./config.make \
		top-src-dir=/home/phil/lilypond-git \
		-f /home/phil/lilypond-git/make/website.make \
		website

We see that the $(MAKE) expands to make --no-builtin-rules which is how MAKE is defined higher up the makefile. The -f switch defines the makefile to be used - in this case ‘git/make/website.make’. That’s where all the action happens.

We believe that note that *none* of the variables that are loaded (from depth to version numbers to whatever) are used in ‘website.make’. Instead, ‘website.make’ sets up its own variables at the top of the file. If you’re wondering if there’s some smart reason for this, then the answer is "no". It’s because I (GP) didn’t know/trust the original variables when I was writing that file.

Website build includes Building a bibliography.

Output from make -n website

Sorry, including this output directly produces problems in the build system. Please run:

make -n website &> my-file.txt

to see the full output from the make.

website.make variables

The file begins by setting up some variables. These may/might/probably mirror existing variables, but lacking any docs about those variables, I thought it would be simpler to keep everything in the same file.

Note that for security reasons, we don’t call scripts in the git dir when building on the web server. See Uploading and security. So we definitely want to keep those definitions for the WEBSITE_ONLY_BUILD.

After some split WEBSITE_ONLY_BUILD vs. normal build definitions, there’s another bunch of lines setting up generic variables.

website.make building parts

Parts of ‘website.make’:

Here’s a summary of what gets called, in what order, when we run make website

website:
  website-texinfo:
    website-version:
      creates version.itexi and weblinks.itexi
    website-xrefs:
      runs extract_texi_filenames.py
    website-bibs:
      creates bibliography files, described above
  website-css:
    copies css files
  website-pictures:
    copies pictures
  website-examples:
    copies examples
  web-post:
    runs website_post.py
  Then some file copying

LilyPond — Contributor’s Guide