[maintainer-tools PATCH 3/5] doc: use window.onload to call WaveDrom.ProcessAll()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simplify the build by doing the WaveDrom processing from the rst file
(albeit raw html block) instead of post-processing the output html.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 Makefile               | 6 ------
 drm-intel-timeline.rst | 4 ++++
 drm-misc-timeline.rst  | 4 ++++
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 8bbabae56741..7059eec42720 100644
--- a/Makefile
+++ b/Makefile
@@ -12,15 +12,9 @@ all: drm-intel.html dim.html drm-misc.html
 %.html: %.rst
 	rst2html $< > $@
 
-# the sed bit here is a hack to make wavedrom process the timeline
 drm-intel.html: drm-intel.rst drm-intel-flow.svg drm-intel-timeline.rst drm-intel-timeline.json
-	rst2html $< > $@
-	sed -i 's/<body/<body onload="WaveDrom.ProcessAll()"/' $@
 
-# the sed bit here is a hack to make wavedrom process the timeline
 drm-misc.html: drm-misc.rst drm-misc-timeline.rst drm-misc-timeline.json drm-misc-commit-flow.svg
-	rst2html $< > $@
-	sed -i 's/<body/<body onload="WaveDrom.ProcessAll()"/' $@
 
 dim.html: dim.rst
 
diff --git a/drm-intel-timeline.rst b/drm-intel-timeline.rst
index e1766a5df98b..3ab39afd5788 100644
--- a/drm-intel-timeline.rst
+++ b/drm-intel-timeline.rst
@@ -17,6 +17,10 @@
 
 .. raw:: html
 
+	function init() {
+		WaveDrom.ProcessAll();
+	}
+	window.onload = init;
 	</script>
 	<script type="WaveDrom">
 
diff --git a/drm-misc-timeline.rst b/drm-misc-timeline.rst
index 697277774362..a9a80d6a4cfb 100644
--- a/drm-misc-timeline.rst
+++ b/drm-misc-timeline.rst
@@ -8,6 +8,10 @@
 
 .. raw:: html
 
+	function init() {
+		WaveDrom.ProcessAll();
+	}
+	window.onload = init;
 	</script>
 	<script type="text/javascript">
 	/* Embedded WaveDrom engine from http://wavedrom.com/WaveDrom.js */
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux