summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2015-09-06 15:45:20 +0100
committerdakkar <dakkar@thenautilus.net>2015-09-06 15:45:20 +0100
commite1a2aea8742082dda9838fa1079a2f2cd780dcf8 (patch)
tree5eb138ae43233ebe3fc55153b57e4f2ab2a78543
parentdeps almost working (diff)
downloadWebCoso-p6-e1a2aea8742082dda9838fa1079a2f2cd780dcf8.tar.gz
WebCoso-p6-e1a2aea8742082dda9838fa1079a2f2cd780dcf8.tar.bz2
WebCoso-p6-e1a2aea8742082dda9838fa1079a2f2cd780dcf8.zip
now handle langs from different stages
e.g. document.it.tt and document.en.rest.txt this seems to have broken some deps-checking
-rw-r--r--lib/WebCoso.pm5
-rw-r--r--lib/WebCoso/Doc/Base.pm1
-rw-r--r--lib/WebCoso/Maker.pm1
3 files changed, 5 insertions, 2 deletions
diff --git a/lib/WebCoso.pm b/lib/WebCoso.pm
index 57818d5..a990b67 100644
--- a/lib/WebCoso.pm
+++ b/lib/WebCoso.pm
@@ -42,8 +42,9 @@ class WebCoso {
method get-files($dir,$basename,$ext,:$make=True) {
say "WebCoso($.srcdir,$.destdir,$!tmpdir)::get-files($dir,$basename,$ext,$make)";
- return self.get-src-files($dir,$basename,$ext) ||
- ( $make ?? self.get-made-files($dir,$basename,$ext) !! () );
+ my %src = self.get-src-files($dir,$basename,$ext);
+ my %made = ( $make ?? self.get-made-files($dir,$basename,$ext) !! () );
+ return flat %src,%made;
}
method put-file($dir,$basename,$lang,$ext,$contents) {
diff --git a/lib/WebCoso/Doc/Base.pm b/lib/WebCoso/Doc/Base.pm
index ab99164..6037ff9 100644
--- a/lib/WebCoso/Doc/Base.pm
+++ b/lib/WebCoso/Doc/Base.pm
@@ -30,6 +30,7 @@ class WebCoso::Doc::Base {
when 'du.xml' { return $.rst.make() }
when 'xhtml' { return $.xhtml.make() }
when 'html' { return $.html.make() }
+ default: { return () }
}
}
diff --git a/lib/WebCoso/Maker.pm b/lib/WebCoso/Maker.pm
index d5436df..86241a7 100644
--- a/lib/WebCoso/Maker.pm
+++ b/lib/WebCoso/Maker.pm
@@ -33,6 +33,7 @@ role WebCoso::Maker[$from,$to] {
my $dst = %dsts{$lang};
my @deps = %deps{$lang} // ();
say "Maker[$from,$to]($.dir/$.basename)::make lang $lang";
+ say "Maker[$from,$to]($.dir/$.basename)::make dst modified {$dst ?? $dst.modified !! 'not-there'} src modified {$src.modified}";
next if $dst and $dst.modified after
all($src.modified,@depsĀ».modified.flat);