GNOME Bugzilla – Bug 88746
Tutorial makefile is dial-up unfriendly
Last modified: 2004-12-22 21:47:04 UTC
docs/tutorial/Makefile.am is unfriendly towards dial-up users. xsltproc will download a large file from the Docbook website in order to generate the tuturial. The attached patch makes the Makefile check for an environment variable pointing to the location of the stylesheet to use.
Created attachment 9994 [details] [review] Patch for docs/tutotial/Makefile.am
Is this a standard way to get the local stylesheet? A libxml/xsl way? What does ?= mean?
I couldn't figure a standard way of finding where the stylesheets are. xsltproc wants a path or a URL, there doesn't seem to be a way of telling it "I want the stylesheet that converts Docbook into HTML with pink background". Reading the docs, you can tell it where your DTDs are and where your stylesheets are, but that's it. There's also no docbook-xsl2html or something like that. And there doesn't seem to be a way of finding out where the stylesheet is. My catalog files (/etc/sgml/catalog on my system) doesn't list this chunk.xsl either. Given that no truly generic interface seems to exist, I opted for using an environment varialbe with what I considered to be a sensible name. Someone with a clue regarding XSLT might be helpful here. ?= in the makefile sets the variable only if it doesn't have a value already. This makes it possible to use variables from the environment ("make FOO=bar" overrides FOO in the Makefile but "export FOO=bar; make" doesn't). IOW, I'm just setting a default value which can be overriden from the environment.
Applied. Thanks.