GNOME Bugzilla – Bug 769711
networkmanager-1.2.4: please make building/installation of examples optional
Last modified: 2017-02-09 17:36:51 UTC
Currently we are needing to apply some "sedding" downstream to not always build and install the examples. I have seen multiple different projects that have a "--with-examples" configure switch to allow us to enable/disable this... could this be included please Thanks a lot
(In reply to Pacho Ramos from comment #0) > Currently we are needing to apply some "sedding" downstream to not always > build and install the examples. I have seen multiple different projects that > have a "--with-examples" configure switch to allow us to enable/disable > this... could this be included please Can you please explain if you have a specific reason to disable examples? They are only few C files whose compilation time is negligible and no file gets installed AFAICS.
Well, historically we are dropping its building because they are not really needed and also were a bit prone to fail to build (like https://bugs.gentoo.org/show_bug.cgi?id=588828 ... and probably older bugs we are not remembering now as we are trying to disable them for a long long time). Also, even if the compilation time is small... why is it useful to build them if later won't be installed and (in our case) the build directory won't be available as soon as package is installed? :/ Thanks :)
If there are build failures for the examples (like the mentioned gentoo bug), then those failures should be fixed, instead disabling the build. -- obviously, if some examples have dependencies which are not available, then ./configure should be smart enough to disable the build of those examples conditionally. E.g. always building the QT examples, unless QT/moc is not available. I wouldn't reject a patch to disable them altogether. But I'd really like to see patches from gentoo to fix build failures instead.
the QT examples are never build if configure detects that QT is not available. unless building with --enable-tests, the tests/examples are not build during a regular build anymore. In this case, you still can run `make check`, which only then builds the tests and examples. if you don't want to build the tests, configure without --enable-tests (and don't run `make check`).