LudovicRousseau / PCSC

pcsc-lite: PC/SC implementation
https://pcsclite.apdu.fr/
Other
268 stars 109 forks source link

Meson is missing the creation of doxygen.conf #182

Closed Jakuje closed 6 months ago

Jakuje commented 6 months ago

When building the latest version 2.2.0 with meson, I do not get doxygen.conf generated from doxygen.conf.in causing Fedora build to fail as we use that one to gerenate doc supbackage.

It should be just matter of passing it to configure_file (maybe under the conditional for generating separate docs?). Something like this works already:

diff --git a/meson.build b/meson.build
index ab23b161..373e32a3 100644
--- a/meson.build
+++ b/meson.build
@@ -251,6 +251,9 @@ configure_file(output : 'pcscd.8',
   input : 'doc/pcscd.8.in',
   install_dir : join_paths(get_option('mandir'), 'man8'),
   configuration : confgen_data)
+configure_file(output : 'doxygen.conf',
+  input : 'doc/doxygen.conf.in',
+  configuration : confgen_data)
 if get_option('serial')
 configure_file(output : 'reader.conf.5',
   input : 'doc/reader.conf.5.in',

Its question if it makes sense to keep it like this or we want to allow building the docs in some more standard way than calling doxygen from spec file directly.

LudovicRousseau commented 6 months ago

Exact.

Generating the doxygen.conf file will not be enough. I generate the documentation using make doxygen and this will not work with meson.

What "more standard way" are you thinking about?

Jakuje commented 6 months ago

This would be enough for the way how we do it in Fedora package now as we run doxygen directly during build:

https://src.fedoraproject.org/rpms/pcsc-lite/blob/rawhide/f/pcsc-lite.spec#_104

By standard way I meant checking the doxygen presence in meson and creating the API docs as part of meson build, by default or with specific target.

LudovicRousseau commented 6 months ago

Done in https://github.com/LudovicRousseau/PCSC/commit/a217c5c52d6568c997c351ad3d8633e8aa4a2ec2

Do you think meson should also install the documentation? If yes where?

Jakuje commented 6 months ago

Thanks! The change looks good to me.

Regarding to the installation, the fedora package pushes them into /usr/share/doc/pcsc-lite-doc/api, which is basically what the build system passes to meson as --datadir + /doc/ + package name, so I would consider this distribution dependent and not install it (Fedora macro %doc copies the files from build root to the proper location).

https://koji.fedoraproject.org/koji/rpminfo?rpmID=37946302

LudovicRousseau commented 6 months ago

I did not know the pcsc-lite-doc fedora package.

On my side. I generate the documentation to populate the web site https://pcsclite.apdu.fr/api/