? drush_make-894440.patch
Index: drush_make.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.drush.inc,v
retrieving revision 1.11.2.71
diff -u -r1.11.2.71 drush_make.drush.inc
--- drush_make.drush.inc	4 Sep 2010 16:17:42 -0000	1.11.2.71
+++ drush_make.drush.inc	22 Sep 2010 11:19:48 -0000
@@ -60,6 +60,9 @@
   $items['generate-makefile'] = array(
     'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
     'description' => 'Attempts to generate a makefile from the current drupal install.',
+    'options' => array(
+      '--include-version' => 'Include project versions if possible.',
+    ),
   );
 
   return $items;
Index: drush_make.generate.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.generate.inc,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 drush_make.generate.inc
--- drush_make.generate.inc	3 Sep 2010 02:58:49 -0000	1.1.2.10
+++ drush_make.generate.inc	22 Sep 2010 11:19:48 -0000
@@ -10,6 +10,9 @@
 function _drush_generate_makefile($file) {
   $projects = array();
 
+  // Include version?
+  $include_version = drush_get_option('include-version', FALSE);
+
   $system_requirements = system_requirements('runtime');
   $core_project = strtolower($system_requirements['drupal']['title']); 
   $projects[$core_project] = array('_type' => 'core');
@@ -17,6 +20,9 @@
     $projects[$core_project]['custom_download'] = TRUE;
     $projects[$core_project]['type'] = 'core';
   }
+  if ($include_version) {
+    $projects[$core_project]['version'] = $system_requirements['drupal']['value'];
+  }
 
   // Non-default profiles section.
   $install_profile = variable_get('install_profile', '');
@@ -44,6 +50,15 @@
         $projects[$name]['custom_download'] = TRUE;
       }
       $projects[$name] += _drush_generate_makefile_check_location($name, $type);
+
+      if ($include_version) {
+        if (!empty($item->info['version']) && !empty($item->info['core'])) {
+          $version = substr($item->info['version'], strlen($item->info['core']) + 1);
+          if ($version) {
+            $projects[$name]['version'] = $version;
+          }
+        }
+      }
     }
   }
 
