Skip to content

Instantly share code, notes, and snippets.

@bakkdoor
Created November 17, 2010 16:55
Show Gist options
  • Save bakkdoor/703639 to your computer and use it in GitHub Desktop.
Save bakkdoor/703639 to your computer and use it in GitHub Desktop.
Slow as hell but seems to work ... -_-
diff --git a/Rakefile b/Rakefile
index 2fd6050..c94ec50 100644
--- a/Rakefile
+++ b/Rakefile
@@ -81,13 +81,19 @@ namespace :compiler do
cmd << "--"
cmd << "--batch" if RakeFileUtils.verbose_flag == true
- source_dirs = ["lib", "lib/parser", "lib/compiler", "lib/compiler/ast",
- "lib/rbx", "lib/package", "boot"]
+ # source_dirs = ["lib", "lib/parser", "lib/compiler", "lib/compiler/ast",
+ # "lib/rbx", "lib/package", "boot"]
- source_dirs.each do |dir|
- sources = Dir.glob(_("*.fy", dir))
- sh *(cmd + sources)
+ # this is slow and absurd but it seems to work o___O
+ sources = Dir.glob(_("lib/**/*.fy"))
+ sources.each do |file|
+ sh *(cmd + [file])
end
+
+ # source_dirs.each do |dir|
+ # sources = Dir.glob(_("*.fy", dir))
+ # sh *(cmd + sources)
+ # end
end
load("boot/rbx-compiler/parser/Rakefile")
@@ -120,7 +126,7 @@ namespace :compiler do
cmd << _("lib/boot.fyc")
cmd << _("lib/compiler.fyc")
cmd << _("lib/compiler/command.fyc")
- cmd << _("boot/compile.fyc")
+ cmd << _("boot/compiler/compile.fyc")
cmd << "--"
cmd << "--batch" if RakeFileUtils.verbose_flag == true
cmd << "--output-path" << output
@@ -131,7 +137,10 @@ namespace :compiler do
source_dirs.each do |dir|
sources = Dir.glob(_(dir + "/*.fy"))
src_path = ["--source-path", _(dir.split("/").first)]
- sh *(cmd + src_path + sources)
+ sources.each do |file|
+ sh *(cmd + src_path + [file])
+ end
+ # sh *(cmd + src_path + sources)
end
mkdir_p _("parser/ext", output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment