Permalink
Browse files

Adds Rakefile and submodulilzes auto-build-env

Submodulizes is totally a word...
  • Loading branch information...
1 parent a52b489 commit bb98f683f2e6ae7b0ef0380a7de7eb6a90462524 @cknadler cknadler committed Jan 9, 2013
Showing with 19 additions and 60 deletions.
  1. +3 −0 .gitmodules
  2. +1 −0 Gemfile
  3. +6 −2 README.md
  4. +8 −0 Rakefile
  5. +0 −58 auto-build-env
  6. +1 −0 build
View
@@ -0,0 +1,3 @@
+[submodule "build"]
+ path = build
+ url = git://github.com/cknadler/auto-build-env.git
View
@@ -1,3 +1,4 @@
source :rubygems
gem 'rcomp'
+gem 'rake'
View
@@ -10,8 +10,12 @@ To build right now:
You _should_ only have to do this once.
-`$ ./auto-build-env`
+```bash
+$ rake
+```
Then as normal:
-`$ make`
+```
+$ make
+```
View
@@ -0,0 +1,8 @@
+desc "Build Env"
+task :build_env do
+ # Pull down all submodules and then build the autotools environment
+ system('git submodule update --init --recursive')
+ system('build/auto-build-env')
+end
+
+task :default => :build_env
View
@@ -1,58 +0,0 @@
-#!/usr/bin/env ruby
-
-dependencies =
- "aclocal",
- "autoconf",
- "automake",
- "autoreconf"
-
-commands =
- "aclocal",
- "autoconf",
- "automake --add-missing",
- "autoreconf",
- "automake",
- "./configure"
-
-# ASCII text coloring
-def purpify(text)
- "\033[1;35m" + text + "\033[0m"
-end
-
-def greenify(text)
- "\033[0;32m" + text + "\033[0m"
-end
-
-def redify(text)
- "\033[0;31m" + text + "\033[0m"
-end
-
-# Check dependencies
-missing_dependencies = Array.new
-
-dependencies.each do |dependency|
- puts "#{purpify "build-env:"} #{greenify "checking #{dependency}"}"
- if not system("which #{dependency}", :out => "/dev/null")
- missing_dependencies.push dependency
- end
-end
-
-if not missing_dependencies.empty?
- puts redify "build-env failed..."
-
- missing_dependencies.each do |missing|
- puts redify "Missing #{missing}"
- end
-
- puts redify "Install the missing dependencies and run again."
- exit 1
-end
-
-# Execute build commands
-commands.each do |command|
- puts "#{purpify "build-env:"} #{greenify "#{command}"}"
- system("#{command}")
-end
-
-puts greenify "\nYour environment setup is complete. Run `make` to build your project.\n"
-
Submodule build added at ce749e

0 comments on commit bb98f68

Please sign in to comment.