Skip to content

A KBuild like build system written in Ruby DSL

Notifications You must be signed in to change notification settings

rickyzheng/rbuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RBuild - a KBuild like software configure/build system by Ruby DSL.
-------------------------------------------------------------------

-- Introduction --

Rbuild is a KBuild like configure/build system, like KBuild, RBuild provide a menu driven configure interface for target software. RBuild take 'RConfig' files as input, generate target software configuration files by RBuild plugins, for example, the 'export_c' plugin generate C/C++ header config.h and Makefiles.

A RConfig's syntax looks more like KConfig, plus lots of ruby flavors. Since RConfig file actually is a ruby script, it could be very flexiable and powerful.

-- RConfig --

All RConfig instructions falls into four catalogs:
 - organizing: 'menu', 'group'
 - configuration: 'choice', 'config'
 - property: 'title', 'default', 'help', 'range', 'depends', 'select', 'unselect' and 'property'
 - file inclusion: 'source'

A Simple RConfig example:

title "Welcom to my software config system !"
menu "Package config" do
	config :PACKAGE_A => "enable package A" 
	group "Package A options" do
		depends :PACKAGE_A
		config :PACKAGE_A_FUN_A => "function A"
		config :PACKAGE_A_FUN_B => "function B"
	end
	config :PACKAGE_B => "enable package B"
	choice :PACKAGE_B_PARAM => "select package B param" do
		depends :PACKAGE_B
		default 200
		range 100, 200, 300
	end
end
menu "RBuild Configuration" do
  group "RBuild System Options" do
    choice :RBUILD_SYS_CONFIG_FILE => "RBuild Configuration File" do
      property :no_export    # do not export this, it's for rbuild system internal.
      default 'rb.config'
    end
    
    choice :RBUILD_PLUGIN_EXP_C_HEADER_FILE => "RBuild Export File" do
      property :no_export     # do not export this, it's for rbuild system internal.
      default 'config.h'
    end
  end
end

Please have a look the RConfig file under 'example' folder, it almost explains everything about RConfig DSL.


-- Install --

1. Install Ruby interpreter (http://www.ruby-lang.org)
2. Copy 'scripts' directory into your target software package
3. Write your 'RConfig' files
4. Create a 'Rakefile' as:
      require 'scripts/rbuild'

      task :menuconfig do
        rconf = RBuild::RConfig.new 'RConfig'
        rconf.menuconfig()
      end
5. at your target software package's root dir, run:
    rake menuconfig


-- Project Home --

RBuild is hosted by SourceForge (http://www.sourceforge.net/projects/rbuild/)
RBuild's home page http://rbuild.sf.net/


-- LICENCE --

RBuild is released under GNU GPLv2.

Copy Right (c) 2008, Ricky Zheng <ricky_gz_zheng@yahoo.co.nz>



About

A KBuild like build system written in Ruby DSL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages