mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 19:41:09 +00:00
4097c15c96
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.
40 lines
1 KiB
Rust
40 lines
1 KiB
Rust
fn main() {
|
|
manage_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;
|
|
|
|
let path = "src";
|
|
let ignores: &[&str] = &[];
|
|
|
|
stripper_lib::loop_over_files(
|
|
path.as_ref(),
|
|
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
|
|
&ignores,
|
|
false,
|
|
);
|
|
|
|
#[cfg(feature = "embed-lgpl-docs")]
|
|
{
|
|
let docs = include_str!("../docs/gstreamer-editing-services/docs.md");
|
|
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
|
|
stripper_lib::loop_over_files(
|
|
path.as_ref(),
|
|
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
|
|
&ignores,
|
|
false,
|
|
);
|
|
}
|
|
}
|
|
|
|
#[cfg(any(
|
|
all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"),
|
|
not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
|
|
))]
|
|
fn manage_docs() {}
|