From 4097c15c96d029b80965db4b01422a3d575cf6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 13 May 2020 23:39:30 +0300 Subject: [PATCH] Don't include LGPL docs in the docs if both embed-lgpl-docs and purge-lgpl-docs features are selected This makes usage of RLS/rust-analyzer on the repository much faster and less annoying as the docs don't have to be included and removed on every change. --- gstreamer-app/build.rs | 10 ++++++++-- gstreamer-audio/build.rs | 10 ++++++++-- gstreamer-base/build.rs | 10 ++++++++-- gstreamer-check/build.rs | 10 ++++++++-- gstreamer-editing-services/build.rs | 10 ++++++++-- gstreamer-gl/build.rs | 10 ++++++++-- gstreamer-net/build.rs | 10 ++++++++-- gstreamer-pbutils/build.rs | 10 ++++++++-- gstreamer-player/build.rs | 10 ++++++++-- gstreamer-rtp/build.rs | 10 ++++++++-- gstreamer-rtsp-server/build.rs | 10 ++++++++-- gstreamer-rtsp/build.rs | 10 ++++++++-- gstreamer-sdp/build.rs | 10 ++++++++-- gstreamer-video/build.rs | 10 ++++++++-- gstreamer-webrtc/build.rs | 10 ++++++++-- gstreamer/build.rs | 10 ++++++++-- 16 files changed, 128 insertions(+), 32 deletions(-) diff --git a/gstreamer-app/build.rs b/gstreamer-app/build.rs index 2f6587d82..afa26b343 100644 --- a/gstreamer-app/build.rs +++ b/gstreamer-app/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-audio/build.rs b/gstreamer-audio/build.rs index 57c16674a..1cb0a37b8 100644 --- a/gstreamer-audio/build.rs +++ b/gstreamer-audio/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-base/build.rs b/gstreamer-base/build.rs index fb86cce00..04648e155 100644 --- a/gstreamer-base/build.rs +++ b/gstreamer-base/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-check/build.rs b/gstreamer-check/build.rs index 44c6bab00..03a27dffe 100644 --- a/gstreamer-check/build.rs +++ b/gstreamer-check/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-editing-services/build.rs b/gstreamer-editing-services/build.rs index e5c0fcfe1..0151ee936 100644 --- a/gstreamer-editing-services/build.rs +++ b/gstreamer-editing-services/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-gl/build.rs b/gstreamer-gl/build.rs index becc9aa54..a6043d9dc 100644 --- a/gstreamer-gl/build.rs +++ b/gstreamer-gl/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-net/build.rs b/gstreamer-net/build.rs index 129be95ff..a4266cd57 100644 --- a/gstreamer-net/build.rs +++ b/gstreamer-net/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-pbutils/build.rs b/gstreamer-pbutils/build.rs index 91a9745e4..ed1f28b4c 100644 --- a/gstreamer-pbutils/build.rs +++ b/gstreamer-pbutils/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-player/build.rs b/gstreamer-player/build.rs index 873bf3be6..1977b33d4 100644 --- a/gstreamer-player/build.rs +++ b/gstreamer-player/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-rtp/build.rs b/gstreamer-rtp/build.rs index 4e50aebdf..d60a6e84f 100644 --- a/gstreamer-rtp/build.rs +++ b/gstreamer-rtp/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-rtsp-server/build.rs b/gstreamer-rtsp-server/build.rs index fde24fe37..0de08a739 100644 --- a/gstreamer-rtsp-server/build.rs +++ b/gstreamer-rtsp-server/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-rtsp/build.rs b/gstreamer-rtsp/build.rs index 4c9b0db5b..d8ff11a98 100644 --- a/gstreamer-rtsp/build.rs +++ b/gstreamer-rtsp/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-sdp/build.rs b/gstreamer-sdp/build.rs index b29dd5af9..b77204894 100644 --- a/gstreamer-sdp/build.rs +++ b/gstreamer-sdp/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-video/build.rs b/gstreamer-video/build.rs index d35e57b62..0cec9f2bf 100644 --- a/gstreamer-video/build.rs +++ b/gstreamer-video/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer-webrtc/build.rs b/gstreamer-webrtc/build.rs index a7a62cabe..cd0721e72 100644 --- a/gstreamer-webrtc/build.rs +++ b/gstreamer-webrtc/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {} diff --git a/gstreamer/build.rs b/gstreamer/build.rs index d229bc39b..234ee5bf8 100644 --- a/gstreamer/build.rs +++ b/gstreamer/build.rs @@ -2,7 +2,10 @@ fn main() { manage_docs(); } -#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] +#[cfg(all( + any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() { extern crate stripper_lib; use std::io; @@ -30,5 +33,8 @@ fn manage_docs() { } } -#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] +#[cfg(any( + all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"), + not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) +))] fn manage_docs() {}