Workshop o mikrokontrolérech na SKSP 2024.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
757 B

# UCW Library configuration system: documentation requirements
# (c) 2008 Michal Vaner <vorner@ucw.cz>
package UCW::Configure::Doc;
use UCW::Configure;
use strict;
use warnings;
if (!IsGiven("CONFIG_DOC") || IsSet("CONFIG_DOC")) {
Test("HAVE_ASCII_DOC", "Checking for AsciiDoc", sub {
my $version = `asciidoc --version 2>&1`;
return "none" if !defined $version || $version eq "";
my( $vnum ) = $version =~ / (\d+\.\S*)$/;
return $vnum;
});
my( $major ) = Get("HAVE_ASCII_DOC") =~ /^(\d+)/;
if (defined $major && $major >= 7) {
Set("CONFIG_DOC");
} else {
if (IsGiven("CONFIG_DOC")) {
Fail("Need asciidoc >= 7\n");
} else {
Warn("Need asciidoc >= 7 to build documentation\n");
UnSet("CONFIG_DOC");
}
}
}
# We succeeded
1;