File: build.rs

package info (click to toggle)
rust-gstreamer 0.14.5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,632 kB
  • sloc: makefile: 2
file content (34 lines) | stat: -rw-r--r-- 894 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
fn main() {
    manage_docs();
}

#[cfg(any(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/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(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))]
fn manage_docs() {}