Created
June 3, 2010 05:21
-
-
Save uasi/423503 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ufo b/ufo | |
index ddcfd58..9755c47 100755 | |
--- a/ufo | |
+++ b/ufo | |
@@ -11,7 +11,7 @@ elsif 'lib' !~~ :d { | |
exit; | |
} | |
-my @module-files = grep { $_ }, split "\n", qx[find lib -name \*.pm]; | |
+my @module-files = grep { $_ }, split "\n", qx[find lib -name \*.pm -or -name \*.pm6]; | |
if !@module-files | |
|| @module-files.elems == 1 && @module-files[0] ~~ /'no such file'/ { | |
@@ -35,11 +35,12 @@ for @module-files -> $module-file { | |
} | |
sub path-to-module-name($path) { | |
- $path.subst(/^'lib/'/, '').subst(/'.pm'$/, '').subst('/', '::', :g); | |
+ $path.subst(/^'lib/'/, '').subst(/\.pm6?$/, '').subst('/', '::', :g); | |
} | |
sub module-name-to-path($module-name) { | |
- 'lib/' ~ $module-name.subst('::', '/', :g) ~ '.pm'; | |
+ my $pm = 'lib/' ~ $module-name.subst('::', '/', :g) ~ '.pm'; | |
+ $pm ~~ :e ?? $pm !! $pm ~ '6'; | |
} | |
my @order; | |
@@ -87,13 +88,16 @@ $makefile.say(q[]); | |
$makefile.say($sources); | |
$makefile.say(qq[ | |
-PIRS=\$(SOURCES:.pm=.pir) | |
+PIRS=\$(patsubst %.pm6,%.pir,\$(SOURCES:.pm=.pir)) | |
all: \$(PIRS) | |
%.pir: %.pm | |
\tenv PERL6LIB=\$(PERL6LIB) \$(PERL6) --target=pir --output=\$@ \$< | |
+%.pir: %.pm6 | |
+\tenv PERL6LIB=\$(PERL6LIB) \$(PERL6) --target=pir --output=\$@ \$< | |
+ | |
clean: | |
\trm -f \$(PIRS) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment