summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-10-04 12:14:22 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-10-07 23:16:09 +0000
commitc3e859b423e948d3b3483fdaf15f4aeb167e77f1 (patch)
tree8d893f1cdf2529be3c1d5cdc5f17228ebda7af3e
parent0a7b888e8f98ccf8f942c99cf7ca2efcdbdebda9 (diff)
Add a make rule to regenerate the template diff
Change-Id: I17d27f5daadc2e9730270e3488ce7f6f3d215716 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--Makefile6
-rw-r--r--ReadMe.rst26
2 files changed, 23 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 9de7219..7d87b45 100644
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,12 @@ clean:
$Q rm -f scripts/template.html template.html
$Q echo "Remove the generated HTML (perhaps in $(HTMLDIR)) yourself"
+# For use during an update:
+.PHONY: patch
+patch: template.html planetqt/template.qt
+ $Q cp $< scripts/$< && diff -bu planetqt/template.qt scripts/$< >scripts/template.diff
+# Does not declare dependency of template.diff on prerequisites, to avoid circular dependency.
+
planetqt/template.qt planetqt/website:
$Q echo "Please see ReadMe.rst for submodule checkout instructions"; false
# The false is to stop the build dead if planetqt/ is missing.
diff --git a/ReadMe.rst b/ReadMe.rst
index 7f24c6b..e7a520e 100644
--- a/ReadMe.rst
+++ b/ReadMe.rst
@@ -88,20 +88,28 @@ The ``Makefile`` first attempts this by applying
When it fails, a partially-patched ``scripts/template.html`` should
result in a ``scripts/template.rej`` file, containing the unapplied
hunks from the patch.
+
You'll need to manually adapt the patch's modifications to produce a
-sensible ``scripts/template.html`` (see below) based on the new
+sensible ``template.html`` (see below) based on the new
``template.qt`` from Planet Qt.
-Once you have a usable ``scripts/template.html``, run::
+Once you have a usable ``template.html``, move it from ``scripts`` to
+this top-level directory and run::
+
+ $ make patch
- $ diff -bu planetqt/template.qt scripts/template.html >scripts/template.diff
+You might then want to move your working ``template.html`` to safety,
+while you check that building works; your test build shall, otherwise,
+stomp your ``template.html`` in the process of generating the one it
+uses.
+If it all works nicely, commit your updated ``scripts/template.diff``
+along with the updated ``planetqt/``.
-You might then want to move your working ``scripts/template.html`` to
-safety, while you check that building works; your test build shall,
-otherwise, stomp your ``scripts/template.html`` in the process of
-generating the one it uses. If it all works nicely, commit your
-updated ``scripts/template.diff`` along with the updated
-``planetqt/``.
+You can also use this process, manually updating ``template.html`` and
+updating the patch, to work round problems with the parts of Planet Qt
+we use.
+For example, problems in the style-sheets can be fixed by patching a
+style element into the template, after the style-sheets.
How the template works
~~~~~~~~~~~~~~~~~~~~~~