<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -95,7 +95,7 @@ end
 
 ##### Boost and OXT static library
 
-def define_libboost_oxt_task(output_dir, extra_compiler_flags = nil)
+def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
 	output_file = &quot;#{output_dir}/libboost_oxt.a&quot;
 	output_dir_base = &quot;#{output_dir}/libboost_oxt&quot;
 	flags = &quot;-Iext #{extra_compiler_flags} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}&quot;
@@ -136,7 +136,7 @@ def define_libboost_oxt_task(output_dir, extra_compiler_flags = nil)
 			&quot;#{output_dir_base}/oxt/*.o&quot;)
 	end
 	
-	task :clean do
+	task &quot;#{namespace}:clean&quot; do
 		sh &quot;rm -rf #{output_file} #{output_dir_base}&quot;
 	end
 	
@@ -147,7 +147,7 @@ end
 ##### Static library for Passenger source files that are shared between
 ##### the Apache module and the Nginx helper server.
 
-def define_common_library_task(output_dir, extra_compiler_flags = nil,
+def define_common_library_task(namespace, output_dir, extra_compiler_flags = nil,
                                with_application_pool_server_exe = false,
                                boost_oxt_library = nil,
                                extra_compiler_flags_for_server_exe = nil,
@@ -214,7 +214,7 @@ def define_common_library_task(output_dir, extra_compiler_flags = nil,
 		end
 	end
 	
-	task :clean do
+	task &quot;#{namespace}:clean&quot; do
 		sh &quot;rm -rf #{targets.join(' ')} #{objects_output_dir}&quot;
 	end
 	
@@ -255,9 +255,9 @@ end
 	
 	# NOTE: APACHE2_BOOST_OXT_LIBRARY is a task name, while APACHE2_COMMON_LIBRARY
 	# is an array of task names.
-	APACHE2_BOOST_OXT_LIBRARY = define_libboost_oxt_task(&quot;ext/apache2&quot;,
+	APACHE2_BOOST_OXT_LIBRARY = define_libboost_oxt_task(&quot;apache2&quot;, &quot;ext/apache2&quot;,
 		PlatformInfo.apache2_module_cflags)
-	APACHE2_COMMON_LIBRARY    = define_common_library_task(&quot;ext/apache2&quot;,
+	APACHE2_COMMON_LIBRARY    = define_common_library_task(&quot;apache2&quot;, &quot;ext/apache2&quot;,
 		PlatformInfo.apache2_module_cflags,
 		true, APACHE2_BOOST_OXT_LIBRARY)
 	
@@ -314,8 +314,7 @@ end
 	end
 
 	task :clean =&gt; 'apache2:clean'
-
-	# Remove generated files for the Apache 2 module
+	desc &quot;Clean all compiled Apache 2 files&quot;
 	task 'apache2:clean' do
 		files = [APACHE2_OBJECTS, %w(ext/apache2/mod_passenger.o
 			ext/apache2/mod_passenger.so)]
@@ -327,8 +326,8 @@ end
 
 	# NOTE: NGINX_BOOST_OXT_LIBRARY is a task name, while NGINX_COMMON_LIBRARY
 	# is an array of task names.
-	NGINX_BOOST_OXT_LIBRARY = define_libboost_oxt_task(&quot;ext/nginx&quot;)
-	NGINX_COMMON_LIBRARY    = define_common_library_task(&quot;ext/nginx&quot;)
+	NGINX_BOOST_OXT_LIBRARY = define_libboost_oxt_task(&quot;nginx&quot;, &quot;ext/nginx&quot;)
+	NGINX_COMMON_LIBRARY    = define_common_library_task(&quot;nginx&quot;, &quot;ext/nginx&quot;)
 	
 	desc &quot;Build Nginx helper server&quot;
 	task :nginx =&gt; ['ext/nginx/HelperServer', :native_support]
@@ -355,8 +354,7 @@ end
 	end
 	
 	task :clean =&gt; 'nginx:clean'
-	
-	# Remove Nginx helper server
+	desc &quot;Clean all compiled Nginx files&quot;
 	task 'nginx:clean' do
 		sh(&quot;rm&quot;, &quot;-rf&quot;, &quot;ext/nginx/HelperServer&quot;)
 	end
@@ -364,8 +362,8 @@ end
 
 ##### Unit tests
 
-	TEST_BOOST_OXT_LIBRARY = define_libboost_oxt_task(&quot;test&quot;)
-	TEST_COMMON_LIBRARY    = define_common_library_task(&quot;test&quot;,
+	TEST_BOOST_OXT_LIBRARY = define_libboost_oxt_task(&quot;test&quot;, &quot;test&quot;)
+	TEST_COMMON_LIBRARY    = define_common_library_task(&quot;test&quot;, &quot;test&quot;,
 		nil, true, TEST_BOOST_OXT_LIBRARY)
 	
 	TEST_COMMON_CFLAGS = &quot;-DTESTING_SPAWN_MANAGER -DTESTING_APPLICATION_POOL &quot; &lt;&lt;
@@ -571,7 +569,9 @@ end
 		end
 	end
 	
-	task :clean do
+	task :clean =&gt; 'test:clean'
+	desc &quot;Clean all compiled test files&quot;
+	task 'test:clean' do
 		sh(&quot;rm -rf test/oxt/oxt_test_main test/oxt/*.o test/CxxTests test/*.o&quot;)
 	end
 
@@ -641,7 +641,7 @@ Rake::RDocTask.new(:clobber_rdoc =&gt; &quot;rdoc:clobber&quot;, :rerdoc =&gt; &quot;rdoc:force&quot;) do
 end
 
 
-##### Gem
+##### Packaging
 
 spec = Gem::Specification.new do |s|
 	s.platform = Gem::Platform::RUBY
@@ -735,9 +735,6 @@ Rake::Task['package:gem'].prerequisites.unshift(:doc)
 Rake::Task['package:force'].prerequisites.unshift(:doc)
 task :clobber =&gt; :'package:clean'
 
-
-##### Misc
-
 desc &quot;Create a fakeroot, useful for building native packages&quot;
 task :fakeroot =&gt; [:apache2, :native_support, :doc] do
 	require 'rbconfig'
@@ -802,6 +799,9 @@ task 'package:debian' =&gt; :fakeroot do
 	sh &quot;dpkg -b #{fakeroot} pkg/passenger_#{PACKAGE_VERSION}-#{arch}.deb&quot;
 end
 
+
+##### Misc
+
 desc &quot;Run 'sloccount' to see how much code Passenger has&quot;
 task :sloccount do
 	ENV['LC_ALL'] = 'C'</diff>
      <filename>Rakefile</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>722440a075df51f26aca56372cdb6ac05edcbc2f</id>
    </parent>
  </parents>
  <author>
    <name>Hongli Lai (Phusion)</name>
    <email>hongli@phusion.nl</email>
  </author>
  <url>http://github.com/FooBarWidget/passenger/commit/0285eaf8d66640b2b73de330444c763af382bbe3</url>
  <id>0285eaf8d66640b2b73de330444c763af382bbe3</id>
  <committed-date>2009-08-24T04:10:13-07:00</committed-date>
  <authored-date>2009-08-24T04:10:13-07:00</authored-date>
  <message>Seperate the Apache and Nginx clean tasks.</message>
  <tree>27bfb3964c00607df50f131ccf3570bc971ef5e1</tree>
  <committer>
    <name>Hongli Lai (Phusion)</name>
    <email>hongli@phusion.nl</email>
  </committer>
</commit>
