[Groonga-commit] groonga/groonga [master] [package][windows] support debug build.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 6月 28日 (火) 10:05:01 JST


Kouhei Sutou	2011-06-28 01:05:01 +0000 (Tue, 28 Jun 2011)

  New Revision: 054b66cfcc15bfb37f6c607a690d764d0e5a6b36

  Log:
    [package][windows] support debug build.

  Modified files:
    packages/windows/Makefile.am
    packages/windows/Rakefile

  Modified: packages/windows/Makefile.am (+7 -2)
===================================================================
--- packages/windows/Makefile.am    2011-06-28 00:54:21 +0000 (dce5ad5)
+++ packages/windows/Makefile.am    2011-06-28 01:05:01 +0000 (fc8d1ea)
@@ -17,11 +17,16 @@ download: ensure-rsync-path
 upload: ensure-rsync-path
 	rsync -avz --delete files/ $(RSYNC_PATH)/windows/groonga
 
+build_options =					\
+	VERSION=$(VERSION)			\
+	SOURCE=$(SOURCE)			\
+	DEBUG_BUILD=$(DEBUG_BUILD)
+
 build: source
-	$(RUBY) -S rake build VERSION=$(VERSION) SOURCE=$(SOURCE)
+	$(RUBY) -S rake build $(build_options)
 
 build-groonga: source
-	$(RUBY) -S rake build:groonga VERSION=$(VERSION) SOURCE=$(SOURCE)
+	$(RUBY) -S rake build:groonga $(build_options)
 
 SOURCE=../$(PACKAGE)-$(VERSION).tar.gz
 

  Modified: packages/windows/Rakefile (+11 -8)
===================================================================
--- packages/windows/Rakefile    2011-06-28 00:54:21 +0000 (984b028)
+++ packages/windows/Rakefile    2011-06-28 01:05:01 +0000 (4d4c925)
@@ -22,6 +22,8 @@ base_dir = Pathname.new(__FILE__).dirname
 groonga_win32_i386_p = ENV["GROONGA32"] == "yes"
 groonga_version = ENV["VERSION"]
 groonga_source = Pathname.new(ENV["SOURCE"]).expand_path
+debug_build_p = ENV["DEBUG_BUILD"] == "yes"
+debug_flags = ["CFLAGS=-ggdb3 -O0", "CXXFLAGS=-ggdb3 -O0"]
 
 dist_dir = Pathname.new("dist")
 binary_dir = base_dir + dist_dir
@@ -125,17 +127,18 @@ namespace :build do
     end
     Dir.chdir(tmp_dir + "groonga-#{groonga_version}") do
       mecab_config = binary_dir + "bin" + "mecab-config"
-      args = ["./configure",
-              "--prefix=#{binary_dir}",
-              "--host=#{host}",
-              "--without-cutter",
-              "--disable-benchmark"]
+      options = ["./configure",
+                 "--prefix=#{binary_dir}",
+                 "--host=#{host}",
+                 "--without-cutter",
+                 "--disable-benchmark"]
       if mecab_config.exist?
-        args << "--with-mecab-config=#{mecab_config}"
+        options << "--with-mecab-config=#{mecab_config}"
       else
-        args << "--without-mecab"
+        options << "--without-mecab"
       end
-      sh(*args) or exit(false)
+      options.concat(debug_flags) if debug_build_p
+      sh("./configure", *options) or exit(false)
       sh("env", "GREP_OPTIONS=--text", "nice", "make", "-j8") or exit(false)
       sh("env", "GREP_OPTIONS=--text", "make", "install") or exit(false)
 




Groonga-commit メーリングリストの案内
Back to archive index