* General build system notes::
* Doc build::
* Website build::
-* Building an Ubuntu distro::
@end menu
The variable @code{depth} is used throughout the make system to
track how far down the directory structure the make is. The first
-include sets lots of variables but doesn't "do" anything. The
-second runs the file @file{GNUmakefile.in} from the top level
-source directory.
+include sets lots of variables but doesn't "do" anything. Default
+values for these variables are automatically detected at the
+./configure step, which creates the file @file{config.make}.
+The second include runs the file @file{GNUmakefile.in} from
+the top level source directory.
This sets another load of variables, and then includes (i.e.
immediately runs) @file{stepmake.make} from the @file{make}
One little feature to notice here - these are all absolute file
locations - the line prior to this used relative locations. And
-none of these files exist, either. (Further note - I'm assuming
-all these lines of make I'm following are autogenerated, but
-that'll be something else to discover.)
+none of these files exist, either.
+
+(Further note - I'm assuming all these lines of make I'm following are
+autogenerated, but that'll be something else to discover.)
+
+JM: @emph{``No, these lines are not useful in LilyPond (this is why
+you think they are autogenerated), but they are part of StepMake,
+which was meant to be a package to be installed as a build system over
+autoconf/make in software project source trees.''}
Next in @file{stepmake.make}:
@example
$(outdir)/%.ly: %.lym4
- $(M4) $< | sed "s/\`/,/g" > $@
+ $(M4) $< | sed "s/\`/,/g" > $@@
$(outdir)/%: %.in
- rm -f $@
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ rm -f $@@
+ cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@@
@end example
I believe the first rule is for *.ly files, and has a prerequisite
stepmake/stepmake/generic-vars.make has this:
@smallexample
-LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
+LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@@ &&) true
@end smallexample
-$@ is the name of the target - WWW-1 in this case.
+$@@ is the name of the target - WWW-1 in this case.
In GNUmakefile.in we find:
(From the make manual:
-To this end, after reading in all makefiles, make will consider each as a goal target and
-attempt to update it. If a makefile has a rule which says how to update it (found either
-in that very makefile or in another one) or if an implicit rule applies to it (see Chapter 10
-[Using Implicit Rules], page 103), it will be updated if necessary. After all makefiles have
-been checked, if any have actually been changed, make starts with a clean slate and reads
-all the makefiles over again. (It will also attempt to update each of them over again, but
-normally this will not change them again, since they are already up to date.)
+To this end, after reading in all makefiles, make will consider each
+as a goal target and attempt to update it. If a makefile has a rule
+which says how to update it (found either in that very makefile or in
+another one) or if an implicit rule applies to it (see Chapter 10
+[Using Implicit Rules], page 103), it will be updated if
+necessary. After all makefiles have been checked, if any have actually
+been changed, make starts with a clean slate and reads all the
+makefiles over again. (It will also attempt to update each of them
+over again, but normally this will not change them again, since they
+are already up to date.)
So my assumption seems correct)
The file @file{lily-bib.bst} also has fairly extensive commenting.
+
@node Website build
@section Website build
@code{website.make} starts with the following:
@example
-ifeq (@$(WEBSITE_ONLY_BUILD),1)
+ifeq ($(WEBSITE_ONLY_BUILD),1)
@end example
which checks to see whether the variable @code{WEBSITE_ONLY_BUILD}
of various files. An example is:
@example
-CREATE_VERSION=python @$(script-dir)/create-version-itexi.py
+CREATE_VERSION=python $(script-dir)/create-version-itexi.py
@end example
The rule for website is:
@smallexample
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
+ 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
@end smallexample
so we see that this starts by running the rules for 5 other
@example
website-texinfo: website-version website-xrefs website-bibs
- for l in '' @$(WEB_LANGS); do \
- if test -n "@$@$l"; then \
- langopt=--lang="@$@$l"; \
- langsuf=.@$@$l; \
+ for l in '' $(WEB_LANGS); do \
+ if test -n "$$l"; then \
+ langopt=--lang="$$l"; \
+ langsuf=.$$l; \
fi; \
- @$(TEXI2HTML) --prefix=index \
+ $(TEXI2HTML) --prefix=index \
--split=section \
- --I=@$(top-src-dir)/Documentation/"@$@$l" \
- --I=@$(top-src-dir)/Documentation \
- --I=@$(OUT) \
- @$@$langopt \
- --init-file=@$(texi2html-init-file) \
+ --I=$(top-src-dir)/Documentation/"$$l" \
+ --I=$(top-src-dir)/Documentation \
+ --I=$(OUT) \
+ $$langopt \
+ --init-file=$(texi2html-init-file) \
-D web_version \
- --output=@$(OUT)/"@$@$l" \
- @$(top-src-dir)/Documentation/"@$@$l"/web.texi ; \
- ls @$(OUT)/@$@$l/*.html | xargs grep -L \
+ --output=$(OUT)/"$$l" \
+ $(top-src-dir)/Documentation/"$$l"/web.texi ; \
+ ls $(OUT)/$$l/*.html | xargs grep -L \
'UNTRANSLATED NODE: IGNORE ME' | \
- sed 's!@$(OUT)/'@$@$l'/!!g' | xargs \
- @$(MASS_LINK) --prepend-suffix="@$@$langsuf" \
- hard @$(OUT)/@$@$l/ @$(OUT)/website/ ; \
+ sed 's!$(OUT)/'$$l'/!!g' | xargs \
+ $(MASS_LINK) --prepend-suffix="$$langsuf" \
+ hard $(OUT)/$$l/ $(OUT)/website/ ; \
done
@end example
@example
website-version:
- mkdir -p @$(OUT)
- @$(CREATE_VERSION) @$(top-src-dir) > @$(OUT)/version.itexi
- @$(CREATE_WEBLINKS) @$(top-src-dir) > @$(OUT)/weblinks.itexi
+ mkdir -p $(OUT)
+ $(CREATE_VERSION) $(top-src-dir) > $(OUT)/version.itexi
+ $(CREATE_WEBLINKS) $(top-src-dir) > $(OUT)/weblinks.itexi
@end example
which translates as:
@example
@@macro manualStableGlossaryPdf
-@@uref{../doc/v2.14/Documentation/music-glossary.pdf,Music glossary.pdf}
+@@uref@{../doc/v2.14/Documentation/music-glossary.pdf,Music glossary.pdf@}
@@end macro.
@end example
@example
website-xrefs: website-version
- for l in '' @$(WEB_LANGS); do \
+ for l in '' $(WEB_LANGS); do \
@end example
is the start of the rule, truncated for brevity. This loops
@smallexample
python /home/phil/lilypond-git/scripts/build/extract_texi_filenames.py \
-I /home/phil/lilypond-git/Documentation \
- -I /home/phil/lilypond-git/Documentation/"@$l" \
+ -I /home/phil/lilypond-git/Documentation/"$l" \
-I out-website -o out-website --split=node \
--known-missing-files= \
/home/phil/lilypond-git/scripts/build/website-known-missing-files.txt \
-q \
- /home/phil/lilypond-git/Documentation/"@$l"/web.texi ;\
+ /home/phil/lilypond-git/Documentation/"$l"/web.texi ;\
@end smallexample
There's a good description of what
It then does this:
@example
-for m in @$(MANUALS); do \
+for m in $(MANUALS); do \
@end example
to run @code{e-t-f.py} against all of the manuals, in each
@example
website-bibs: website-version
- 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 \
+ $(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
@end example
This is half the command. It runs @code{bib2texi.py} on 2
Next the commands in the @code{website-texinfo} rule are run:
@example
-for l in '' @$(WEB_LANGS); do \
+for l in '' $(WEB_LANGS); do \
@end example
run @code{texi2html}. This is the program that outputs the
@example
website-css:
- cp @$(top-src-dir)/Documentation/css/*.css @$(OUT)/website
+ cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website
@end example
Copies 3 css files to out-website/website. Then:
@example
website-pictures:
- mkdir -p @$(OUT)/website/pictures
- if [ -d @$(PICTURES) ]; \
+ mkdir -p $(OUT)/website/pictures
+ if [ -d $(PICTURES) ]; \
then \
- cp @$(PICTURES)/* @$(OUT)/website/pictures ; \
- ln -sf website/pictures @$(OUT)/pictures ;\
+ cp $(PICTURES)/* $(OUT)/website/pictures ; \
+ ln -sf website/pictures $(OUT)/pictures ;\
fi
@end example
@example
website-examples:
- mkdir -p @$(OUT)/website/ly-examples
- if [ -d @$(EXAMPLES) ]; \
+ mkdir -p $(OUT)/website/ly-examples
+ if [ -d $(EXAMPLES) ]; \
then \
- cp @$(EXAMPLES)/* @$(OUT)/website/ly-examples ; \
+ cp $(EXAMPLES)/* $(OUT)/website/ly-examples ; \
fi
@end example
@example
web-post:
- @$(WEB_POST) @$(OUT)/website
+ $(WEB_POST) $(OUT)/website
@end example
which is:
are:
@example
-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
+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
@end example
The first translates as:
runs website_post.py
Then some file copying
@end example
-
-@node Building an Ubuntu distro
-@section Building an Ubuntu distro
-
-
-Here's the short instruction on how to create lilybuntu iso image
-(Jonathan Kulp did this on a spare drive,
-but he supposes it can be done in a VM too):
-
-@enumerate
-
-@item
-Install ubuntu, reboot.
-@item
-Run all updates, reboot if asked.
-@item
-Enable src repos, refresh package lists.
-@item
-Install LilyPond build deps:
-@example
-sudo apt-get build-dep lilypond
-@end example
-@item
-Install git and autoconf:
-@example
-sudo apt-get install git-core gitk autoconf
-@end example
-
-@item
-Test to see whether everything works fine now:
-@enumerate
-@item
-use @command{lily-git.tcl} to grab source files
-@item
-go to source dir and do
-@example
-"./autogen.sh" ; make ; make doc
-@end example
-@item
-if all compiles, move on to iso creation...
-@end enumerate
-
-@item
-Download & install "remastersys":
-@uref{http://sourceforge.net/projects/remastersys/, http://sourceforge.net/projects/remastersys/}
-@item
-Copy @command{lily-git.tcl} script file into @file{/etc/skel/}.
-@item
-Modify @file{/etc/remastersys.conf} as desired (change @code{.iso} name,
-default live session username, etc).
-@item
-Remove non-essential desktop software as desired.
-@item
-Create iso:
-@example
-sudo remastersys dist
-@end example
-New iso is in @file{/home/remastersys/remastersys/}.
-@item
-Test iso by installing in VM and repeating steps above for
-getting source files and building lp and docs.
-
-@end enumerate