2018-02-09 02:30:08 +00:00
|
|
|
fn main() {
|
|
|
|
manage_docs();
|
|
|
|
}
|
|
|
|
|
2020-05-13 20:39:30 +00:00
|
|
|
#[cfg(all(
|
|
|
|
any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"),
|
|
|
|
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
|
|
|
|
))]
|
2018-02-09 02:30:08 +00:00
|
|
|
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-rtsp-server/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,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-13 20:39:30 +00:00
|
|
|
#[cfg(any(
|
|
|
|
all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"),
|
|
|
|
not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
|
|
|
|
))]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn manage_docs() {}
|