Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] gtkdoc: Remove the build_by_default hack
@ 2018-03-06 14:21 Daniel Vetter
  2018-03-06 15:00 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Daniel Vetter @ 2018-03-06 14:21 UTC (permalink / raw)
  To: IGT development; +Cc: Daniel Vetter

meson 0.45 properly supports generated content_files. Except for the
minor issue that we're hitting an internal bug in meson. I've made a
pull request for that, but this needs more work:

https://github.com/mesonbuild/meson/pull/3189

Downside of this all is that we'd need to up the meson requirements to
something like 0.46, at least if you want to build the docs.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 docs/reference/intel-gpu-tools/meson.build | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/reference/intel-gpu-tools/meson.build b/docs/reference/intel-gpu-tools/meson.build
index 1c009229aae2..5f6646eb8fa2 100644
--- a/docs/reference/intel-gpu-tools/meson.build
+++ b/docs/reference/intel-gpu-tools/meson.build
@@ -50,17 +50,17 @@ gen_programs = find_program('generate_programs_xml.sh')
 
 test_list_files = []
 
+generated_docs = []
+
 foreach group : test_groups
 	programs_xml = 'igt_test_programs_' + group + '_programs.xml'
-	custom_target(programs_xml,
+	generated_docs += custom_target(programs_xml,
 		      output : programs_xml,
-		      build_by_default : true,
 		      command : [ gen_programs, '@OUTPUT@', group, test_list ])
 
 	description_xml = 'igt_test_programs_' + group + '_description.xml'
-	custom_target(description_xml,
+	generated_docs += custom_target(description_xml,
 		      output : description_xml,
-		      build_by_default : true,
 		      depends : test_executables,
 		      command : [ gen_description, '@OUTPUT@', group, test_list ])
 endforeach
@@ -70,7 +70,7 @@ configure_file(input: 'version.xml.in',
 	       install: false, configuration: config)
 
 gnome.gtkdoc('intel-gpu-tools',
-	     content_files : ['igt_test_programs.xml'],
+	     content_files : ['igt_test_programs.xml'] + generated_docs,
 	     dependencies : lib_igt,
 	     install : true,
 	     main_xml : 'intel-gpu-tools-docs.xml',
-- 
2.15.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t] gtkdoc: Remove the build_by_default hack
@ 2018-06-18 15:49 Daniel Vetter
  2018-06-18 15:56 ` Daniel Vetter
  0 siblings, 1 reply; 16+ messages in thread
From: Daniel Vetter @ 2018-06-18 15:49 UTC (permalink / raw)
  To: IGT development; +Cc: Daniel Vetter

meson 0.45 properly supports generated content_files. Except for the
minor issue that we're hitting an internal bug in meson. I've made a
pull request for that

https://github.com/mesonbuild/meson/pull/3189

which has now been addressed in

commit c1f275bfa644beafab9f8572351d4b64d61c148b
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Sun May 6 20:09:49 2018 +0530

    gnome.gtkdoc: Allow passing file objects as xml_files

    If we pass a source files() object, we will look for it in the build
    directory, which is wrong. If we pass a build files() object (from
    configure_file()), we will find it in the build directory, and then
    try to copy it on top of itself in gtkdochelper.py getting a
    SameFileError.

    Add a test for it, and also properly iterate custom target outputs
    when adding to content files.

Downside of this all is that we'd need to up the meson requirements to
something like 0.47, which isn't even released yet :-/

v2: Rebase and also add version requirement.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 docs/reference/igt-gpu-tools/meson.build | 10 +++++-----
 meson.build                              |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/docs/reference/igt-gpu-tools/meson.build b/docs/reference/igt-gpu-tools/meson.build
index aadb9af593d9..4f33c973a343 100644
--- a/docs/reference/igt-gpu-tools/meson.build
+++ b/docs/reference/igt-gpu-tools/meson.build
@@ -50,17 +50,17 @@ gen_programs = find_program('generate_programs_xml.sh')
 
 test_list_files = []
 
+generated_docs = []
+
 foreach group : test_groups
 	programs_xml = 'igt_test_programs_' + group + '_programs.xml'
-	custom_target(programs_xml,
+	generated_docs += custom_target(programs_xml,
 		      output : programs_xml,
-		      build_by_default : true,
 		      command : [ gen_programs, '@OUTPUT@', group, test_list ])
 
 	description_xml = 'igt_test_programs_' + group + '_description.xml'
-	custom_target(description_xml,
+	generated_docs += custom_target(description_xml,
 		      output : description_xml,
-		      build_by_default : true,
 		      depends : test_executables,
 		      command : [ gen_description, '@OUTPUT@', group, test_list ])
 endforeach
@@ -70,7 +70,7 @@ configure_file(input: 'version.xml.in',
 	       install: false, configuration: config)
 
 gnome.gtkdoc('igt-gpu-tools',
-	     content_files : ['igt_test_programs.xml'],
+	     content_files : ['igt_test_programs.xml'] + generated_docs,
 	     dependencies : lib_igt,
 	     install : true,
 	     main_xml : 'igt-gpu-tools-docs.xml',
diff --git a/meson.build b/meson.build
index cd736d8e232a..1e7b37bfa406 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@ project('igt-gpu-tools', 'c',
           'c_std=gnu99',
         ],
 	license : 'MIT',
-	meson_version : '>0.40.0')
+	meson_version : '>0.47')
 
 cc = meson.get_compiler('c')
 
-- 
2.17.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t] gtkdoc: Remove the build_by_default hack
@ 2018-06-19  6:41 Daniel Vetter
  0 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2018-06-19  6:41 UTC (permalink / raw)
  To: IGT development; +Cc: Daniel Vetter

meson 0.45 properly supports generated content_files. Except for the
minor issue that we're hitting an internal bug in meson. I've made a
pull request for that

https://github.com/mesonbuild/meson/pull/3189

which has now been addressed in

commit c1f275bfa644beafab9f8572351d4b64d61c148b
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Sun May 6 20:09:49 2018 +0530

    gnome.gtkdoc: Allow passing file objects as xml_files

    If we pass a source files() object, we will look for it in the build
    directory, which is wrong. If we pass a build files() object (from
    configure_file()), we will find it in the build directory, and then
    try to copy it on top of itself in gtkdochelper.py getting a
    SameFileError.

    Add a test for it, and also properly iterate custom target outputs
    when adding to content files.

Downside of this all is that we'd need to up the meson requirements to
something like 0.47, which isn't even released yet :-/

v2: Rebase and also add version requirement.

v3: I figured out how to make this work with a meson version check!

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 docs/reference/igt-gpu-tools/meson.build | 49 ++++++++++++++++--------
 meson.build                              |  2 +-
 2 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/docs/reference/igt-gpu-tools/meson.build b/docs/reference/igt-gpu-tools/meson.build
index aadb9af593d9..ebcb6b7a4874 100644
--- a/docs/reference/igt-gpu-tools/meson.build
+++ b/docs/reference/igt-gpu-tools/meson.build
@@ -50,27 +50,46 @@ gen_programs = find_program('generate_programs_xml.sh')
 
 test_list_files = []
 
-foreach group : test_groups
-	programs_xml = 'igt_test_programs_' + group + '_programs.xml'
-	custom_target(programs_xml,
-		      output : programs_xml,
-		      build_by_default : true,
-		      command : [ gen_programs, '@OUTPUT@', group, test_list ])
-
-	description_xml = 'igt_test_programs_' + group + '_description.xml'
-	custom_target(description_xml,
-		      output : description_xml,
-		      build_by_default : true,
-		      depends : test_executables,
-		      command : [ gen_description, '@OUTPUT@', group, test_list ])
-endforeach
+generated_docs = []
 
 configure_file(input: 'version.xml.in',
 	       output: 'version.xml',
 	       install: false, configuration: config)
 
+if meson.version().version_compare('>= 0.47')
+	foreach group : test_groups
+		programs_xml = 'igt_test_programs_' + group + '_programs.xml'
+		generated_docs += custom_target(programs_xml,
+			      output : programs_xml,
+			      command : [ gen_programs, '@OUTPUT@', group, test_list ])
+
+		description_xml = 'igt_test_programs_' + group + '_description.xml'
+		generated_docs += custom_target(description_xml,
+			      output : description_xml,
+			      depends : test_executables,
+			      command : [ gen_description, '@OUTPUT@', group, test_list ])
+	endforeach
+else
+	# older meson needs the build_by_default hack because gtkdoc dependency
+	# handling is broken
+	foreach group : test_groups
+		programs_xml = 'igt_test_programs_' + group + '_programs.xml'
+		custom_target(programs_xml,
+			      build_by_default : true,
+			      output : programs_xml,
+			      command : [ gen_programs, '@OUTPUT@', group, test_list ])
+
+		description_xml = 'igt_test_programs_' + group + '_description.xml'
+		custom_target(description_xml,
+			      build_by_default : true,
+			      output : description_xml,
+			      depends : test_executables,
+			      command : [ gen_description, '@OUTPUT@', group, test_list ])
+	endforeach
+endif
+
 gnome.gtkdoc('igt-gpu-tools',
-	     content_files : ['igt_test_programs.xml'],
+	     content_files : ['igt_test_programs.xml'] + generated_docs,
 	     dependencies : lib_igt,
 	     install : true,
 	     main_xml : 'igt-gpu-tools-docs.xml',
diff --git a/meson.build b/meson.build
index cd736d8e232a..0509a8f88799 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@ project('igt-gpu-tools', 'c',
           'c_std=gnu99',
         ],
 	license : 'MIT',
-	meson_version : '>0.40.0')
+	meson_version : '>0.40')
 
 cc = meson.get_compiler('c')
 
-- 
2.17.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [igt-dev] [PATCH i-g-t] gtkdoc: Remove the build_by_default hack
@ 2018-06-19  6:47 Daniel Vetter
  2018-06-20  9:59 ` Petri Latvala
  0 siblings, 1 reply; 16+ messages in thread
From: Daniel Vetter @ 2018-06-19  6:47 UTC (permalink / raw)
  To: IGT development; +Cc: Daniel Vetter

meson 0.45 properly supports generated content_files. Except for the
minor issue that we're hitting an internal bug in meson. I've made a
pull request for that

https://github.com/mesonbuild/meson/pull/3189

which has now been addressed in

commit c1f275bfa644beafab9f8572351d4b64d61c148b
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Sun May 6 20:09:49 2018 +0530

    gnome.gtkdoc: Allow passing file objects as xml_files

    If we pass a source files() object, we will look for it in the build
    directory, which is wrong. If we pass a build files() object (from
    configure_file()), we will find it in the build directory, and then
    try to copy it on top of itself in gtkdochelper.py getting a
    SameFileError.

    Add a test for it, and also properly iterate custom target outputs
    when adding to content files.

Downside of this all is that we'd need to up the meson requirements to
something like 0.47, which isn't even released yet :-/

v2: Rebase and also add version requirement.

v3: I figured out how to make this work with a meson version check!

v4: Remove stray hunk (Petri).

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 docs/reference/igt-gpu-tools/meson.build | 49 ++++++++++++++++--------
 1 file changed, 34 insertions(+), 15 deletions(-)

diff --git a/docs/reference/igt-gpu-tools/meson.build b/docs/reference/igt-gpu-tools/meson.build
index aadb9af593d9..ebcb6b7a4874 100644
--- a/docs/reference/igt-gpu-tools/meson.build
+++ b/docs/reference/igt-gpu-tools/meson.build
@@ -50,27 +50,46 @@ gen_programs = find_program('generate_programs_xml.sh')
 
 test_list_files = []
 
-foreach group : test_groups
-	programs_xml = 'igt_test_programs_' + group + '_programs.xml'
-	custom_target(programs_xml,
-		      output : programs_xml,
-		      build_by_default : true,
-		      command : [ gen_programs, '@OUTPUT@', group, test_list ])
-
-	description_xml = 'igt_test_programs_' + group + '_description.xml'
-	custom_target(description_xml,
-		      output : description_xml,
-		      build_by_default : true,
-		      depends : test_executables,
-		      command : [ gen_description, '@OUTPUT@', group, test_list ])
-endforeach
+generated_docs = []
 
 configure_file(input: 'version.xml.in',
 	       output: 'version.xml',
 	       install: false, configuration: config)
 
+if meson.version().version_compare('>= 0.47')
+	foreach group : test_groups
+		programs_xml = 'igt_test_programs_' + group + '_programs.xml'
+		generated_docs += custom_target(programs_xml,
+			      output : programs_xml,
+			      command : [ gen_programs, '@OUTPUT@', group, test_list ])
+
+		description_xml = 'igt_test_programs_' + group + '_description.xml'
+		generated_docs += custom_target(description_xml,
+			      output : description_xml,
+			      depends : test_executables,
+			      command : [ gen_description, '@OUTPUT@', group, test_list ])
+	endforeach
+else
+	# older meson needs the build_by_default hack because gtkdoc dependency
+	# handling is broken
+	foreach group : test_groups
+		programs_xml = 'igt_test_programs_' + group + '_programs.xml'
+		custom_target(programs_xml,
+			      build_by_default : true,
+			      output : programs_xml,
+			      command : [ gen_programs, '@OUTPUT@', group, test_list ])
+
+		description_xml = 'igt_test_programs_' + group + '_description.xml'
+		custom_target(description_xml,
+			      build_by_default : true,
+			      output : description_xml,
+			      depends : test_executables,
+			      command : [ gen_description, '@OUTPUT@', group, test_list ])
+	endforeach
+endif
+
 gnome.gtkdoc('igt-gpu-tools',
-	     content_files : ['igt_test_programs.xml'],
+	     content_files : ['igt_test_programs.xml'] + generated_docs,
 	     dependencies : lib_igt,
 	     install : true,
 	     main_xml : 'igt-gpu-tools-docs.xml',
-- 
2.17.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-06-20  9:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-06 14:21 [igt-dev] [PATCH i-g-t] gtkdoc: Remove the build_by_default hack Daniel Vetter
2018-03-06 15:00 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-03-06 20:03 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-04-04 18:39 ` [igt-dev] [PATCH i-g-t] " Eric Anholt
2018-04-05  6:22   ` Daniel Vetter
2018-04-05  8:35     ` Petri Latvala
2018-04-05  9:18       ` Daniel Vetter
2018-04-05  9:28       ` Jani Nikula
2018-06-04 21:07     ` Eric Anholt
2018-06-18 15:49       ` Daniel Vetter
2018-06-18 16:43         ` Eric Anholt
  -- strict thread matches above, loose matches on Subject: below --
2018-06-18 15:49 Daniel Vetter
2018-06-18 15:56 ` Daniel Vetter
2018-06-19  6:41 Daniel Vetter
2018-06-19  6:47 Daniel Vetter
2018-06-20  9:59 ` Petri Latvala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox